---
title: "List discount codes"
method: GET
path: "/gateway/discount-codes"
tags: ["Discount Codes"]
---

# List discount codes

`GET /gateway/discount-codes`

## Request

- Base URL: `https://api.agentaos.ai/api/v1`
- URL: `https://api.agentaos.ai/api/v1/gateway/discount-codes`
- Auth: API key in header `x-api-key`

Paginated, archived codes included. What each code takes off, and how many people used it, is on the single-code route.

## Query parameters

- `limit` integer
- `offset` integer

## Response `200`

A page of discount codes.

- DiscountCodeListResponse
  - `items` DiscountCode[], required
    - `id` string, uuid, required
    - `code` string, required: As you typed it. Buyers may type it in any case.
    - `kind` 'discount' | 'tracking', required: `discount` changes the price. `tracking` changes nothing and only records who used it.
    - `planLinkId` string, uuid, nullable, required: The one plan this code works on; null means every subscription plan you own.
    - `planName` string, nullable, required
    - `archivedAt` string, date-time, nullable, 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.
  - `total` integer, required
  - `hasMore` boolean, required

## Other responses

- `401`: Missing or invalid `x-api-key`.

---

[API](https://skmtc.dev/agentaos/apis/agentaos-gateway-api.md) · [All operations](https://skmtc.dev/agentaos/apis/agentaos-gateway-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agentaos/apis/agentaos-gateway-api/revisions/3a8ad3c6b965?raw)
