Add a member to a list.

We created a new viewing experience for our SMS API documentation. It's now all in one central location. Click here to check it out!




list_idID of the list to add toYES
msisdnMobile number of the memberYES
first_nameFirst name of the memberNO
last_nameLast name of the memberNO
field_nCustom field value where n is an integer between 1 and 10. You can also use the names of the custom fields you have chosen for your list, e.g. field.birthday.NO
countrycodeFormats msisdn for the given countrycodeNO


curl \
  -u 2e24c1cbdd987221e165d543f34b84bf:secret \
  -d list_id=1234567 \
  -d msisdn=61491570158 \
  -d 'first_name=Ayrton' \
  -d 'last_name=Senna' \
  -d 'field_1=1979-05-05' \
  -d 'field_2=Sydney'

JSON Response

  list_id: 24556,
  msisdn: "61491570156",
  first_name: "Ayrton",
  last_name: "Senna",
  fields: {
    birthday: "1968-10-05",
    top_score: "1000000"

XML Response





BAD_MOBILE400The mobile provided is invalid
BAD_MOBILE_COUNTRY400The country of the mobile provided is unavailable
OPTOUT400The recipient provided was previously opted-out
DUPLICATE_DELETED400The recipient provided was previously deleted

PHP Examples

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

  $api = new transmitsmsAPI('API_KEY', 'API_SECRET');
  $customFields = array('custom1_value', 'custom2_value');
  $result = $api->addToList(6195, '61400000000', 'firstname', 'lastname', $customFields);

  if ($result->error->code == 'SUCCESS') {
    echo "Member added";

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