Create a tracking link

Creates a new tracking link.

🚧

Account Limit for Vanity Links

Up to 5000 vanity links can exist in your account. Attempting to create more vanity links when at the limit will return 403 Forbidden and the link will not be created. Delete unused vanity links if at the limit.

Parameters


ProgramId required

Unique identifier for the program that the tracking link will be in. Specified in the API call path.


Type optional

Specifies the type of tracking link.

View possible enum value
RegularCreates a standard tracking link, which automatically generates a URL path.
VanityCreates a vanity tracking link, which enables a custom path in the URL to be specified.

CustomPath optional

Defines the custom path of the tracking link after the domain, which will turn a standard tracking link into a vanity tracking link (e.g., specifying CustomPath=MyCustomLink becomes https://example.sjv.io/MyCustomLink). If omitted, a random path will be generated.


AdId optional

Specify the unique ad identifier you're creating a tracking link for. If omitted, the tracking link will redirect to the brand's program's landing page instead of the page specified by the ad.


DeepLink optional

Specify the exact URL that the tracking link will redirect a user to. If omitted, the tracking link will redirect to your program's default landing page.


MediaPartnerPropertyId optional

Specify the unique identifier of the partner's media property (i.e., website, social media profile, or app) where the link will be used.


subId1 optional

Specify a sub-affiliate ID value—this will appear in your partner performance reporting. Brands will not be able to see this value in their reporting.


subId2 optional

Specify a sub-affiliate ID value—this will appear in your partner performance reporting. Brands will not be able to see this value in their reporting.


subId3 optional

Specify a sub-affiliate ID value—this will appear in your partner performance reporting. Brands will not be able to see this value in their reporting.


sharedId optional

Specify a shared ID value—this will appear in your partner performance reporting.


Example request


curl 'https://api.impact.com/Mediapartners/<AccountSID>/Programs/<ProgramId>/TrackingLinks?MediaPartnerPropertyId=1892978&DeepLink=https%3A%2F%2Fexample.com%2Fmysite%2F&Type=vanity&subId1=test&sharedId=test2 \
  -X POST \
  -u '<AccountSID>:<AuthToken>' \
  -H 'Accept: application/json'

Returns


Returns the URL of the generated tracking link. Will return 403 Forbidden if 5000 tracking links exist.

Example response


{
    "TrackingURL": "https://example.sjv.io/c/123456/98765/101010"
}
{
    "timestamp": 1663261677313,
    "status": "BAD_REQUEST",
    "error": "Bad Request",
    "message": "The property ID '123456' does not exist."
}