---
title: "Create a vanity link"
method: POST
path: "/affiliates/{id}/links"
tags: ["Affiliates"]
---

# Create a vanity link

`POST /affiliates/{id}/links`

## Request

- Base URL: `https://api.supersendtx.com`
- URL: `https://api.supersendtx.com/affiliates/{id}/links`
- Auth: HTTP bearer

A second link with its own token, optionally landing on a specific page of your website. Up to 50 per partner.

## Request body

- CreateAffiliateLinkRequest
  - `token` string, required
  - `destination_url` string: A path (`/pricing`) or full URL on your website
  - `label` string

## Response `201`

Link created

- AffiliateLinkResponse
  - `link` AffiliateLink, required
    - `object` 'affiliate_link', required
    - `id` string, required
    - `affiliate_id` string, required
    - `token` string, required: The value of `?via=` (or `?ref=`) in the link
    - `url` string, uri, required: The shareable link
    - `destination_url` string, uri, nullable
    - `label` string, nullable
    - `is_primary` boolean, required
    - `created_at` string, date-time, required

## Other responses

- `400`: Validation error (`details.fields` names each bad field)
- `401`: Missing or invalid API key
- `403`: The API key is not full access, or the action is not allowed
- `404`: Not found in this account
- `409`: Conflict

---

[API](https://skmtc.dev/ranla/apis/supersend-tx-api.md) · [All operations](https://skmtc.dev/ranla/apis/supersend-tx-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ranla/apis/supersend-tx-api/revisions/e3e782652f50?raw)
