Promo Codes

List Promo Codes

Changed on

Lists an account's promo codes.

get/promo_codes

Request

  • Base URL
    https://api.whop.com/api/v1
  • Auth
    HTTP bearer

Query parameters

account_id, string required

Account whose promo codes are listed (biz_ tag).

status, 'active' | 'inactive' | 'archived' | 'expired'

Promo-code status. expired groups inactive and archived codes.

product_ids, string[]

Only promo codes scoped to these product IDs.

[
  "prod_xxxxxxxxxxxxxx"
]
variant_ids, string[]

Only promo codes scoped to these variant IDs.

[
  "plan_xxxxxxxxxxxxxx"
]
created_before, string date-time

Only promo codes created before this ISO 8601 timestamp.

created_after, string date-time

Only promo codes created after this ISO 8601 timestamp.

order, 'created_at'

Sort field.

direction, 'asc' | 'desc'

Sort direction.

first, integer

Number of results to return from the start of the range.

after, string

Return results after this cursor. Use page_info.end_cursor from the previous response to fetch the next page.

last, integer

Number of results to return from the end of the range.

before, string

Return results before this cursor. Use page_info.start_cursor from the previous response to fetch the previous page.

include_total_count, boolean

Set to true to return the number of matching results in page_info.total_count. Send first=0 as well to return the count without any results.

Headers

Api-Version-Date, string
Example:2026-11-30

Pins the request to a dated API version.

Response

promo codes listed

object required
data, PromoCodeListItem[] required
page_info, object required

Example response

{
  "data": [
    {
      "affiliate": {
        "id": "aff_xxxxxxxxxxxxxx",
        "user": {
          "id": "user_xxxxxxxxxxxxxx",
          "name": "Dana Whitfield",
          "profile_pic": "https://ui-avatars.com/api/",
          "username": "danawhitfield"
        }
      },
      "amount_off": 0.1,
      "code": "welcome",
      "created_at": "2026-01-01T12:00:00.000Z",
      "currency": "usd",
      "duration": "repeating",
      "expires_at": "2026-01-01T12:00:00.000Z",
      "id": "promo_xxxxxxxxxxxxxx",
      "metadata": {},
      "new_users_only": true,
      "one_per_customer": true,
      "product": {
        "id": "prod_xxxxxxxxxxxxxx",
        "title": "Ceramic Coating Masterclass"
      },
      "promo_duration_months": 1,
      "promo_type": "percentage",
      "status": "active",
      "stock": 25,
      "updated_at": "2026-01-01T12:00:00.000Z",
      "uses": 1
    }
  ],
  "page_info": {
    "start_cursor": "WyJjdXJzb3IiLDFd"
  }
}

Changes

    • warning

      added the new hnl enum value to the data/items/currency response property for the response status

    • info

      added the new optional query request parameter include_total_count

    • info

      added the required property page_info/total_count to the response with the status

    1 more change in this revision