cURL
curl --request POST \ --url https://api.firstpromoter.com/api/v2/affiliate/promo_codes \ --header 'Account-ID: <account-id>' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "code": "<string>", "reward_id": 123, "promoter_campaign_id": 123, "description": "<string>", "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" }
Access token passed as a Bearer token in the Authorization header
Account identifier that specifies which account is making the request
"acc_123456"
Code of the promo code
ID of the reward
ID of the promoter campaign
Description of the promo code
Metadata of the promo code
Details of the promo code
Promo code created successfully
Show child attributes