POST
/
v2
/
promo_codes
curl --request POST \
  --url https://api.whop.com/api/v2/promo_codes \
  --header 'Content-Type: application/json' \
  --data '{
  "amount_off": 123,
  "base_currency": "usd",
  "code": "<string>",
  "promo_type": "percentage",
  "expiration_datetime": 123,
  "new_users_only": false,
  "number_of_intervals": 0,
  "plan_ids": [
    "<string>"
  ],
  "stock": 123,
  "unlimited_stock": true,
  "metadata": {}
}'
{
  "id": "<string>",
  "plans": "<string>",
  "amount_off": 123,
  "base_currency": "usd",
  "code": "<string>",
  "new_users_only": true,
  "number_of_intervals": 123,
  "plan_ids": [
    [
      "<any>"
    ]
  ],
  "promo_type": "percentage",
  "status": "active",
  "stock": 123,
  "unlimited_stock": true,
  "uses": 123,
  "created_at": 123,
  "expiration_datetime": 123,
  "metadata": {},
  "duration": "forever",
  "existing_memberships_only": true
}

Headers

Authorization
string

Your API key, which can be found on the Whop Business Dashboard. You must prepend your key with the word 'Bearer', which will look like Bearer ***************************

Query Parameters

expand
enum<string>[]

Whether or not to expand the Plans on the returned Promo Code(s). Pass an array with each object(s) you want to expand, e.g. [plans]

Body

application/json

Creates a promo code

Response

201 - application/json

Creates a promo code

PromoCode model