curl -X POST "https://api.affonso.io/v1/program/promotion-urls" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Enterprise landing page",
"url": "https://acme.com/enterprise",
"audience": "groups",
"group_ids": ["group_enterprise"],
"sort_order": 10
}'
{
"success": true,
"data": {
"id": "promotion_url_abc123",
"name": "Enterprise landing page",
"url": "https://acme.com/enterprise",
"description": null,
"audience": "groups",
"group_ids": ["group_enterprise"],
"product_ids": [],
"is_active": true,
"sort_order": 10,
"is_program_default": false,
"default_for_group_ids": [],
"created_at": "2026-07-28T10:00:00.000Z",
"updated_at": "2026-07-28T10:00:00.000Z"
}
}
Promotion URLs
Create Promotion URL
Create a landing-page destination for all affiliates, selected groups, or selected products
POST
/
v1
/
program
/
promotion-urls
curl -X POST "https://api.affonso.io/v1/program/promotion-urls" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Enterprise landing page",
"url": "https://acme.com/enterprise",
"audience": "groups",
"group_ids": ["group_enterprise"],
"sort_order": 10
}'
{
"success": true,
"data": {
"id": "promotion_url_abc123",
"name": "Enterprise landing page",
"url": "https://acme.com/enterprise",
"description": null,
"audience": "groups",
"group_ids": ["group_enterprise"],
"product_ids": [],
"is_active": true,
"sort_order": 10,
"is_program_default": false,
"default_for_group_ids": [],
"created_at": "2026-07-28T10:00:00.000Z",
"updated_at": "2026-07-28T10:00:00.000Z"
}
}
Create a promotion URL. The
audience determines which assignment field is required:
all_affiliates: omit bothgroup_idsandproduct_ids.groups: provide one or moregroup_idsand omitproduct_ids.products: provide one or moreproduct_idsand omitgroup_ids.
Body Parameters
string
required
Display name, 1–255 characters.
string
required
HTTP(S) destination URL, up to 2048 characters.
string
required
One of
all_affiliates, groups, or products.string | null
Optional description.
array
Required for
groups; not allowed for other audiences.array
Required for
products; not allowed for other audiences.boolean
Whether the URL is available. Defaults to
true.integer
Non-negative selection priority. Defaults to
0.Response
Returns the created promotion URL. See List Promotion URLs for the response object.curl -X POST "https://api.affonso.io/v1/program/promotion-urls" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Enterprise landing page",
"url": "https://acme.com/enterprise",
"audience": "groups",
"group_ids": ["group_enterprise"],
"sort_order": 10
}'
{
"success": true,
"data": {
"id": "promotion_url_abc123",
"name": "Enterprise landing page",
"url": "https://acme.com/enterprise",
"description": null,
"audience": "groups",
"group_ids": ["group_enterprise"],
"product_ids": [],
"is_active": true,
"sort_order": 10,
"is_program_default": false,
"default_for_group_ids": [],
"created_at": "2026-07-28T10:00:00.000Z",
"updated_at": "2026-07-28T10:00:00.000Z"
}
}
Was this page helpful?
