$configuration
$configuration : \ElasticEmailClient\ApiConfiguration
Add(string $publicAccountID, string $email, \ElasticEmailApi\array<string> $publicListID = array(), \ElasticEmailApi\array<string> $listName = array(), string $firstName = null, string $lastName = null, \ElasticEmailEnums\ContactSource $source = \ElasticEmailEnums\ContactSource::ContactApi, string $returnUrl = null, string $sourceUrl = null, string $activationReturnUrl = null, string $activationTemplate = null, boolean $sendActivation = true, \ElasticEmailApi\?DateTime $consentDate = null, string $consentIP = null, array $field = array(), string $notifyEmail = null, string $alreadyActiveUrl = null, \ElasticEmailEnums\ConsentTracking $consentTracking = \ElasticEmailEnums\ConsentTracking::Unknown) : string
Add a new contact and optionally to one of your lists. Note that your API KEY is not required for this call.
| string | $publicAccountID | Public key for limited access to your account such as contact/add so you can use it safely on public websites. |
| string | Proper email address. |
|
| \ElasticEmailApi\array |
$publicListID | ID code of list |
| \ElasticEmailApi\array |
$listName | Name of your list. |
| string | $firstName | First name. |
| string | $lastName | Last name. |
| \ElasticEmailEnums\ContactSource | $source | Specifies the way of uploading the contact |
| string | $returnUrl | URL to navigate to after account creation |
| string | $sourceUrl | URL from which request was sent. |
| string | $activationReturnUrl | The url to return the contact to after activation. |
| string | $activationTemplate | |
| boolean | $sendActivation | True, if you want to send activation email to this account. Otherwise, false |
| \ElasticEmailApi\?DateTime | $consentDate | Date of consent to send this contact(s) your email. If not provided current date is used for consent. |
| string | $consentIP | IP address of consent to send this contact(s) your email. If not provided your current public IP address is used for consent. |
| array | $field | |
| string | $notifyEmail | Emails, separated by semicolon, to which the notification about contact subscribing should be sent to |
| string | $alreadyActiveUrl | |
| \ElasticEmailEnums\ConsentTracking | $consentTracking |
AddBlocked(string $email, \ElasticEmailEnums\ContactStatus $status)
Manually add or update a contacts status to Abuse or Unsubscribed status (blocked).
| string | Proper email address. |
|
| \ElasticEmailEnums\ContactStatus | $status | Name of status: Active, Engaged, Inactive, Abuse, Bounced, Unsubscribed. |
ChangeStatus(\ElasticEmailEnums\ContactStatus $status, string $rule = null, \ElasticEmailApi\array<string> $emails = array())
Changes status of selected Contacts. You may provide RULE for selection or specify list of Contact IDs.
| \ElasticEmailEnums\ContactStatus | $status | Name of status: Active, Engaged, Inactive, Abuse, Bounced, Unsubscribed. |
| string | $rule | Query used for filtering. |
| \ElasticEmailApi\array |
$emails | Comma delimited list of contact emails |
CountByStatus(string $rule = null, boolean $allContacts = false) : \ElasticEmailEnums\ContactStatusCounts
Returns number of Contacts, RULE specifies contact Status.
| string | $rule | Query used for filtering. |
| boolean | $allContacts | True: Include every Contact in your Account. Otherwise, false |
CountByUnsubscribeReason(\ElasticEmailApi\?DateTime $from = null, \ElasticEmailApi\?DateTime $to = null) : \ElasticEmailEnums\ContactUnsubscribeReasonCounts
Returns count of unsubscribe reasons for unsubscribed and complaint contacts.
| \ElasticEmailApi\?DateTime | $from | Starting date for search in YYYY-MM-DDThh:mm:ss format. |
| \ElasticEmailApi\?DateTime | $to | Ending date for search in YYYY-MM-DDThh:mm:ss format. |
EEDelete(string $rule = null, \ElasticEmailApi\array<string> $emails = array())
Permanantly deletes the contacts provided. You can provide either a qualified rule or a list of emails (comma separated string).
| string | $rule | Query used for filtering. |
| \ElasticEmailApi\array |
$emails | Comma delimited list of contact emails |
Export(\ElasticEmailEnums\ExportFileFormats $fileFormat = \ElasticEmailEnums\ExportFileFormats::Csv, string $rule = null, \ElasticEmailApi\array<string> $emails = array(), \ElasticEmailEnums\CompressionFormat $compressionFormat = \ElasticEmailEnums\CompressionFormat::None, string $fileName = null) : \ElasticEmailEnums\ExportLink
Export selected Contacts to file.
| \ElasticEmailEnums\ExportFileFormats | $fileFormat | Format of the exported file |
| string | $rule | Query used for filtering. |
| \ElasticEmailApi\array |
$emails | Comma delimited list of contact emails |
| \ElasticEmailEnums\CompressionFormat | $compressionFormat | FileResponse compression format. None or Zip. |
| string | $fileName | Name of your file. |
ExportUnsubscribeReasonCount(\ElasticEmailApi\?DateTime $from = null, \ElasticEmailApi\?DateTime $to = null, \ElasticEmailEnums\ExportFileFormats $fileFormat = \ElasticEmailEnums\ExportFileFormats::Csv, \ElasticEmailEnums\CompressionFormat $compressionFormat = \ElasticEmailEnums\CompressionFormat::None, string $fileName = null) : \ElasticEmailEnums\ExportLink
Export contacts' unsubscribe reasons count to file.
| \ElasticEmailApi\?DateTime | $from | Starting date for search in YYYY-MM-DDThh:mm:ss format. |
| \ElasticEmailApi\?DateTime | $to | Ending date for search in YYYY-MM-DDThh:mm:ss format. |
| \ElasticEmailEnums\ExportFileFormats | $fileFormat | Format of the exported file |
| \ElasticEmailEnums\CompressionFormat | $compressionFormat | FileResponse compression format. None or Zip. |
| string | $fileName | Name of your file. |
FindContact(string $email) : \ElasticEmailEnums\ContactCollection
Finds all Lists and Segments this email belongs to.
| string | Proper email address. |
GetContactsByList(string $listName, integer $limit = 20, integer $offset) : \ElasticEmailApi\Array<\ElasticEmailEnums\Contact>
List of Contacts for provided List
| string | $listName | Name of your list. |
| integer | $limit | Maximum of loaded items. |
| integer | $offset | How many items should be loaded ahead. |
GetContactsBySegment(string $segmentName, integer $limit = 20, integer $offset) : \ElasticEmailApi\Array<\ElasticEmailEnums\Contact>
List of Contacts for provided Segment
| string | $segmentName | Name of your segment. |
| integer | $limit | Maximum of loaded items. |
| integer | $offset | How many items should be loaded ahead. |
EEList(string $rule = null, integer $limit = 20, integer $offset) : \ElasticEmailApi\Array<\ElasticEmailEnums\Contact>
List of all contacts. If you have not specified RULE, all Contacts will be listed.
| string | $rule | Query used for filtering. |
| integer | $limit | Maximum of loaded items. |
| integer | $offset | How many items should be loaded ahead. |
LoadBlocked(\ElasticEmailApi\array<\ElasticEmailEnums\ContactStatus> $statuses, string $search = null, integer $limit, integer $offset) : \ElasticEmailApi\Array<\ElasticEmailEnums\BlockedContact>
Load blocked contacts
| \ElasticEmailApi\array<\ElasticEmailEnums\ContactStatus> | $statuses | List of blocked statuses: Abuse, Bounced or Unsubscribed |
| string | $search | Text fragment used for searching. |
| integer | $limit | Maximum of loaded items. |
| integer | $offset | How many items should be loaded ahead. |
LoadContact(string $email) : \ElasticEmailEnums\Contact
Load detailed contact information
| string | Proper email address. |
LoadHistory(string $email, integer $limit, integer $offset) : \ElasticEmailApi\Array<\ElasticEmailEnums\ContactHistory>
Shows detailed history of chosen Contact.
| string | Proper email address. |
|
| integer | $limit | Maximum of loaded items. |
| integer | $offset | How many items should be loaded ahead. |
QuickAdd(\ElasticEmailApi\array<string> $emails, string $firstName = null, string $lastName = null, string $publicListID = null, string $listName = null, \ElasticEmailEnums\ContactStatus $status = \ElasticEmailEnums\ContactStatus::Active, string $notes = null, \ElasticEmailApi\?DateTime $consentDate = null, string $consentIP = null, array $field = array(), string $notifyEmail = null, \ElasticEmailEnums\ConsentTracking $consentTracking = \ElasticEmailEnums\ConsentTracking::Unknown)
Add new Contact to one of your Lists.
| \ElasticEmailApi\array |
$emails | Comma delimited list of contact emails |
| string | $firstName | First name. |
| string | $lastName | Last name. |
| string | $publicListID | ID code of list |
| string | $listName | Name of your list. |
| \ElasticEmailEnums\ContactStatus | $status | Name of status: Active, Engaged, Inactive, Abuse, Bounced, Unsubscribed. |
| string | $notes | Free form field of notes |
| \ElasticEmailApi\?DateTime | $consentDate | Date of consent to send this contact(s) your email. If not provided current date is used for consent. |
| string | $consentIP | IP address of consent to send this contact(s) your email. If not provided your current public IP address is used for consent. |
| array | $field | |
| string | $notifyEmail | Emails, separated by semicolon, to which the notification about contact subscribing should be sent to |
| \ElasticEmailEnums\ConsentTracking | $consentTracking |
Subscribe(string $publicAccountID) : string
Basic double opt-in email subscribe form for your account. This can be used for contacts that need to re-subscribe as well.
| string | $publicAccountID | Public key for limited access to your account such as contact/add so you can use it safely on public websites. |
Update(string $email, string $firstName = null, string $lastName = null, boolean $clearRestOfFields = true, array $field = array(), string $customFields = null) : \ElasticEmailEnums\Contact
Update selected contact. Omitted contact's fields will be reset by default (see the clearRestOfFields parameter)
| string | Proper email address. |
|
| string | $firstName | First name. |
| string | $lastName | Last name. |
| boolean | $clearRestOfFields | States if the fields that were omitted in this request are to be reset or should they be left with their current value |
| array | $field | |
| string | $customFields | Custom contact field like firstname, lastname, city etc. JSON serialized text like { "city":"london" } |
Upload(\ElasticEmailApi\File $contactFile, boolean $allowUnsubscribe = false, \ElasticEmailApi\?int $listID = null, string $listName = null, \ElasticEmailEnums\ContactStatus $status = \ElasticEmailEnums\ContactStatus::Active, \ElasticEmailApi\?DateTime $consentDate = null, string $consentIP = null, \ElasticEmailEnums\ConsentTracking $consentTracking = \ElasticEmailEnums\ConsentTracking::Unknown) : integer
Upload contacts in CSV file.
| \ElasticEmailApi\File | $contactFile | Name of CSV file with Contacts. |
| boolean | $allowUnsubscribe | True: Allow unsubscribing from this (optional) newly created list. Otherwise, false |
| \ElasticEmailApi\?int | $listID | ID number of selected list. |
| string | $listName | Name of your list to upload contacts to, or how the new, automatically created list should be named |
| \ElasticEmailEnums\ContactStatus | $status | Name of status: Active, Engaged, Inactive, Abuse, Bounced, Unsubscribed. |
| \ElasticEmailApi\?DateTime | $consentDate | Date of consent to send this contact(s) your email. If not provided current date is used for consent. |
| string | $consentIP | IP address of consent to send this contact(s) your email. If not provided your current public IP address is used for consent. |
| \ElasticEmailEnums\ConsentTracking | $consentTracking |