Affilibee
Toggle sidebar

Invite affiliate

API reference for inviting a new affiliate to your program.

Endpoint

POST
/api/v2/affiliates/invite

Authorization

Learn more
Authorization
string
header
required

The Bearer token generated in the Affilibee dashboard.

Body

application/json

email
string
required

The email address of the affiliate to invite.

sender_email
string
required

The email address of the merchant user sending the invitation. This user must belong to the active merchant.

content
string

Optional custom message to include in the invitation email.

Example requests

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();

Responses

application/json

200
Success

Returned when the affiliate invitation is successfully sent.

401
Unauthorized

Returned when the request does not include a valid Bearer token.

422
Unprocessable Content

Returned when the request body fails validation, the email has already been invited, or the sender email is not found.

Response examples

{
    "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"
    }
}

Got questions? We're here for you.

We help teams run affiliate programs through API-first integrations that fit the platform they already use.

© 2025 Affilibee Handelsbolag (969802-2481)

Integrations

API Integration
How can we assist you today?

Fill in the form below and we'll get back to you as soon as possible.

Name
Email
Message