curl https://api.thanxsandbox.com/partner/campaigns \
-X POST \
-H 'X-ClientId: {client_id}' \
-H 'Accept-Version: v4.0' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access_token}' \
-d '{
"campaign": {
"merchant_id": "k2lye10h32l5wzo",
"name": "Birthday Reward",
"objective": "Celebrate guest birthdays",
"fine_print": "Limit one per customer",
"start_at": "2025-06-01T00:00:00Z",
"redeemable_from": "2025-06-01T00:00:00Z",
"retire_after_days": 14,
"variants": [
{
"name": "Treatment",
"reward_template_id": "abc123def456"
},
{
"name": "Control"
}
]
}
}'
curl https://api.thanxsandbox.com/partner/campaigns \
-X POST \
-H 'X-ClientId: {client_id}' \
-H 'Accept-Version: v4.0' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access_token}' \
-d '{
"campaign": {
"merchant_id": "k2lye10h32l5wzo",
"name": "Summer Free Coffee",
"objective": "Re-engage lapsed customers",
"fine_print": "Limit one per customer",
"start_at": "2025-06-01T00:00:00Z",
"end_at": "2025-08-31T23:59:59Z",
"redeemable_from": "2025-06-01T00:00:00Z",
"redeemable_to": "2025-09-30T23:59:59Z",
"variants": [
{
"name": "Treatment",
"reward_template_id": "abc123def456"
},
{
"name": "Control"
}
]
}
}'
{
"campaign": {
"id": "camp_abc123",
"name": "Birthday Reward",
"objective": "Celebrate guest birthdays",
"start_at": "2025-06-01T00:00:00Z",
"end_at": null,
"redeemable_from": "2025-06-01T00:00:00Z",
"redeemable_to": null,
"retire_after_days": 14,
"time_zone": "America/Los_Angeles",
"fine_print": "Limit one per customer",
"variants": [
{
"id": "var_treat1",
"name": "Treatment",
"reward_template_id": "abc123def456"
},
{
"id": "var_ctrl1",
"name": "Control",
"reward_template_id": null
}
]
}
}
{
"campaign": {
"id": "camp_abc123",
"name": "Summer Free Coffee",
"objective": "Re-engage lapsed customers",
"start_at": "2025-06-01T00:00:00Z",
"end_at": "2025-08-31T23:59:59Z",
"redeemable_from": "2025-06-01T00:00:00Z",
"redeemable_to": "2025-09-30T23:59:59Z",
"retire_after_days": null,
"time_zone": "America/Los_Angeles",
"fine_print": "Limit one per customer",
"variants": [
{
"id": "var_treat1",
"name": "Treatment",
"reward_template_id": "abc123def456"
},
{
"id": "var_ctrl1",
"name": "Control",
"reward_template_id": null
}
]
}
}
Campaigns
Create Campaign
Creates a new campaign with variants
POST
/
partner
/
campaigns
curl https://api.thanxsandbox.com/partner/campaigns \
-X POST \
-H 'X-ClientId: {client_id}' \
-H 'Accept-Version: v4.0' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access_token}' \
-d '{
"campaign": {
"merchant_id": "k2lye10h32l5wzo",
"name": "Birthday Reward",
"objective": "Celebrate guest birthdays",
"fine_print": "Limit one per customer",
"start_at": "2025-06-01T00:00:00Z",
"redeemable_from": "2025-06-01T00:00:00Z",
"retire_after_days": 14,
"variants": [
{
"name": "Treatment",
"reward_template_id": "abc123def456"
},
{
"name": "Control"
}
]
}
}'
curl https://api.thanxsandbox.com/partner/campaigns \
-X POST \
-H 'X-ClientId: {client_id}' \
-H 'Accept-Version: v4.0' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access_token}' \
-d '{
"campaign": {
"merchant_id": "k2lye10h32l5wzo",
"name": "Summer Free Coffee",
"objective": "Re-engage lapsed customers",
"fine_print": "Limit one per customer",
"start_at": "2025-06-01T00:00:00Z",
"end_at": "2025-08-31T23:59:59Z",
"redeemable_from": "2025-06-01T00:00:00Z",
"redeemable_to": "2025-09-30T23:59:59Z",
"variants": [
{
"name": "Treatment",
"reward_template_id": "abc123def456"
},
{
"name": "Control"
}
]
}
}'
{
"campaign": {
"id": "camp_abc123",
"name": "Birthday Reward",
"objective": "Celebrate guest birthdays",
"start_at": "2025-06-01T00:00:00Z",
"end_at": null,
"redeemable_from": "2025-06-01T00:00:00Z",
"redeemable_to": null,
"retire_after_days": 14,
"time_zone": "America/Los_Angeles",
"fine_print": "Limit one per customer",
"variants": [
{
"id": "var_treat1",
"name": "Treatment",
"reward_template_id": "abc123def456"
},
{
"id": "var_ctrl1",
"name": "Control",
"reward_template_id": null
}
]
}
}
{
"campaign": {
"id": "camp_abc123",
"name": "Summer Free Coffee",
"objective": "Re-engage lapsed customers",
"start_at": "2025-06-01T00:00:00Z",
"end_at": "2025-08-31T23:59:59Z",
"redeemable_from": "2025-06-01T00:00:00Z",
"redeemable_to": "2025-09-30T23:59:59Z",
"retire_after_days": null,
"time_zone": "America/Los_Angeles",
"fine_print": "Limit one per customer",
"variants": [
{
"id": "var_treat1",
"name": "Treatment",
"reward_template_id": "abc123def456"
},
{
"id": "var_ctrl1",
"name": "Control",
"reward_template_id": null
}
]
}
}
Scope required:
rewards.issuereward_template_id that defines the reward to be issued. Control variants
(named “Control”) do not require a
reward_template_id.
Use the List Reward Templates
endpoint to discover available reward templates for a merchant.
Choosing a redemption window
A campaign can express its redemption window in two independent ways:- Fixed window —
redeemable_from/redeemable_to. The same calendar dates apply to every guest, whenever their reward was issued. - Relative window —
retire_after_days. Each guest gets that many days from the moment their own reward was issued.
retire_after_days and
omit end_at and redeemable_to. A campaign with no end date stays
redeemable indefinitely, so every guest gets the same full window regardless of
when they enter.
Adding a fixed end date to that shape truncates the window for late entrants. A
campaign with redeemable_to of 2026-12-31 and retire_after_days of 14
gives a guest issued a reward on 2026-12-30 a single day to redeem, not
fourteen. The request still returns 201 and nothing surfaces the shortened
window, so choose the shape deliberately rather than setting both out of habit.
A campaign with no end date sends no “expiring soon” notification — that
reminder is driven by the campaign end date, not by the per-guest relative
window. Guests on an evergreen campaign are not warned before their reward
expires.
Parameters
string
required
Merchant ID
string
required
Campaign name
string
Campaign objective
string
Terms and conditions
string
required
Campaign start date (ISO8601)
string
Campaign end date (ISO8601). Omit for an evergreen campaign with no end date.
Required when
redeemable_to is sent — sending redeemable_to on its own
returns a 400.string
required
Reward redemption start date (ISO8601)
string
Reward redemption end date (ISO8601). Omit for an open-ended redemption
window.
integer
Reward expiry measured in days from issuance, 1-999 — for example
14 for
“expires 14 days after the guest receives it”. Omit for no relative expiry,
which leaves each reward bounded only by the campaign’s redemption window.array
required
Response
Returns 201 Created with the campaign object.curl https://api.thanxsandbox.com/partner/campaigns \
-X POST \
-H 'X-ClientId: {client_id}' \
-H 'Accept-Version: v4.0' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access_token}' \
-d '{
"campaign": {
"merchant_id": "k2lye10h32l5wzo",
"name": "Birthday Reward",
"objective": "Celebrate guest birthdays",
"fine_print": "Limit one per customer",
"start_at": "2025-06-01T00:00:00Z",
"redeemable_from": "2025-06-01T00:00:00Z",
"retire_after_days": 14,
"variants": [
{
"name": "Treatment",
"reward_template_id": "abc123def456"
},
{
"name": "Control"
}
]
}
}'
curl https://api.thanxsandbox.com/partner/campaigns \
-X POST \
-H 'X-ClientId: {client_id}' \
-H 'Accept-Version: v4.0' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access_token}' \
-d '{
"campaign": {
"merchant_id": "k2lye10h32l5wzo",
"name": "Summer Free Coffee",
"objective": "Re-engage lapsed customers",
"fine_print": "Limit one per customer",
"start_at": "2025-06-01T00:00:00Z",
"end_at": "2025-08-31T23:59:59Z",
"redeemable_from": "2025-06-01T00:00:00Z",
"redeemable_to": "2025-09-30T23:59:59Z",
"variants": [
{
"name": "Treatment",
"reward_template_id": "abc123def456"
},
{
"name": "Control"
}
]
}
}'
{
"campaign": {
"id": "camp_abc123",
"name": "Birthday Reward",
"objective": "Celebrate guest birthdays",
"start_at": "2025-06-01T00:00:00Z",
"end_at": null,
"redeemable_from": "2025-06-01T00:00:00Z",
"redeemable_to": null,
"retire_after_days": 14,
"time_zone": "America/Los_Angeles",
"fine_print": "Limit one per customer",
"variants": [
{
"id": "var_treat1",
"name": "Treatment",
"reward_template_id": "abc123def456"
},
{
"id": "var_ctrl1",
"name": "Control",
"reward_template_id": null
}
]
}
}
{
"campaign": {
"id": "camp_abc123",
"name": "Summer Free Coffee",
"objective": "Re-engage lapsed customers",
"start_at": "2025-06-01T00:00:00Z",
"end_at": "2025-08-31T23:59:59Z",
"redeemable_from": "2025-06-01T00:00:00Z",
"redeemable_to": "2025-09-30T23:59:59Z",
"retire_after_days": null,
"time_zone": "America/Los_Angeles",
"fine_print": "Limit one per customer",
"variants": [
{
"id": "var_treat1",
"name": "Treatment",
"reward_template_id": "abc123def456"
},
{
"id": "var_ctrl1",
"name": "Control",
"reward_template_id": null
}
]
}
}