Skip to main content
POST
Stop a discount code
Webhook: none. Stopping a code changes no payment or subscription. See Which action fires which event.

Authorizations

x-api-key
string
header
required

Your secret key, from app.agentaos.ai -> Settings -> Developers -> API Keys. The key's prefix is both its identity and its environment: sk_test_... (sandbox, free, no verification) or sk_live_... (real money, requires business verification). A missing or invalid key returns 401.

Path Parameters

id
string<uuid>
required

Discount code UUID (the id field from create or list).

Response

The archived discount code.

Fully camelCase on the wire.

id
string<uuid>
required
code
string
required

As you typed it. Buyers may type it in any case.

kind
enum<string>
required

discount changes the price. tracking changes nothing and only records who used it.

Available options:
discount,
tracking

The one plan this code works on; null means every subscription plan you own.

planName
string | null
required
archivedAt
string<date-time> | null
required
createdAt
string<date-time>
required
active
boolean
required

Usable as far as this list can tell: not archived, and fully created. Whether the code has since been used up is answered by the single-code route.