Subscribers
Manage subscriber lifecycle and audience data.
Access module
$subscribersApi = $client->subscribers();
addSubscriber
Adds or updates a subscriber via the synchronous endpoint (/add_subscriber_sync).
Input
payload(array<string, mixed>):email(string, required)add_tags(?string)firstname(?string)lastname(?string)phone(?string)city(?string)country(?string)birthday(?string)channels(?string)attributes(?array)
Response
array
$result = $subscribersApi->addSubscriber([
'email' => 'john@doe.com',
'firstname' => 'John',
'lastname' => 'Doe',
]);
addSubscriberAsync
Same payload shape as addSubscriber, but uses the async path (/add_subscriber).
$result = $subscribersApi->addSubscriberAsync([
'email' => 'john@doe.com',
]);
addSubscriberBulk
Adds subscribers in bulk.
Input
subscribers(list<array<string, mixed>>): list of subscriber payloads.- each item uses the same fields as
addSubscriber/addSubscriberAsync(see above).
- each item uses the same fields as
Response
array
$result = $subscribersApi->addSubscriberBulk([
['email' => 'john@doe.com'],
['email' => 'jane@doe.com'],
]);
addSubscriberByPhone
Adds a subscriber by phone.
Input
phone(string, required)firstname(?string)lastname(?string)
Response
array
$result = $subscribersApi->addSubscriberByPhone('+40123456789', 'John', 'Doe');
anonymizeEmail
Anonymizes a subscriber email.
Input
email(string)
Response
array
$result = $subscribersApi->anonymizeEmail('john@doe.com');
deleteSubscriber
Deletes a subscriber by email and/or phone.
Input
payload(array<string, mixed>): must include at least one of:email(?string, must be a valid email when present)phone(?string)
Response
array
$result = $subscribersApi->deleteSubscriber([
'email' => 'john@doe.com',
]);
listSubscribed
Lists subscribed emails, optionally filtered by a date range.
Input
dateFrom(?string) (sent asdate_from)dateTo(?string) (sent asdate_to)
Response
array
$result = $subscribersApi->listSubscribed('2026-01-01', '2026-01-31');
listUnsubscribed
Lists unsubscribed emails, optionally filtered by a date range.
Input
dateFrom(?string) (sent asdate_from)dateTo(?string) (sent asdate_to)
Response
array
$result = $subscribersApi->listUnsubscribed('2026-01-01', '2026-01-31');
removeSubscriber
Removes a subscriber (optionally by channels).
Input
email(string, required)channels(?string)
Response
array
$result = $subscribersApi->removeSubscriber('john@doe.com', 'email');
statusSubscriber
Gets subscriber status for an email.
Input
email(string, required)
Response
array
$result = $subscribersApi->statusSubscriber('john@doe.com');
subscribersEvolution
Returns subscribers evolution stats.
Input
- none
Response
array
$result = $subscribersApi->subscribersEvolution();
unsubscribedEmails
Gets unsubscribed emails in a required date range.
Input
dateFrom(string, required, formatYYYY-MM-DD) (sent asdate_from)dateTo(string, required, formatYYYY-MM-DD) (sent asdate_to)
Response
array
$result = $subscribersApi->unsubscribedEmails('2026-01-01', '2026-01-31');
updateTags
Updates subscriber tags.
Input
email(string, required)addTags(list<string|int>) (default:[]) — sent asadd_tagsremoveTags(list<string|int>) (default:[]) — sent asremove_tagsoverwriteExisting(?int) (default:null) — sent asoverwrite_existing
Response
array
$result = $subscribersApi->updateTags(
'john@doe.com',
[10, 12],
[5],
1,
);