---
title: "Delete Promo Code"
method: DELETE
path: "/v1/admin_console/promo_code/{code}"
tags: ["admin_console", "promo_code"]
---

# Delete Promo Code

`DELETE /v1/admin_console/promo_code/{code}`

## Request

- Base URL: `https://api.linktodm.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.linktodm.com/v1/admin_console/promo_code/{code}`
- Auth: HTTP bearer

Delete a promo code and its discounts at Dodo and Lemon Squeezy.

Irreversible: anyone holding the code is turned away at checkout from the
moment it runs. Referrals already attributed to it are untouched -- they
live in user_referral and keep earning.

## Path parameters

- `code` string, required

## Response `200`

Successful Response

- DeletePromoCodeResponse: What became of a code and of its discounts at each provider. The provider flags are reported rather than raised on: a code can be gone locally while a provider delete failed, and the admin needs to know which so it can be cleared by hand.
  - `code` string, required
  - `deleted` boolean, required
  - `dodo_discount_deleted` boolean, nullable
  - `lemon_squeezy_discount_deleted` boolean, nullable
  - `detail` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/linktodm/apis/salesmorph.md) - [All operations](https://skmtc.dev/linktodm/apis/salesmorph/llms.txt) - [OpenAPI document](https://skmtc.dev/linktodm/apis/salesmorph/revisions/4af0ad5dbe92?raw)
