Generates a tracking link to a page on the advertiser's site, and optionally a short link to it. Use it to build links for promotions, newsletters or publisher content without the Link Builder UI.
Nothing is stored: the same request returns the same tracking link. When shorten is true, each successful call creates a new short link and uses up part of the account's short link quota, including when a request is retried. If the short link cannot be created, the whole request fails and no tracking link is returned. When the short link quota is used up, the request fails with 429 and code LINK_SHORTENER_QUOTA_EXCEEDED, and Retry-After says when the quota resets. When the short link service is temporarily unavailable, the request fails with 503.
When publisherId is supplied, the publisher must be actively joined to the advertiser; otherwise the request fails with 422, and errors[].pointer names the field.
The caller must belong to the advertiser account and hold at least the Viewer role on it; otherwise the request is rejected with 403.
Personal Access Token, sent as Authorization: Bearer <token>.
Identifier of the advertiser account.
The tracking link to create
The page on the advertiser's site the tracking link sends the visitor to. The scheme is optional.
Identifier of the publisher the link is generated for, as a string of digits. The publisher must be actively joined to the advertiser; otherwise the request fails with 422. When omitted, the link contains a placeholder that each publisher replaces with their own identifier. Omit the field rather than sending null, which fails validation.
Optional tracking parameters added to the link. Only campaign and clickref are accepted; any other key fails validation. Omit the field rather than sending null, which fails validation.
Campaign name, reported against the click.
Click reference, reported against the click.
When true, the response also contains a short link to the tracking link. Each short link uses up part of the account's daily short link quota. Only links of up to 2000 characters can be shortened: if the destination URL or the generated tracking link is longer, the request fails with 422. Must be a JSON boolean; strings such as "true" fail validation.
The tracking link, and the short link when requested.
A tracking link for an advertiser, and optionally a short link to it.
The tracking link. Clicks on it are tracked and the visitor is sent to the destination URL.
A short link that redirects to url. Present only when the request set shorten to true; absent otherwise.
The request body is not a JSON object, or one or more fields are missing, not declared, empty, null, or have the wrong type or format.
publisherId is not a string of digits
{
"type": "https://help.awin.com/apis/error",
"title": "Bad Request",
"status": 400,
"detail": "One or more fields failed validation",
"code": "VALIDATION_FAILED",
"errors": [
{
"pointer": "/publisherId",
"detail": "publisherId must be a string of digits"
}
]
}destinationUrl is not a valid URL
{
"type": "https://help.awin.com/apis/error",
"title": "Bad Request",
"status": 400,
"detail": "One or more fields failed validation",
"code": "VALIDATION_FAILED",
"errors": [
{
"pointer": "/destinationUrl",
"detail": "destinationUrl must be a valid URL"
}
]
}destinationUrl is missing
{
"type": "https://help.awin.com/apis/error",
"title": "Bad Request",
"status": 400,
"detail": "One or more fields failed validation",
"code": "VALIDATION_FAILED",
"errors": [
{
"pointer": "/destinationUrl",
"detail": "destinationUrl is required"
}
]
}The body contains a field that is not declared
{
"type": "https://help.awin.com/apis/error",
"title": "Bad Request",
"status": 400,
"detail": "One or more fields failed validation",
"code": "VALIDATION_FAILED",
"errors": [
{
"pointer": "/mobileApp",
"detail": "mobileApp is not allowed"
}
]
}trackingParameters contains a key other than campaign and clickref
{
"type": "https://help.awin.com/apis/error",
"title": "Bad Request",
"status": 400,
"detail": "One or more fields failed validation",
"code": "VALIDATION_FAILED",
"errors": [
{
"pointer": "/trackingParameters",
"detail": "trackingParameters contains a parameter that is not allowed"
}
]
}trackingParameters.campaign is an empty string
{
"type": "https://help.awin.com/apis/error",
"title": "Bad Request",
"status": 400,
"detail": "One or more fields failed validation",
"code": "VALIDATION_FAILED",
"errors": [
{
"pointer": "/trackingParameters/campaign",
"detail": "trackingParameters/campaign must not be empty"
}
]
}The request body is not a JSON object
{
"type": "https://help.awin.com/apis/error",
"title": "Bad Request",
"status": 400,
"detail": "The request body must be a valid JSON object",
"code": "VALIDATION_FAILED"
}A URI reference identifying the problem type. APIs SHOULD define a stable, dereferenceable URI per domain-specific problem type.
A short, human-readable summary of the problem type. Stable across occurrences; does not change from occurrence to occurrence.
The HTTP status code, repeated here for convenience.
A human-readable explanation specific to this occurrence. Intended for the developer, not the end user — do not parse it.
A URI reference identifying this specific occurrence, typically the request path.
A stable, machine-readable error code. It does not change when detail is reworded, so clients branch on code, never on detail.
One entry per field that failed validation.
A human-readable explanation of this field's failure.
Unauthorized
{
"type": "https://help.awin.com/apis/error",
"title": "Unauthorized",
"status": 401,
"detail": "No valid credentials were supplied with the request",
"code": "UNAUTHORIZED"
}Problem details for an HTTP API error, as defined by RFC 9457. Served as application/problem+json.
A URI reference identifying the problem type. APIs SHOULD define a stable, dereferenceable URI per domain-specific problem type.
A short, human-readable summary of the problem type. Stable across occurrences; does not change from occurrence to occurrence.
The HTTP status code, repeated here for convenience.
A human-readable explanation specific to this occurrence. Intended for the developer, not the end user — do not parse it.
A URI reference identifying this specific occurrence, typically the request path.
A stable, machine-readable error code. It does not change when detail is reworded, so clients branch on code, never on detail.
Forbidden
{
"type": "https://help.awin.com/apis/error",
"title": "Forbidden",
"status": 403,
"detail": "You do not have the correct privileges to access this resource",
"code": "FORBIDDEN"
}Problem details for an HTTP API error, as defined by RFC 9457. Served as application/problem+json.
A URI reference identifying the problem type. APIs SHOULD define a stable, dereferenceable URI per domain-specific problem type.
A short, human-readable summary of the problem type. Stable across occurrences; does not change from occurrence to occurrence.
The HTTP status code, repeated here for convenience.
A human-readable explanation specific to this occurrence. Intended for the developer, not the end user — do not parse it.
A URI reference identifying this specific occurrence, typically the request path.
A stable, machine-readable error code. It does not change when detail is reworded, so clients branch on code, never on detail.
Not Found
{
"type": "https://help.awin.com/apis/error",
"title": "Not Found",
"status": 404,
"detail": "Resource not found with that ID",
"code": "NOT_FOUND"
}Problem details for an HTTP API error, as defined by RFC 9457. Served as application/problem+json.
A URI reference identifying the problem type. APIs SHOULD define a stable, dereferenceable URI per domain-specific problem type.
A short, human-readable summary of the problem type. Stable across occurrences; does not change from occurrence to occurrence.
The HTTP status code, repeated here for convenience.
A human-readable explanation specific to this occurrence. Intended for the developer, not the end user — do not parse it.
A URI reference identifying this specific occurrence, typically the request path.
A stable, machine-readable error code. It does not change when detail is reworded, so clients branch on code, never on detail.
Unsupported Media Type
{
"type": "https://help.awin.com/apis/error",
"title": "Unsupported Media Type",
"status": 415,
"detail": "Content-Type must be application/json",
"code": "UNSUPPORTED_MEDIA_TYPE"
}Problem details for an HTTP API error, as defined by RFC 9457. Served as application/problem+json.
A URI reference identifying the problem type. APIs SHOULD define a stable, dereferenceable URI per domain-specific problem type.
A short, human-readable summary of the problem type. Stable across occurrences; does not change from occurrence to occurrence.
The HTTP status code, repeated here for convenience.
A human-readable explanation specific to this occurrence. Intended for the developer, not the end user — do not parse it.
A URI reference identifying this specific occurrence, typically the request path.
A stable, machine-readable error code. It does not change when detail is reworded, so clients branch on code, never on detail.
The request is well formed but breaks a business rule: the publisher is not joined to the advertiser, the tracking link is too long to shorten, or the destination URL is not supported for this advertiser.
The publisher is not joined to the advertiser
{
"type": "https://help.awin.com/apis/error",
"title": "Unprocessable Content",
"status": 422,
"detail": "The publisher is not joined to this advertiser",
"code": "BUSINESS_RULE_VIOLATION",
"errors": [
{
"pointer": "/publisherId",
"detail": "publisherId must be a publisher joined to this advertiser"
}
]
}The tracking link is too long to shorten
{
"type": "https://help.awin.com/apis/error",
"title": "Unprocessable Content",
"status": 422,
"detail": "The tracking link is too long to be shortened",
"code": "BUSINESS_RULE_VIOLATION",
"errors": [
{
"pointer": "/destinationUrl",
"detail": "destinationUrl is too long to be shortened"
}
]
}The destination URL is not supported for this advertiser
{
"type": "https://help.awin.com/apis/error",
"title": "Unprocessable Content",
"status": 422,
"detail": "The tracking link could not be generated for this destination URL",
"code": "BUSINESS_RULE_VIOLATION",
"errors": [
{
"pointer": "/destinationUrl",
"detail": "destinationUrl is not supported for this advertiser"
}
]
}A URI reference identifying the problem type. APIs SHOULD define a stable, dereferenceable URI per domain-specific problem type.
A short, human-readable summary of the problem type. Stable across occurrences; does not change from occurrence to occurrence.
The HTTP status code, repeated here for convenience.
A human-readable explanation specific to this occurrence. Intended for the developer, not the end user — do not parse it.
A URI reference identifying this specific occurrence, typically the request path.
A stable, machine-readable error code. It does not change when detail is reworded, so clients branch on code, never on detail.
One entry per field that failed validation.
A human-readable explanation of this field's failure.
Too Many Requests
{
"type": "https://help.awin.com/apis/error",
"title": "User rate limit exceeded",
"status": 429,
"detail": "You have exceeded your rate limit across the public API. Retry after the number of seconds in the Retry-After header",
"code": "USER_RATE_LIMIT_EXCEEDED"
}{
"type": "https://help.awin.com/apis/error",
"title": "Route rate limit exceeded",
"status": 429,
"detail": "This endpoint is receiving more requests than it can accept right now. Retry after the number of seconds in the Retry-After header",
"code": "ROUTE_RATE_LIMIT_EXCEEDED"
}{
"type": "https://help.awin.com/apis/error",
"title": "Too Many Requests",
"status": 429,
"detail": "Rate limit exceeded",
"code": "TOO_MANY_REQUESTS"
}Problem details for an HTTP API error, as defined by RFC 9457. Served as application/problem+json.
A URI reference identifying the problem type. APIs SHOULD define a stable, dereferenceable URI per domain-specific problem type.
A short, human-readable summary of the problem type. Stable across occurrences; does not change from occurrence to occurrence.
The HTTP status code, repeated here for convenience.
A human-readable explanation specific to this occurrence. Intended for the developer, not the end user — do not parse it.
A URI reference identifying this specific occurrence, typically the request path.
A stable, machine-readable error code. It does not change when detail is reworded, so clients branch on code, never on detail.
Service Unavailable
{
"type": "https://help.awin.com/apis/error",
"title": "Service Unavailable",
"status": 503,
"detail": "The service is temporarily unavailable",
"code": "SERVICE_UNAVAILABLE"
}Problem details for an HTTP API error, as defined by RFC 9457. Served as application/problem+json.
A URI reference identifying the problem type. APIs SHOULD define a stable, dereferenceable URI per domain-specific problem type.
A short, human-readable summary of the problem type. Stable across occurrences; does not change from occurrence to occurrence.
The HTTP status code, repeated here for convenience.
A human-readable explanation specific to this occurrence. Intended for the developer, not the end user — do not parse it.
A URI reference identifying this specific occurrence, typically the request path.
A stable, machine-readable error code. It does not change when detail is reworded, so clients branch on code, never on detail.
Internal Server Error
{
"type": "https://help.awin.com/apis/error",
"title": "Internal Server Error",
"status": 500,
"detail": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}Problem details for an HTTP API error, as defined by RFC 9457. Served as application/problem+json.
A URI reference identifying the problem type. APIs SHOULD define a stable, dereferenceable URI per domain-specific problem type.
A short, human-readable summary of the problem type. Stable across occurrences; does not change from occurrence to occurrence.
The HTTP status code, repeated here for convenience.
A human-readable explanation specific to this occurrence. Intended for the developer, not the end user — do not parse it.
A URI reference identifying this specific occurrence, typically the request path.
A stable, machine-readable error code. It does not change when detail is reworded, so clients branch on code, never on detail.