Overview

You can use this request to create a new subscription list. Subscription lists are used to send email campaigns to groups of contacts. A contact will have a subscription status on a list, denoting whether or not the contact should receive messages when a campaign is sent to that list.

The Method

Your method must be structured as follows:

Parameters

Properties

Responses

Code Samples

PHP (using REST API):

$json = '
{
"name":"This is the name of the list",
"owner_email":"michael@email.com"
}
';
$url = '(Your URL)/api/2.0/lists';
$method = 'POST';
$cSession = curl_init();
$headers = array();
$auth = base64_encode($username . ':' . $apikey);
$headers[] = 'Authorization: Basic ' . $auth;
curl_setopt($cSession, CURLOPT_URL, $url);
curl_setopt($cSession, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cSession, CURLOPT_HEADER, false);
curl_setopt($cSession, CURLOPT_CUSTOMREQUEST, strtoupper($method));
curl_setopt($cSession, CURLOPT_POSTFIELDS, $json);
$headers[] = 'Content-Type: application/json';
curl_setopt($cSession, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($cSession);
curl_close($cSession);