Method | Description | |
---|---|---|
__construct ( string $URL, string $username, string $password, integer $timeOut = 60, null $clientId = null, null $listId = null ) | ||
addSubscriber ( string $email, string $name, array[optional] $customFields = [], bool[optional] $resubscribe = true, string[optional] $listId = null ) : boolean | Adds a subscriber to an existing subscriber list. If $resubscribe is set to true, it will resubscribe the e-mail address if not active. | |
createCampaign ( string $name, string $subject, string $fromName, string $fromEmail, string $replyToEmail, string $HTMLContentURL, string $textContentURL, array $subscriberLists, array $subscriberListSegments = [], string[optional] $clientId = null ) : string | Creates a campaign. Returns the campaign ID when succesful or false if the call failed | |
createClient ( string $companyName, string $country, string $timezone ) : string | Creates a client. Returns the client ID when succesful or false if the call failed | |
createCustomField ( string $name, string[optional] $type = 'text', array[optional] $options = [], string[optional] $listId = null ) : boolean | Creates a custom field for a list. | |
createList ( string $title, string[optional] $unsubscribePage = null, bool[optional] $confirmOptIn = false, string[optional] $confirmationSuccessPage = null, string[optional] $clientId = null ) : string | Creates a list. Returns the list ID when succesful or false if the call failed | |
createSegment ( string $title, array[optional] $rules = [], string[optional] $listId = null ) : boolean | Creates a segment. Returns true on success | |
createTemplate ( string $name, string $HTMLPageURL, string[optional] $zipFileURL = null, string[optional] $screenshotURL = null, string[optional] $clientId = null ) : string | Creates a template. Returns the template ID when succesful | |
deleteCampaign ( string $campaignId ) : boolean | Deletes a campaign | |
deleteClient ( string[optional] $clientId = null ) : boolean | Deletes a client | |
deleteCustomField ( string $name, string[optional] $listId = null ) : boolean | Deletes a custom field | |
deleteList ( string $listId ) : boolean | Deletes a list | |
deleteTemplate ( string $templateId ) : boolean | Deletes a template | |
existsClient ( string $clientId ) : boolean | Checks if a client exists | |
existsList ( string $listId ) : boolean | Checks if a list exists | |
existsTemplate ( string $templateId ) : boolean | Checks if a template exists | |
getAPIKey ( string $URL, string $username, string $password ) : string | Returns the API key for the logged-in user | |
getBouncedSubscribers ( string[optional] $listId = null, int[optional] $timestamp = null, int[optional] $page = 1, int[optional] $pageSize = 1000, string[optional] $orderField = 'date', string[optional] $orderDirection = 'asc' ) : array | Returns a list of all subscribers for a list that have hard bounced since the specified date. | |
getCampaignBounces ( string $campaignId, int[optional] $page = 1, int[optional] $pageSize = 1000, string[optional] $orderField = 'date', string[optional] $orderDirection = 'asc' ) : array | Returns a list of all subscribers who bounced for a given campaign, and the type of bounce ("Hard"=Hard Bounce, "Soft"=Soft Bounce). | |
getCampaignClicks ( string $campaignId, int[optional] $timestamp = null, int[optional] $page = 1, int[optional] $pageSize = 1000, string[optional] $orderField = 'date', string[optional] $orderDirection = 'asc' ) : array | Contains a paged result representing all subscribers who clicked a link in the email for a given campaign, including the date/time and IP address they clicked the campaign from. The result set is organized by URL. | |
getCampaignOpens ( string $campaignId, int[optional] $timestamp = null, int[optional] $page = 1, int[optional] $pageSize = 1000, string[optional] $orderField = 'date', string[optional] $orderDirection = 'asc' ) : array | Returns a list of all subscribers who opened a given campaign, and the number of times they opened the campaign | |
getCampaignSummary ( string $campaignId ) : array | Provides a basic summary of the results for any sent campaign such as the number of recipients, opens, clicks, unsubscribes, etc to date. Also includes the URL of the web version of that campaign. | |
getCampaignUnsubscribes ( string $campaignId, int[optional] $timestamp = null, int[optional] $page = 1, int[optional] $pageSize = 1000, string[optional] $orderField = 'date', string[optional] $orderDirection = 'asc' ) : array | Returns a list of all subscribers who unsubscribed for a given campaign. | |
getClient ( string[optional] $clientId = null ) : array | Returns the complete account and billing details for a particular client. | |
getClientId ( ) : string | Returns the default set client ID | |
getClients ( ) : array | Returns all clients for the logged-in user. | |
getCountries ( ) : array | Returns all countries for the logged-in user. | |
getCustomFields ( string[optional] $listId = null ) : array | Returns all the custom fields available for a list. | |
getDraftCampaignsByClientID ( string[optional] $clientId = null ) : array | Returns a list of all draft campaigns for a client | |
getList ( string[optional] $listId = null ) : array | Returns a list's configuration detail | |
getListId ( ) : string | Returns the default set list ID | |
getListStatistics ( string[optional] $listId = null ) : array | Returns the list stats | |
getListsByCampaignId ( string $campaignId ) : array | Returns a list of all subscriber lists for a campaign. | |
getListsByClientId ( string[optional] $clientId = null ) : array | Returns a list of all subscriber lists for a client. | |
getResponseFormat ( ) : string | Get response format | |
getSegmentsByCampaignId ( string $campaignId ) : array | Returns a list of all segments for a campaign. | |
getSentCampaignsByClientID ( string[optional] $clientId = null ) : array | Returns a list of all campaigns that have been sent for a client | |
getSubscriber ( string $email, string[optional] $listId = null ) : array | Returns the details of a particular subscriber, including email address, name, active/inactive status and all custom field data. If a subscriber with that email address does not exist in that list, an empty record is returned. | |
getSubscribers ( string[optional] $listId = null, int[optional] $timestamp = null, int[optional] $page = 1, int[optional] $pageSize = 1000, string[optional] $orderField = 'date', string[optional] $orderDirection = 'asc' ) : array | Returns a list of all active subscribers for a list that have been added since the specified date. | |
getSuppressionListByClientId ( string[optional] $clientId = null, int[optional] $page = 1, int[optional] $pageSize = 1000, string[optional] $orderField = 'email', string[optional] $orderDirection = 'asc' ) : array | Returns all subscribers in the client-wide suppression list. | |
getSystemDate ( ) : string | Returns the server system time for the logged-in user's time zone. | |
getTemplate ( string $templateId ) : array | Returns a template's configuration detail | |
getTemplates ( string[optional] $clientId = null ) : array | Returns a list of all templates for a client. | |
getTimeOut ( ) : integer | Get the timeout | |
getTimezones ( ) : array | Returns all timezones for the logged-in user. | |
getUnsubscribes ( string[optional] $listId = null, int[optional] $timestamp = null, int[optional] $page = 1, int[optional] $pageSize = 1000, string[optional] $orderField = 'email', string[optional] $orderDirection = 'asc' ) : array | Contains a paged result representing all the unsubscribed subscribers for a given list. This includes their email address, name, date unsubscribed and any custom field data. You have complete control over how results should be returned including page sizes, sort order and sort direction. | |
getUserAgent ( ) : string | Get the useragent that will be used. Our version will be prepended to yours. | |
importSubscribers ( array $subscribers, string[optional] $listId = null ) : array | Imports "many" (CM only allows 100 max for this method) subscribers. Returns the rows that did not import. | |
sendCampaign ( string $campaignId, string $confirmationEmail, string[optional] $deliveryDate = null ) : string | Schedules an existing campaign for sending. The campaign must be imported with defined recipients. For campaigns with more than 5 recipients the user must have sufficient credits or their credit card details saved within the application for the campaign to be sent via the API. For campaigns with 5 recipients or less the user must have enough test campaigns remaining in their API account. | |
sendCampaignPreview ( string $campaignId, string $recipients, string[optional] $personalization = 'Fallback' ) : string | This sends a preview campaign based for a given campaign ID. | |
setClientId ( string $id ) | Set the default client ID to use | |
setListId ( string $id ) | Set the default list ID to use | |
setResponseFormat ( string[optional] $format = 'json' ) | Set response format | |
setSiteURL ( string $siteURL ) | Set the site URL | |
subscribe ( string $email, string[optional] $name = null, array[optional] $customFields = [], $resubscribe = true, string $listId = null ) : boolean | Adds a subscriber to an existing subscriber list. If $resubscribe is set to true, it will resubscribe the email in question if it's not active in the list | |
unsubscribe ( string $email, string[optional] $listId = null ) : string | Changes the status of an Active Subscriber to an Unsubscribed Subscriber who will no longer receive campaigns sent to that Subscriber List. | |
updateClientBasics ( string $companyName, string $country, string $timezone, string[optional] $clientId = null ) : string | Updates a client's basic settings. | |
updateList ( string $title, string[optional] $unsubscribePage = null, bool[optional] $confirmOptIn = false, string[optional] $confirmationSuccessPage = null, string[optional] $listId = null ) : string | Updates a subscriber list's details. | |
updateTemplate ( string $templateId, string[optional] $name = null, string[optional] $HTMLPageURL = null, string[optional] $zipFileURL = null, string[optional] $screenshotURL = null ) : boolean | Updates a template. |
Method | Description | |
---|---|---|
doCall ( string $url, array $parameters = null, string | boolean $method = 'GET', bool[optional] $secure = false, bool[optional] $expectJSON = true, bool[optional] $returnHeaders = false ) : string | Make the call | |
getPassword ( ) : string | Get the password | |
getSiteURL ( ) : string | Set the site URL | |
getUsername ( ) : string | Returns the username | |
setAPIKey ( string $key ) : void | Set API key | |
setPassword ( string $password ) | Set password | |
setTimeOut ( integer $seconds ) | Set the timeout | |
setUsername ( string $username ) | Set username |
public __construct ( string $URL, string $username, string $password, integer $timeOut = 60, null $clientId = null, null $listId = null ) | ||
$URL | string | The base URL of your CreateSend site. e.g. http://example.createsend.com/. |
$username | string | The username you use to login to Campaign Monitor. |
$password | string | The password you use to login to Campaign Monitor. |
$timeOut | integer | The default timeout |
$clientId | null | The default client ID to use throughout the class. |
$listId | null | The default list ID to use throughout the class. |
public addSubscriber ( string $email, string $name, array[optional] $customFields = [], bool[optional] $resubscribe = true, string[optional] $listId = null ) : boolean | ||
string | The email address of the new subscriber. | |
$name | string | The name of the new subscriber. If the name is unknown, an empty string can be passed in. |
$customFields | array[optional] | |
$resubscribe | bool[optional] | |
$listId | string[optional] | |
return | boolean |
public createCampaign ( string $name, string $subject, string $fromName, string $fromEmail, string $replyToEmail, string $HTMLContentURL, string $textContentURL, array $subscriberLists, array $subscriberListSegments = [], string[optional] $clientId = null ) : string | ||
$name | string | The name of the new campaign. This must be unique across all draft campaigns for the client. |
$subject | string | The subject of the new campaign. |
$fromName | string | The name to appear in the From field in the recipients email client when they receive the new campaign. |
$fromEmail | string | The email address that the new campaign will come from. |
$replyToEmail | string | The email address that any replies to the new campaign will be sent to. |
$HTMLContentURL | string | The URL of the HTML content for the new campaign. |
$textContentURL | string | The URL of the text content for the new campaign. |
$subscriberLists | array | An array of lists to send the campaign to. |
$subscriberListSegments | array | An array of Segment Names and their appropriate List ID’s to send the campaign to. |
$clientId | string[optional] | |
return | string |
public createCustomField ( string $name, string[optional] $type = 'text', array[optional] $options = [], string[optional] $listId = null ) : boolean | ||
$name | string | The name of the field. |
$type | string[optional] | |
$options | array[optional] | |
$listId | string[optional] | |
return | boolean |
public createList ( string $title, string[optional] $unsubscribePage = null, bool[optional] $confirmOptIn = false, string[optional] $confirmationSuccessPage = null, string[optional] $clientId = null ) : string | ||
$title | string | The title of the list. |
$unsubscribePage | string[optional] | |
$confirmOptIn | bool[optional] | |
$confirmationSuccessPage | string[optional] | |
$clientId | string[optional] | |
return | string |
public createSegment ( string $title, array[optional] $rules = [], string[optional] $listId = null ) : boolean | ||
$title | string | |
$rules | array[optional] | |
$listId | string[optional] | |
return | boolean |
public createTemplate ( string $name, string $HTMLPageURL, string[optional] $zipFileURL = null, string[optional] $screenshotURL = null, string[optional] $clientId = null ) : string | ||
$name | string | The name of the template. Maximum of 30 characters (will be truncated to 30 characters if longer). |
$HTMLPageURL | string | The URL of the HTML page you have created for the template. |
$zipFileURL | string[optional] | |
$screenshotURL | string[optional] | |
$clientId | string[optional] | |
return | string |
public deleteCampaign ( string $campaignId ) : boolean | ||
$campaignId | string | The ID of the campaign. |
return | boolean |
public deleteClient ( string[optional] $clientId = null ) : boolean | ||
$clientId | string[optional] | |
return | boolean |
public deleteCustomField ( string $name, string[optional] $listId = null ) : boolean | ||
$name | string | The name of the field. |
$listId | string[optional] | |
return | boolean |
public deleteList ( string $listId ) : boolean | ||
$listId | string | The ID of the list to delete |
return | boolean |
public deleteTemplate ( string $templateId ) : boolean | ||
$templateId | string | The ID of the template. |
return | boolean |
public existsClient ( string $clientId ) : boolean | ||
$clientId | string | The ID of the client. |
return | boolean |
public existsList ( string $listId ) : boolean | ||
$listId | string | The ID of the list. |
return | boolean |
public existsTemplate ( string $templateId ) : boolean | ||
$templateId | string | The ID of the template. |
return | boolean |
public getBouncedSubscribers ( string[optional] $listId = null, int[optional] $timestamp = null, int[optional] $page = 1, int[optional] $pageSize = 1000, string[optional] $orderField = 'date', string[optional] $orderDirection = 'asc' ) : array | ||
$listId | string[optional] | |
$timestamp | int[optional] | |
$page | int[optional] | |
$pageSize | int[optional] | |
$orderField | string[optional] | |
$orderDirection | string[optional] | |
return | array |
public getCampaignBounces ( string $campaignId, int[optional] $page = 1, int[optional] $pageSize = 1000, string[optional] $orderField = 'date', string[optional] $orderDirection = 'asc' ) : array | ||
$campaignId | string | The ID of the campaign you want data for. |
$page | int[optional] | |
$pageSize | int[optional] | |
$orderField | string[optional] | |
$orderDirection | string[optional] | |
return | array |
public getCampaignClicks ( string $campaignId, int[optional] $timestamp = null, int[optional] $page = 1, int[optional] $pageSize = 1000, string[optional] $orderField = 'date', string[optional] $orderDirection = 'asc' ) : array | ||
$campaignId | string | The ID of the campaign you want data for. |
$timestamp | int[optional] | |
$page | int[optional] | |
$pageSize | int[optional] | |
$orderField | string[optional] | |
$orderDirection | string[optional] | |
return | array |
public getCampaignOpens ( string $campaignId, int[optional] $timestamp = null, int[optional] $page = 1, int[optional] $pageSize = 1000, string[optional] $orderField = 'date', string[optional] $orderDirection = 'asc' ) : array | ||
$campaignId | string | The ID of the campaign you want data for. |
$timestamp | int[optional] | |
$page | int[optional] | |
$pageSize | int[optional] | |
$orderField | string[optional] | |
$orderDirection | string[optional] | |
return | array |
public getCampaignSummary ( string $campaignId ) : array | ||
$campaignId | string | The ID of the campaign you want data for. |
return | array |
public getCampaignUnsubscribes ( string $campaignId, int[optional] $timestamp = null, int[optional] $page = 1, int[optional] $pageSize = 1000, string[optional] $orderField = 'date', string[optional] $orderDirection = 'asc' ) : array | ||
$campaignId | string | The ID of the campaign you want data for. |
$timestamp | int[optional] | |
$page | int[optional] | |
$pageSize | int[optional] | |
$orderField | string[optional] | |
$orderDirection | string[optional] | |
return | array |
public getClientId ( ) : string | ||
return | string |
public getClients ( ) : array | ||
return | array |
public getCountries ( ) : array | ||
return | array |
public getCustomFields ( string[optional] $listId = null ) : array | ||
$listId | string[optional] | |
return | array |
public getDraftCampaignsByClientID ( string[optional] $clientId = null ) : array | ||
$clientId | string[optional] | |
return | array |
public getListStatistics ( string[optional] $listId = null ) : array | ||
$listId | string[optional] | |
return | array |
public getListsByCampaignId ( string $campaignId ) : array | ||
$campaignId | string | The ID of the campaign. |
return | array |
public getListsByClientId ( string[optional] $clientId = null ) : array | ||
$clientId | string[optional] | |
return | array |
public getResponseFormat ( ) : string | ||
return | string |
public getSegmentsByCampaignId ( string $campaignId ) : array | ||
$campaignId | string | The ID of the campaign. |
return | array |
public getSentCampaignsByClientID ( string[optional] $clientId = null ) : array | ||
$clientId | string[optional] | |
return | array |
public getSubscriber ( string $email, string[optional] $listId = null ) : array | ||
string | The emailaddress. | |
$listId | string[optional] | |
return | array |
public getSubscribers ( string[optional] $listId = null, int[optional] $timestamp = null, int[optional] $page = 1, int[optional] $pageSize = 1000, string[optional] $orderField = 'date', string[optional] $orderDirection = 'asc' ) : array | ||
$listId | string[optional] | |
$timestamp | int[optional] | |
$page | int[optional] | |
$pageSize | int[optional] | |
$orderField | string[optional] | |
$orderDirection | string[optional] | |
return | array |
public getSuppressionListByClientId ( string[optional] $clientId = null, int[optional] $page = 1, int[optional] $pageSize = 1000, string[optional] $orderField = 'email', string[optional] $orderDirection = 'asc' ) : array | ||
$clientId | string[optional] | |
$page | int[optional] | |
$pageSize | int[optional] | |
$orderField | string[optional] | |
$orderDirection | string[optional] | |
return | array |
public getSystemDate ( ) : string | ||
return | string |
public getTemplate ( string $templateId ) : array | ||
$templateId | string | The ID of the template. |
return | array |
public getTemplates ( string[optional] $clientId = null ) : array | ||
$clientId | string[optional] | |
return | array |
public getTimezones ( ) : array | ||
return | array |
public getUnsubscribes ( string[optional] $listId = null, int[optional] $timestamp = null, int[optional] $page = 1, int[optional] $pageSize = 1000, string[optional] $orderField = 'email', string[optional] $orderDirection = 'asc' ) : array | ||
$listId | string[optional] | |
$timestamp | int[optional] | |
$page | int[optional] | |
$pageSize | int[optional] | |
$orderField | string[optional] | |
$orderDirection | string[optional] | |
return | array |
public getUserAgent ( ) : string | ||
return | string |
public importSubscribers ( array $subscribers, string[optional] $listId = null ) : array | ||
$subscribers | array | |
$listId | string[optional] | |
return | array | The failed results. |
public sendCampaign ( string $campaignId, string $confirmationEmail, string[optional] $deliveryDate = null ) : string | ||
$campaignId | string | The ID of the campaign to send. |
$confirmationEmail | string | The email address where the confirmation email will be sent to. |
$deliveryDate | string[optional] | |
return | string |
public sendCampaignPreview ( string $campaignId, string $recipients, string[optional] $personalization = 'Fallback' ) : string | ||
$campaignId | string | The ID of the campaign to send. |
$recipients | string | This can be an e-mail address string, or an array of addresses. |
$personalization | string[optional] | |
return | string |
public setClientId ( string $id ) | ||
$id | string |
public setResponseFormat ( string[optional] $format = 'json' ) | ||
$format | string[optional] |
public setSiteURL ( string $siteURL ) | ||
$siteURL | string | The base URL of the site you use to login to Campaign Monitor. e.g. http://example.createsend.com/ |
public unsubscribe ( string $email, string[optional] $listId = null ) : string | ||
string | The emailaddress. | |
$listId | string[optional] | |
return | string |
public updateClientBasics ( string $companyName, string $country, string $timezone, string[optional] $clientId = null ) : string | ||
$companyName | string | The client company name. |
$country | string | This client's country. |
$timezone | string | Client timezone for tracking and reporting data. |
$clientId | string[optional] | |
return | string |
public updateList ( string $title, string[optional] $unsubscribePage = null, bool[optional] $confirmOptIn = false, string[optional] $confirmationSuccessPage = null, string[optional] $listId = null ) : string | ||
$title | string | The title of the list. |
$unsubscribePage | string[optional] | |
$confirmOptIn | bool[optional] | |
$confirmationSuccessPage | string[optional] | |
$listId | string[optional] | |
return | string |
public updateTemplate ( string $templateId, string[optional] $name = null, string[optional] $HTMLPageURL = null, string[optional] $zipFileURL = null, string[optional] $screenshotURL = null ) : boolean | ||
$templateId | string | The ID of the template. |
$name | string[optional] | |
$HTMLPageURL | string[optional] | |
$zipFileURL | string[optional] | |
$screenshotURL | string[optional] | |
return | boolean |