Skip to main content
POST
/
promo_codes
Create promo code
curl --request POST \
  --url https://v2.firstpromoter.com/api/v2/affiliate/promo_codes \
  --header 'Account-ID: <account-id>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "code": "<string>",
  "description": "<string>",
  "reward_id": 123,
  "promoter_campaign_id": 123,
  "metadata": {},
  "details": {}
}'
{
  "id": 123,
  "code": "<string>",
  "reward": {
    "id": 123,
    "name": "<string>"
  },
  "ext_id": "<string>",
  "description": "<string>",
  "company_id": 123,
  "promoter_campaign_id": 123,
  "metadata": {},
  "details": {},
  "archived_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Access token passed as a Bearer token in the Authorization header

Headers

Account-ID
string
required

Account identifier that specifies which account is making the request

Example:

"acc_123456"

Body

application/json
code
string
required

Code of the promo code

reward_id
integer
required

ID of the reward

promoter_campaign_id
integer
required

ID of the promoter campaign

description
string

Description of the promo code

metadata
object

Metadata of the promo code

details
object

Details of the promo code

Response

Promo code created successfully

id
integer
code
string
reward
object
ext_id
string
description
string
company_id
integer
promoter_campaign_id
integer
metadata
object
details
object
archived_at
string<date-time>
I