curl -X POST "https://api.chariow.com/v1/affiliates/invitations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"emails": ["john@example.com", "jane@example.com"]
}'
const response = await fetch('https://api.chariow.com/v1/affiliates/invitations', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
emails: ['john@example.com', 'jane@example.com']
})
});
const data = await response.json();
$ch = curl_init('https://api.chariow.com/v1/affiliates/invitations');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'emails' => ['john@example.com', 'jane@example.com']
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
{
"message": "2 invitations sent successfully.",
"data": [
{
"id": "affinv_abc123xyz",
"email": "john@example.com",
"status": "pending",
"expires_at": "2026-02-10T10:30:00+00:00",
"accepted_at": null,
"created_at": "2026-01-11T10:30:00+00:00"
},
{
"id": "affinv_def456uvw",
"email": "jane@example.com",
"status": "pending",
"expires_at": "2026-02-10T10:30:00+00:00",
"accepted_at": null,
"created_at": "2026-01-11T10:30:00+00:00"
}
],
"errors": []
}
{
"message": "Invitation sent successfully.",
"data": [
{
"id": "affinv_abc123xyz",
"email": "john@example.com",
"status": "pending",
"expires_at": "2026-02-10T10:30:00+00:00",
"accepted_at": null,
"created_at": "2026-01-11T10:30:00+00:00"
}
],
"errors": []
}
{
"message": "The emails field is required.",
"data": [],
"errors": {
"emails": ["The emails field is required."]
}
}
Affiliates
Send Affiliate Invitations
Send invitation emails to potential affiliates
curl -X POST "https://api.chariow.com/v1/affiliates/invitations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"emails": ["john@example.com", "jane@example.com"]
}'
const response = await fetch('https://api.chariow.com/v1/affiliates/invitations', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
emails: ['john@example.com', 'jane@example.com']
})
});
const data = await response.json();
$ch = curl_init('https://api.chariow.com/v1/affiliates/invitations');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'emails' => ['john@example.com', 'jane@example.com']
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
{
"message": "2 invitations sent successfully.",
"data": [
{
"id": "affinv_abc123xyz",
"email": "john@example.com",
"status": "pending",
"expires_at": "2026-02-10T10:30:00+00:00",
"accepted_at": null,
"created_at": "2026-01-11T10:30:00+00:00"
},
{
"id": "affinv_def456uvw",
"email": "jane@example.com",
"status": "pending",
"expires_at": "2026-02-10T10:30:00+00:00",
"accepted_at": null,
"created_at": "2026-01-11T10:30:00+00:00"
}
],
"errors": []
}
{
"message": "Invitation sent successfully.",
"data": [
{
"id": "affinv_abc123xyz",
"email": "john@example.com",
"status": "pending",
"expires_at": "2026-02-10T10:30:00+00:00",
"accepted_at": null,
"created_at": "2026-01-11T10:30:00+00:00"
}
],
"errors": []
}
{
"message": "The emails field is required.",
"data": [],
"errors": {
"emails": ["The emails field is required."]
}
}
Sends invitation emails to the provided email addresses. Up to 25 emails can be sent in a single request. Existing affiliates and pending invitations are automatically skipped, and only the invitations created are returned.
Required scope:
affiliates.write. A key without it receives a 403 error. See Authentication.Request Body
array
required
Array of email addresses (1-25 items, each a valid address of at most 255 characters). Addresses are lower-cased and duplicates are removed.Example:
["john@example.com", "jane@example.com"]Response
Returns201 Created.
string
Invitation sent successfully. for one invitation, or N invitations sent successfully. otherwisearray
Invitations created by this request. Skipped addresses (existing affiliates of your store and addresses with a pending invitation) are not listed: when every address is skipped,
data is an empty array.array
Always empty on success
curl -X POST "https://api.chariow.com/v1/affiliates/invitations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"emails": ["john@example.com", "jane@example.com"]
}'
const response = await fetch('https://api.chariow.com/v1/affiliates/invitations', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
emails: ['john@example.com', 'jane@example.com']
})
});
const data = await response.json();
$ch = curl_init('https://api.chariow.com/v1/affiliates/invitations');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'emails' => ['john@example.com', 'jane@example.com']
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
{
"message": "2 invitations sent successfully.",
"data": [
{
"id": "affinv_abc123xyz",
"email": "john@example.com",
"status": "pending",
"expires_at": "2026-02-10T10:30:00+00:00",
"accepted_at": null,
"created_at": "2026-01-11T10:30:00+00:00"
},
{
"id": "affinv_def456uvw",
"email": "jane@example.com",
"status": "pending",
"expires_at": "2026-02-10T10:30:00+00:00",
"accepted_at": null,
"created_at": "2026-01-11T10:30:00+00:00"
}
],
"errors": []
}
{
"message": "Invitation sent successfully.",
"data": [
{
"id": "affinv_abc123xyz",
"email": "john@example.com",
"status": "pending",
"expires_at": "2026-02-10T10:30:00+00:00",
"accepted_at": null,
"created_at": "2026-01-11T10:30:00+00:00"
}
],
"errors": []
}
{
"message": "The emails field is required.",
"data": [],
"errors": {
"emails": ["The emails field is required."]
}
}
Was this page helpful?