> For the complete documentation index, see [llms.txt](https://integrations.impact.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://integrations.impact.com/brand-api-reference/brand-api-reference-v12/reference/tracking-links/tracking-links.md).

# Tracking Links

## Generate a Tracking Link

> Creates a new tracking link for a specified media partner within a given program.

```json
{"openapi":"3.1.0","info":{"title":"Brand API - Tracking Links","version":"v12"},"servers":[{"url":"https://api.impact.com"}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"Use your AccountSID as the username and AuthToken as the password."}}},"paths":{"/Advertisers/{AccountSID}/Programs/{ProgramId}/TrackingLinks":{"post":{"summary":"Generate a Tracking Link","description":"Creates a new tracking link for a specified media partner within a given program.","operationId":"generateTrackingLink","tags":["Tracking Links"],"parameters":[{"name":"AccountSID","in":"path","required":true,"schema":{"type":"string"},"description":"Your unique Account SID."},{"name":"ProgramId","in":"path","required":true,"schema":{"type":"integer"},"description":"The unique identifier for the program (campaign)."},{"name":"MediaPartnerId","in":"query","required":true,"schema":{"type":"integer"},"description":"The unique identifier for the media partner who will be assigned the tracking link."}],"requestBody":{"description":"The properties of the tracking link to be generated.","content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"Type":{"type":"string","enum":["Regular","Vanity"],"description":"The type of tracking link to generate."},"CustomPath":{"type":"string","description":"A custom path for the link, used when Type is 'Vanity'."},"AdId":{"type":"integer","description":"The unique identifier for the ad to associate with this link."},"DeepLink":{"type":"string","format":"uri","description":"A specific URL to redirect the user to, overriding defaults."},"MediaPartnerPropertyId":{"type":"integer","description":"The ID of the partner's specific media property where the link will be used."}}}}}},"responses":{"200":{"description":"The tracking link was generated successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"TrackingURL":{"type":"string","format":"uri","description":"The generated tracking link."}}}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://integrations.impact.com/brand-api-reference/brand-api-reference-v12/reference/tracking-links/tracking-links.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
