You are here

function CampaignMonitor::listCreate in Campaign Monitor 5.2

Same name and namespace in other branches
  1. 6.3 lib/CMBase.php \CampaignMonitor::listCreate()
  2. 6.2 lib/CMBase.php \CampaignMonitor::listCreate()

*

Parameters

int $client_id (ClientID) ID of the client the list will be created for: * @param string $title (Title) Name of the new list * @param string $unsubscribePage (UnsubscribePage) URL of the page users will be * directed to when they unsubscribe from this list. * @param string $confirmOptIn (ConfirmOptIn) If true, the user will be sent a confirmation * email before they are added to the list. If they click the link to confirm * their subscription they will be added to the list. If false, they will be * added automatically. * @param string $confirmationSuccessPage (ConfirmationSuccessPage) URL of the page that * users will be sent to if they confirm their subscription. Only required when $confirmOptIn is true. * @see http://www.campaignmonitor.com/api/method/list-create/

File

lib/CMBase.php, line 1371

Class

CampaignMonitor

Code

function listCreate($client_id, $title, $unsubscribePage, $confirmOptIn, $confirmationSuccessPage) {
  if ($confirmOptIn == 'false') {
    $confirmationSuccessPage = '';
  }
  return $this
    ->makeCall('List.Create', array(
    'params' => array(
      'ClientID' => $client_id,
      'Title' => $title,
      'UnsubscribePage' => $unsubscribePage,
      'ConfirmOptIn' => $confirmOptIn,
      'ConfirmationSuccessPage' => $confirmationSuccessPage,
    ),
  ));
}