curl -X POST "https://api.affonso.io/v1/program/groups" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Premium Partners",
"description": "High-performing affiliates with higher commissions",
"custom_website_url": "https://partners.acme.com"
}'
{
"success": true,
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Premium Partners",
"description": "High-performing affiliates with higher commissions",
"custom_website_url": "https://partners.acme.com",
"is_default": false,
"created_at": "2024-06-15T14:30:00.000Z"
}
}
{
"success": false,
"error": {
"code": "PLAN_LIMIT_REACHED",
"message": "Your Launch plan allows up to 3 groups. Upgrade to Growth for up to 5, or Elite for unlimited.",
"current_limit": 3
}
}
Affiliate Groups
Create Group
Create a new affiliate group
POST
/
v1
/
program
/
groups
curl -X POST "https://api.affonso.io/v1/program/groups" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Premium Partners",
"description": "High-performing affiliates with higher commissions",
"custom_website_url": "https://partners.acme.com"
}'
{
"success": true,
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Premium Partners",
"description": "High-performing affiliates with higher commissions",
"custom_website_url": "https://partners.acme.com",
"is_default": false,
"created_at": "2024-06-15T14:30:00.000Z"
}
}
{
"success": false,
"error": {
"code": "PLAN_LIMIT_REACHED",
"message": "Your Launch plan allows up to 3 groups. Upgrade to Growth for up to 5, or Elite for unlimited.",
"current_limit": 3
}
}
Create a new affiliate group. The number of groups is limited by your plan tier:
| Plan | Group Limit |
|---|---|
| Launch | 3 |
| Growth | 5 |
| Elite | Unlimited |
| Enterprise | Unlimited |
Body Parameters
string
required
Group name. Must be between 1 and 255 characters.
string | null
Group description. Set to
null or omit for no description.string | null
Custom website URL for this group. Must be a valid URL. Set to
null or omit to use default.boolean
default:"false"
Set as the default group for new affiliates.
Response
Returns the created group object (HTTP 201).curl -X POST "https://api.affonso.io/v1/program/groups" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Premium Partners",
"description": "High-performing affiliates with higher commissions",
"custom_website_url": "https://partners.acme.com"
}'
{
"success": true,
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Premium Partners",
"description": "High-performing affiliates with higher commissions",
"custom_website_url": "https://partners.acme.com",
"is_default": false,
"created_at": "2024-06-15T14:30:00.000Z"
}
}
{
"success": false,
"error": {
"code": "PLAN_LIMIT_REACHED",
"message": "Your Launch plan allows up to 3 groups. Upgrade to Growth for up to 5, or Elite for unlimited.",
"current_limit": 3
}
}
Was this page helpful?
