Skip to main content
GET
Get one discount code

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 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.

termsLabel
string
required

What the code takes off, ready to print: "20% off", "€5.00 off", or "No discount — tracking only".

timesRedeemed
integer
required

How many subscribers redeemed this code.

maxRedemptions
integer | null
required

The cap you set, or null for none.