API reference for inviting a new affiliate to your program.
/api/v2/affiliates/invite
Authorization
The Bearer token generated in the Affilibee dashboard.
application/json
email
The email address of the affiliate to invite.
sender_email
The email address of the merchant user sending the invitation. This user must belong to the active merchant.
content
Optional custom message to include in the invitation email.
curl -X POST https://affilibee.com/api/v2/affiliates/invite \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"email": "affiliate@example.com",
"sender_email": "merchant-user@example.com",
"content": "Welcome to our affiliate program!"
}'
const token = "YOUR_ACCESS_TOKEN";
const url = "https://affilibee.com/api/v2/affiliates/invite";
const payload = {
email: "affiliate@example.com",
sender_email: "merchant-user@example.com",
content: "Welcome to our affiliate program!"
};
fetch(url, {
method: "POST",
headers: {
"Authorization": `Bearer ${token}`,
"Content-Type": "application/json",
"Accept": "application/json"
},
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log("Success:", data))
.catch(error => console.error("Error:", error));
import requests
token = "YOUR_ACCESS_TOKEN"
url = "https://affilibee.com/api/v2/affiliates/invite"
payload = {
"email": "affiliate@example.com",
"sender_email": "merchant-user@example.com",
"content": "Welcome to our affiliate program!"
}
response = requests.post(
url,
headers={
"Authorization": f"Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
},
json=payload,
)
print(response.json())
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$token = 'YOUR_ACCESS_TOKEN';
$client = new Client([
'base_uri' => 'https://affilibee.com/api/v2',
'headers' => [
'Authorization' => "Bearer $token",
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]);
$payload = [
'email' => 'affiliate@example.com',
'sender_email' => 'merchant-user@example.com',
'content' => 'Welcome to our affiliate program!',
];
$response = $client->post('affiliates/invite', [
'body' => json_encode($payload),
]);
echo $response->getBody();
application/json
Success
Returned when the affiliate invitation is successfully sent.
Unauthorized
Returned when the request does not include a valid Bearer token.
Unprocessable Content
Returned when the request body fails validation, the email has already been invited, or the sender email is not found.
{
"success": true,
"data": {
"invite": {
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"email": "affiliate@example.com",
"link_used_at": null,
"created_at": "2026-04-05T18:30:00Z",
"updated_at": "2026-04-05T18:30:00Z"
}
},
"errors": null,
"meta": {
"trace_id": "20260405-183000:api:abc12"
}
}
{
"success": false,
"data": null,
"errors": {
"message": [
"Unauthenticated."
]
},
"meta": {
"trace_id": "20260405-183000:api:abc12"
}
}
{
"success": false,
"data": null,
"errors": {
"email": [
"The email field is required."
],
"sender_email": [
"The sender email field is required."
]
},
"meta": {
"trace_id": "20260405-183000:api:abc12"
}
}
We help teams run affiliate programs through API-first integrations that fit the platform they already use.
© 2025 Affilibee Handelsbolag (969802-2481)