Contacts & Lists

Add Field to List

Add or update custom fields on an existing list

post/add-field-to-list.json

Request

  • Base URL
    https://api.transmitsms.com
  • Auth
    HTTP basic

Request body application/x-www-form-urlencoded

list_idinteger required

ID of the list to add to.

field_nstring[] required

Custom field names. Firstname and lastname are created by default. There can be up to 10 extra custom fields. 'n' is an integer between 1 and 10.

response_stylestring

Indicates the response style. If set to response_style='array', custom field lists are returned as an array.

Example request

{
  "list_id": 12345,
  "response_style": "array"
}

Response

Successful response

custom_nstring[]

Custom field names created.

idinteger

ID of the list added to.

Example response

{
  "custom_n": [
    "email",
    "phone"
  ],
  "id": 12345,
  "error": {
    "code": "MISSING_PARAM",
    "header": 400,
    "description": "Field parameter is missing (e.g., field_n)"
  }
}

Changes

No recorded changes to this operation across all 2 revisions of this API.