Discount codes scoped to offers or the whole organization.
List campaigns
GET/campaigns
Every campaign in the organization. Pass contentId to get the set that applies to one content (its own plus the org's global campaigns).
Query parameters
contentIdstring
Only campaigns that apply to this content (its own + global).
Responses
200List campaigns.
400Validation failed or the request body is malformed.
401Missing, invalid or revoked API key.
403The key's organization does not own this resource.
404The resource does not exist (or belongs to another org).
429Rate limit exceeded (240 reads/min, 60 writes/min per key).
500Unexpected server error.
curl https://api.cursare.com/v1/campaigns \
--header 'Authorization: Bearer cr_live_…'
{
"data": [
{
"active": true,
"amountOff": 0,
"code": "string",
"disclaimer": "string",
"expiresAt": "2026-01-31T12:00:00.000Z",
"id": "string",
"image": "string",
"maxRedemptions": 0,
"offerIds": [
"string"
],
"percentOff": 0,
"public": true,
"redemptions": 0
}
]
}
Create a campaign
POST/campaigns
Provide percentOff or amountOff (minor units) — not both. Omit offerIds (or pass null/[]) for a GLOBAL campaign that applies to every paid offer. public campaigns show a de/por price on the storefront and auto-apply at checkout.
Request body
codestringrequired
The code learners type at checkout.
amountOffinteger
Discount in the content currency's minor unit (cents).
disclaimerstring
Optional fine print shown with the public promo.
expiresAtdate | date-time
Optional expiry as an ISO date or offset date-time — the code stops applying after it.
imagestring
Optional promo banner image URL.
maxRedemptionsinteger
Optional redemption cap.
offerIdsstring[] | null
Scope to these PAID offers. Omit / null / [] for a GLOBAL, org-wide campaign.
publicboolean
Advertise a de/por price on the storefront and auto-apply at checkout.
Responses
201Create a campaign.
400Validation failed or the request body is malformed.
401Missing, invalid or revoked API key.
403The key's organization does not own this resource.
404The resource does not exist (or belongs to another org).
429Rate limit exceeded (240 reads/min, 60 writes/min per key).
500Unexpected server error.
curl https://api.cursare.com/v1/campaigns \
--request POST \
--header 'Authorization: Bearer cr_live_…' \
--header 'Content-Type: application/json' \
--data '{
"code": "string",
"amountOff": 0,
"disclaimer": "string",
"expiresAt": "string",
"image": "string",
"maxRedemptions": 0,
"offerIds": [
"string"
],
"percentOff": 0,
"public": true
}'
{
"data": {
"active": true,
"amountOff": 0,
"code": "string",
"disclaimer": "string",
"expiresAt": "2026-01-31T12:00:00.000Z",
"id": "string",
"image": "string",
"maxRedemptions": 0,
"offerIds": [
"string"
],
"percentOff": 0,
"public": true,
"redemptions": 0
}
}
Update a campaign
PATCH/campaigns/{id}
Change presentation, limits and scope — never the code or discount.
Request body
expiresAtdate | date-time | any | null
maxRedemptionsinteger | null
offerIdsstring[] | null
Re-scope to these PAID offers. null / [] = GLOBAL, org-wide.
Responses
200Update a campaign.
400Validation failed or the request body is malformed.
401Missing, invalid or revoked API key.
403The key's organization does not own this resource.
404The resource does not exist (or belongs to another org).
429Rate limit exceeded (240 reads/min, 60 writes/min per key).
500Unexpected server error.
curl https://api.cursare.com/v1/campaigns/{id} \
--request PATCH \
--header 'Authorization: Bearer cr_live_…' \
--header 'Content-Type: application/json' \
--data '{
"active": true,
"disclaimer": "string",
"expiresAt": "string",
"image": "string",
"maxRedemptions": 0,
"offerIds": [
"string"
],
"public": true
}'
{
"data": {
"active": true,
"amountOff": 0,
"code": "string",
"disclaimer": "string",
"expiresAt": "2026-01-31T12:00:00.000Z",
"id": "string",
"image": "string",
"maxRedemptions": 0,
"offerIds": [
"string"
],
"percentOff": 0,
"public": true,
"redemptions": 0
}
}
Delete a campaign
DELETE/campaigns/{id}
Past redemptions keep their access.
Responses
200Delete a campaign.
401Missing, invalid or revoked API key.
403The key's organization does not own this resource.
404The resource does not exist (or belongs to another org).
429Rate limit exceeded (240 reads/min, 60 writes/min per key).
500Unexpected server error.
curl https://api.cursare.com/v1/campaigns/{id} \
--request DELETE \
--header 'Authorization: Bearer cr_live_…'
{
"data": {
"deleted": true,
"id": "string"
}
}