Add a contact to a list
POST
/api/v1/subscribers
Besides the fields below, send any field of the list by its tag (FIRST_NAME,
LAST_NAME, …). When the list asks new contacts to confirm their address, the contact
is unconfirmed and gets the confirmation email, unless status says otherwise.
Request body application/x-www-form-urlencoded
list_uid
string
required
EMAIL
string (email)
required
tag
string
Tags, separated by commas.
status
string
One of:
subscribed, unsubscribed, unconfirmed.
A field of the list, by its tag.
Responses
200
The contact was added.
400
No list has this
list_uid.
401
The token is missing or wrong, or its user may not add contacts to this list.
403
The list refused the contact (each field that failed, with its messages), the status
is not one of the three, or the plan allows no more contacts (
{"message": …}).
Add a contact to a list
1
2
3
4
5
6
7
curl -X POST 'https://your-domain/api/v1/subscribers' \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
--data-urlencode 'list_uid=6adaabbf98847' \
--data-urlencode 'EMAIL=anna@example.com' \
--data-urlencode 'tag=vip,newsletter' \
--data-urlencode 'status=subscribed'
1
2
3
4
5
6
7
$client = new Acelle\Client('https://your-domain/api/v1', 'YOUR_API_TOKEN');
$client->subscriber()->create([
'list_uid' => '6adaabbf98847',
'EMAIL' => 'anna@example.com',
'FIRST_NAME' => 'Anna',
'tag' => 'vip,newsletter',
]);
Response
{
"status": 1,
"message": "Subscriber was successfully created",
"subscriber_id": 70757,
"channels": null
}