Subscribers

Change a contact

PATCH /api/v1/subscribers/{id}

Send the fields of the list by their tag. The list's rules apply as on the create call: EMAIL and every required field must be sent.

Parameters
id integer required path
The contact's id.
Request body application/x-www-form-urlencoded
EMAIL string (email) required
tag string
Tags, separated by commas. They replace the contact's tags.
status string
One of: subscribed, unsubscribed, unconfirmed.

A field of the list, by its tag.

Responses
200 The contact was changed.
401 The token is missing or wrong (Unauthenticated.), or its user may not act on this object (Unauthorized). Without the Accept: application/json header, a missing or wrong token answers with a redirect to the sign-in page instead.
403 A field is missing or wrong (each field that failed, with its messages), or the status is not one of the three.
Change a contact
1 2 3 4 5 6
curl -X PATCH 'https://your-domain/api/v1/subscribers/1' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  --data-urlencode 'EMAIL=anna@example.com' \
  --data-urlencode 'tag=vip,newsletter' \
  --data-urlencode 'status=subscribed'
1 2 3 4 5
$client = new Acelle\Client('https://your-domain/api/v1', 'YOUR_API_TOKEN');
$client->subscriber()->update(1, [
    'EMAIL' => 'anna@example.com',
    'FIRST_NAME' => 'Anna',
]);
Response
{
    "status": 1,
    "message": "Subscriber was successfully updated",
    "subscriber_id": 1,
    "channels": null
}