lists

Add merge field

Add a new merge field for a specific audience.

post/3.0/lists/{list_id}/merge-fields

Request

Path parameters

list_idstring required

The unique ID for the list.

Request body

default_valuestring

The default value for the merge field if null.

display_orderinteger

The order that the merge field displays on the list signup form.

help_textstring

Extra text to help the subscriber fill out the form.

namestring required

The name of the merge field (audience field).

publicboolean

Whether the merge field is displayed on the signup form.

requiredboolean

Whether the merge field is required to import a contact.

tagstring

The merge tag used for Mailchimp campaigns and adding contact information.

type'text' | 'number' | 'address' | 'phone' | 'date' | 'url' | 'imageurl' | 'radio' | 'dropdown' | 'birthday' | 'zip' required

The type for the merge field.

Example request

{
  "options": {
    "choices": [
      "First Choice",
      "Second Choice",
      "Third Choice"
    ]
  }
}

Response

default_valuestring

The default value for the merge field if null.

display_orderinteger

The order that the merge field displays on the list signup form.

help_textstring

Extra text to help the subscriber fill out the form.

list_idstring

The ID that identifies this merge field's audience'.

merge_field_limitinteger

The maximum number of merge fields this audience can hold. The limit is determined by the account's plan. Returned on POST responses only. Subtract total_items from this value to derive the remaining capacity.

merge_idinteger

An unchanging id for the merge field.

namestring

The name of the merge field (audience field).

publicboolean

Whether the merge field is displayed on the signup form.

requiredboolean

The boolean value if the merge field is required.

tagstring

The merge tag used for Mailchimp campaigns and adding contact information.

total_itemsinteger

The total number of merge fields on the audience after this field was created. Returned on POST responses only.

type'text' | 'number' | 'address' | 'phone' | 'date' | 'url' | 'imageurl' | 'radio' | 'dropdown' | 'birthday' | 'zip'

The type for the merge field.

Example response

{
  "merge_field_limit": 30,
  "options": {
    "choices": [
      "First Choice",
      "Second Choice",
      "Third Choice"
    ]
  },
  "total_items": 28
}

Changes

No recorded changes to this operation across all 1 revision of this API.