---
title: "Delete affiliate link"
method: DELETE
path: "/links"
---

# Delete affiliate link

`DELETE /links`

Permanently deletes an affiliate link, identified by either `id` or its `link` slug.

Clicks, referrals and sales already attributed to the link are kept — their link reference is simply cleared. Any referral URL using this slug stops tracking immediately. Fires the `affiliate.updated` webhook for the link's former owner.

## Request body

- AffiliateLinkDelete — Supply either `id` or `link`.
  - `id` string, uuid — The affiliate link to delete. Required unless `link` is supplied.
  - `link` string — The slug of the link to delete. Required unless `id` is supplied.

## Response `200`

The affiliate link was deleted.

- object
  - `message` string — Confirmation message
  - `deletedLink` object — The link that was removed
    - `id` string, uuid — The deleted affiliate link ID
    - `link` string — The deleted link slug

## Other responses

- `400` — Neither `id` nor `link` was supplied.
- `401` — The `Authorization` header is missing, is not a `Bearer` header, or the token is not valid.
- `403` — API access is not enabled for this account.
- `404` — No affiliate link matched the `id` or `link` supplied.
- `429` — Too many requests for this token on this endpoint. Please slow down.
- `500` — The affiliate link could not be deleted.

---

[API](https://skmtc.net/referly/apis/referly-api.md) · [All operations](https://skmtc.net/referly/apis/referly-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/referly/referly-api/revisions/0f506d61b9c3/schema)
