Skip to content

Search API reference

Find an endpoint or a guide of the Sovgate API reference and jump straight to it.

Create a promotion code

Add a code to a coupon.

POST/v1/promotion_codes

Add a code to a coupon.

Endpoint

http
POST /v1/promotion_codes

Request body

NameTypeRequiredDescription
couponstringRequiredThe coupon, cpn_....
codestringOptionalWhat's typed. Leave it out and one is made for you, like X7KM-2QPD.
first_time_onlybooleanOptionalDefault false.
one_per_customerbooleanOptionalDefault false.
minimum_amountintegerOptionalIn cents.
customerstringOptionalOnly this customer, cust_....
expires_attimestampOptionalIts last moment.
max_redemptionsintegerOptionalWithin the coupon's own limit.

Example request

bash
curl -X POST https://api.sovgate.com/v1/promotion_codes \  -H "Authorization: Bearer sov_sk_test_your_key" \  -H "Idempotency-Key: 2d6001bf-4b2a-4c1d-9e3f-a2f621283338" \  -H "Content-Type: application/json" \  -d '{  "coupon": "cpn_20b5e71de063737f5f3e2920",  "code": "LAUNCH20",  "one_per_customer": true}'

Example response

json
{  "id": "promo_22c793f0f6e03e802cd4a00f",  "object": "promotion_code",  "livemode": false,  "coupon": "cpn_20b5e71de063737f5f3e2920",  "code": "LAUNCH20",  "active": true,  "first_time_only": false,  "one_per_customer": true,  "minimum_amount": null,  "customer": null,  "expires_at": null,  "max_redemptions": null,  "times_redeemed": 4,  "created": "2026-11-20T09:30:00Z"}