Create a new list including the ability to add custom fields.




nameA unique name for the listYES
field_nA custom field name where n is an integer between 1 and 10. Once field names have been set they cannot be changed.NO


curl \
  -u 2e24c1cbdd987221e165d543f34b84bf:secret \
  -d name=Friends \
  -d field_1=Birthday \
  -d field_2=Town

JSON Response

  id: 34565988,
  name: "Special Offer Club",
  created: "2013-07-20 07:36:23",
  fields: {
    field_1: "birthday",
    field_2: "top score"

XML Response

  <name>Special Offer Club</name>
  <created>2013-07-20 07:36:23</created>
    <field_2>top score</field_2>

PHP Examples

  include '../../APIClient2.php';

  $api = new transmitsmsAPI('API_KEY', 'API_SECRET');
  $customFields = array('custom1', 'custom2');
  $result = $api->addList('LIST NAME', $customFields);

  if ($result->error->code == 'SUCCESS') {
    echo "List Created with ID {$result->id}";

  } else {
    echo "Error: {$result->error->description}";