curl -X POST "https://api.affonso.io/v1/program/campaigns" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Creator Retainer",
"description": "Monthly content retainer",
"reward_type": "retainer",
"reward_amount": 500,
"retainer_interval": "monthly",
"retainer_day_of_month": 1,
"start_date": "2026-11-01T00:00:00.000Z",
"application_prompt": "Share your content plan and audience size"
}'
curl -X POST "https://api.affonso.io/v1/program/campaigns" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Weekly Shorts Retainer",
"reward_type": "retainer",
"reward_amount": 150,
"retainer_interval": "weekly",
"retainer_weekday": "monday",
"start_date": "2026-11-03T00:00:00.000Z"
}'
curl -X POST "https://api.affonso.io/v1/program/campaigns" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Launch Review Bounty",
"reward_type": "flat_rate",
"reward_amount": 100,
"max_budget": 2000,
"start_date": "2026-11-01T00:00:00.000Z",
"application_required": true,
"application_prompt": "Link your review draft"
}'
{
"success": true,
"data": {
"id": "cmretainer01camp0001",
"name": "Creator Retainer",
"description": "Monthly content retainer",
"kind": "submission",
"status": "DRAFT",
"reward_type": "retainer",
"reward_amount": 500,
"reward_amount_min": null,
"reward_amount_max": null,
"max_budget": null,
"retainer_interval": "monthly",
"retainer_day_of_month": 1,
"retainer_weekday": null,
"retainer_schedule_changed_at": null,
"retainer_resumed_at": null,
"start_date": "2026-11-01T00:00:00.000Z",
"end_date": null,
"application_required": true,
"application_prompt": "Share your content plan and audience size",
"max_submissions_per_user": null,
"created_at": "2026-10-12T14:30:00.000Z",
"updated_at": "2026-10-12T14:30:00.000Z"
}
}
Campaigns
Create Campaign
Create a draft program campaign, including retainer rewards
POST
/
v1
/
program
/
campaigns
curl -X POST "https://api.affonso.io/v1/program/campaigns" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Creator Retainer",
"description": "Monthly content retainer",
"reward_type": "retainer",
"reward_amount": 500,
"retainer_interval": "monthly",
"retainer_day_of_month": 1,
"start_date": "2026-11-01T00:00:00.000Z",
"application_prompt": "Share your content plan and audience size"
}'
curl -X POST "https://api.affonso.io/v1/program/campaigns" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Weekly Shorts Retainer",
"reward_type": "retainer",
"reward_amount": 150,
"retainer_interval": "weekly",
"retainer_weekday": "monday",
"start_date": "2026-11-03T00:00:00.000Z"
}'
curl -X POST "https://api.affonso.io/v1/program/campaigns" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Launch Review Bounty",
"reward_type": "flat_rate",
"reward_amount": 100,
"max_budget": 2000,
"start_date": "2026-11-01T00:00:00.000Z",
"application_required": true,
"application_prompt": "Link your review draft"
}'
{
"success": true,
"data": {
"id": "cmretainer01camp0001",
"name": "Creator Retainer",
"description": "Monthly content retainer",
"kind": "submission",
"status": "DRAFT",
"reward_type": "retainer",
"reward_amount": 500,
"reward_amount_min": null,
"reward_amount_max": null,
"max_budget": null,
"retainer_interval": "monthly",
"retainer_day_of_month": 1,
"retainer_weekday": null,
"retainer_schedule_changed_at": null,
"retainer_resumed_at": null,
"start_date": "2026-11-01T00:00:00.000Z",
"end_date": null,
"application_required": true,
"application_prompt": "Share your content plan and audience size",
"max_submissions_per_user": null,
"created_at": "2026-10-12T14:30:00.000Z",
"updated_at": "2026-10-12T14:30:00.000Z"
}
}
Create a draft campaign for your team. Status is always
DRAFT on create. Requires write:program.
Reward type rules:
flat_raterequiresreward_amountrangerequiresreward_amount_minandreward_amount_max(min >= 0.01, max >= min)customsets no amountsretainerrequiresreward_amount,retainer_interval, and eitherretainer_day_of_month(monthly) orretainer_weekday(weekly). For retainer, omittedapplication_requiredis set totrue; sendingfalsereturnsVALIDATION_ERROR(“Retainer campaigns require an application”). Ignoresmax_budget(stored asnull)
Body Parameters
string
required
Campaign title. Must be between 1 and 255 characters.
string
required
Reward type. Valid values:
flat_rate, custom, range, retainer.string
required
Campaign start datetime (ISO 8601).
string | null
Campaign description. Maximum 10,000 characters. Set to
null or omit for none.number | null
Fixed reward amount in program currency. Required for
flat_rate and retainer. Minimum 0.01. Null for custom and range.number | null
Range minimum. Required when
reward_type is range. Minimum 0.01.number | null
Range maximum. Required when
reward_type is range. Must be greater than or equal to reward_amount_min.number | null
Owner-only cap on approved reward spend. Null or omit for no cap. Partners never see this. Ignored on retainer (stored as
null).string | null
Required when
reward_type is retainer. Valid values: monthly, weekly.integer | string | null
Monthly retainer day. Valid values: integer
1-28, or "last". Required when retainer_interval is monthly.string | null
Weekly retainer weekday. Valid values:
monday, tuesday, wednesday, thursday, friday, saturday, sunday. Required when retainer_interval is weekly.string | null
Campaign end datetime (ISO 8601). Set to
null or omit for open-ended.boolean
When true, affiliates must apply and be accepted before submitting proof. For retainer, omitted
application_required is set to true; sending false returns VALIDATION_ERROR (“Retainer campaigns require an application”).string | null
Question shown to affiliates when they apply. Maximum 10,000 characters.
integer | null
Maximum approved submissions per affiliate. Integer >= 1, or
null for no limit.Response
Returns the created campaign object (HTTP 201).boolean
Always
true for successful responsesobject
The created campaign.
Show Data Object Properties
Show Data Object Properties
string
Encoded campaign id
string
Campaign title
string | null
Campaign description
string
Always
"submission"string
Campaign status. On create this is
"DRAFT". Valid values: DRAFT, SCHEDULED, ACTIVE, ENDED, ARCHIVED.string
flat_rate, custom, range, or retainernumber | null
Fixed reward amount
number | null
Range minimum
number | null
Range maximum
number | null
Owner-only spend cap. Null means no cap. Always null on retainer.
string | null
monthly or weekly for retainer campaigns, otherwise nullinteger | string | null
1-28 or "last" for monthly retainers, otherwise nullstring | null
Weekday for weekly retainers, otherwise
nullstring | null
ISO 8601 timestamp of the last retainer schedule change, or
nullstring | null
ISO 8601 timestamp set only when a retainer campaign moves from ENDED or ARCHIVED to ACTIVE, or
nullstring
ISO 8601 start datetime
string | null
ISO 8601 end datetime, or
nullboolean
Whether affiliates must apply before submitting proof
string | null
Application question text
integer | null
Per-affiliate submission cap
string
ISO 8601 creation timestamp
string
ISO 8601 update timestamp
curl -X POST "https://api.affonso.io/v1/program/campaigns" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Creator Retainer",
"description": "Monthly content retainer",
"reward_type": "retainer",
"reward_amount": 500,
"retainer_interval": "monthly",
"retainer_day_of_month": 1,
"start_date": "2026-11-01T00:00:00.000Z",
"application_prompt": "Share your content plan and audience size"
}'
curl -X POST "https://api.affonso.io/v1/program/campaigns" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Weekly Shorts Retainer",
"reward_type": "retainer",
"reward_amount": 150,
"retainer_interval": "weekly",
"retainer_weekday": "monday",
"start_date": "2026-11-03T00:00:00.000Z"
}'
curl -X POST "https://api.affonso.io/v1/program/campaigns" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Launch Review Bounty",
"reward_type": "flat_rate",
"reward_amount": 100,
"max_budget": 2000,
"start_date": "2026-11-01T00:00:00.000Z",
"application_required": true,
"application_prompt": "Link your review draft"
}'
{
"success": true,
"data": {
"id": "cmretainer01camp0001",
"name": "Creator Retainer",
"description": "Monthly content retainer",
"kind": "submission",
"status": "DRAFT",
"reward_type": "retainer",
"reward_amount": 500,
"reward_amount_min": null,
"reward_amount_max": null,
"max_budget": null,
"retainer_interval": "monthly",
"retainer_day_of_month": 1,
"retainer_weekday": null,
"retainer_schedule_changed_at": null,
"retainer_resumed_at": null,
"start_date": "2026-11-01T00:00:00.000Z",
"end_date": null,
"application_required": true,
"application_prompt": "Share your content plan and audience size",
"max_submissions_per_user": null,
"created_at": "2026-10-12T14:30:00.000Z",
"updated_at": "2026-10-12T14:30:00.000Z"
}
}
Notes
- Requires
write:program. - Retainer campaigns always require applications. For retainer, omitted
application_requiredis set totrue; sendingfalsereturnsVALIDATION_ERROR(“Retainer campaigns require an application”). max_budgetis ignored for retainer and stored asnull.- Campaign IDs are encoded, same as marketplace campaign IDs.
Was this page helpful?
