> 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/reference/tracking-links/tracking-links.md).

# Tracking Links

## Generate a Tracking Link

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

```json
{"openapi":"3.1.0","info":{"title":"Brand API - Tracking Links","version":"v14"},"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."}},"schemas":{"TrackingLinkCreate":{"type":"object","properties":{"Type":{"type":"string","enum":["Regular","Vanity"],"default":"Regular","description":"The type of tracking link to create. 'Vanity' allows for a `CustomPath`."},"CustomPath":{"type":"string","description":"A custom path for a 'Vanity' link (e.g., 'MyCustomLink')."},"AdId":{"type":"integer","description":"The unique ID of the ad to associate with the link. If omitted, redirects to the program's default landing page."},"DeepLink":{"type":"string","format":"uri","description":"A specific URL to redirect the user to, overriding the default."},"MediaPartnerPropertyId":{"type":"integer","description":"The unique ID of the partner's media property where the link will be used."}}}}},"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 program.","operationId":"createTrackingLink","tags":["Tracking Links"],"parameters":[{"name":"AccountSID","in":"path","required":true,"schema":{"type":"string"}},{"name":"ProgramId","in":"path","required":true,"description":"The unique identifier for the program.","schema":{"type":"integer"}},{"name":"MediaPartnerId","in":"query","required":true,"description":"The unique identifier for the media partner.","schema":{"type":"integer"}}],"requestBody":{"description":"The specifications for the tracking link to be generated.","content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/TrackingLinkCreate"}}}},"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 URL."}}}}}}}}}}}
```


---

# 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:

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

The question should be specific, self-contained, and written in natural language.
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.
