Skip to main content
POST
Create a self-service coupon code for an affiliate. This endpoint is public and uses token-based authentication in the request body.
This endpoint does not require API key authentication. Instead, it uses the token in the request body for authentication.

Prerequisites

Self-service coupons must be enabled for the program:
  1. Configure a Coupon Blueprint in your program settings
  2. The blueprint defines the discount type and value for affiliate coupons
  3. Affiliates can only create one coupon per program

Body Parameters

string
required
The embed token from POST /v1/embed/token.
string
required
The coupon code to create. Must be 3-20 alphanumeric characters. Will be automatically uppercased and special characters removed.

Response

boolean
Always true for successful responses.
object
The created coupon.

Validation Rules

  • Code must be 3-20 alphanumeric characters
  • Code is converted to uppercase
  • Non-alphanumeric characters are stripped
  • Code must be unique within the program
  • Affiliate can only have one coupon per program

Checking Coupon Status

Use GET /v1/embed/data to check if an affiliate already has a coupon:
Once created, coupon codes cannot be changed. Affiliates should choose their code carefully.