Easymailing
Custom fields

Create a select custom field

POST /audiences/{audienceUuid}/list_fields/select

POST/audiences/{audienceUuid}/list_fields/select

Adds a custom field where each member can pick exactly one option from a list you define (country, plan, preferred language).

When to use: When the data is a closed list of choices and only one applies per person.

When not to use: If several choices can apply at once, use create_custom_field_multiselect. For free text, numbers or dates, use create_custom_field_simple.

Side effects: Counts against the number of custom fields per audience allowed by the plan.

Permissions: Requires the manager role or higher, or the marketing.audiences.write capability.

Authorization

X-Auth-Token<token>

Value for the X-Auth-Token header parameter.

In: header

Path Parameters

audienceUuid*string

UUID of the audience to add the field to. If the account has several audiences, confirm with the user which one. Get it from list_audiences.

Request Body

The new ListField resource

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://api.easymailing.com/audiences/0df14405-90ff-4287-b3e4-ef088901ee6f/list_fields/select" \  -H "X-Auth-Token: YOUR_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "expanded": false,    "options": [      {        "value": "string",        "is_default": false,        "translations": [          {            "locale": "string",            "name": "string"          }        ]      }    ],    "tag": "string",    "required": true,    "public": true,    "translations": [      {        "locale": "string",        "label": "string",        "default_value": "string",        "help_text": "string"      }    ]  }'
{  "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",  "tag": "string",  "template_tag": "string",  "public": true,  "required": true,  "type": "list.field.type.text",  "translations": [    {      "label": "string",      "default_value": "string",      "help_text": "string",      "locale": "string"    }  ],  "options": {    "property1": "string",    "property2": "string"  },  "list_field_options": [    {      "value": "string",      "translations": [        {          "name": "string",          "locale": "string"        }      ]    }  ],  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}