---
title: "Create a trackable short link for a partnership offer"
method: POST
path: "/v2/links"
tags: ["links-v2"]
---

# Create a trackable short link for a partnership offer

`POST /v2/links`

## Request

- Base URL: `https://api.tracklysms.com/api`
- URL: `https://api.tracklysms.com/api/v2/links`
- Auth: API key in header `X-Api-Key`

## Request body

- LinkCreateRequest
  - `externalOfferId` string: External platform offer ID (e.g. HasOffers ID). Alternative to offerId.
  - `listId` integer: Sending list ID (alternative to phoneNumber)
  - `offerId` string: Trackly partnership offer ID
  - `phoneNumber` string: Sending list phone number in E.164 format (alternative to listId)

## Response `201`

Link created

- LinkCreateResponse
  - `clickTrackerUrl` string: Click tracker URL the short link redirects through
  - `destinationUrl` string: Final offer destination URL
  - `domain` string: Short link domain
  - `linkId` string: Short link ID
  - `offerId` string: PartnershipOffer ID
  - `shortUrl` string: Full short URL

## Other responses

- `400`: Validation error
- `401`: Authentication error
- `404`: Not found
- `409`: No domain configured

---

[API](https://skmtc.dev/tracklysms/apis/trackly-sms-api.md) · [All operations](https://skmtc.dev/tracklysms/apis/trackly-sms-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tracklysms/apis/trackly-sms-api/revisions/ac1ad22cb2a9?raw)
