Easymailing
Custom fields

Update a select custom field

PUT /audiences/{audienceUuid}/list_fields/{uuid}/select

PUT/audiences/{audienceUuid}/list_fields/{uuid}/select

Changes the tag, flags, texts or options of a select custom field. Fields you do not send are not kept: required and public go back to false, so send the complete definition. The options you send replace all the current ones.

When to use: To add, rename or remove the choices of a one-choice field, or to rename the field.

When not to use: For a multiselect field, use update_custom_field_multiselect; for a simple one, update_custom_field_simple.

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 the custom field belongs to. Get it from list_audiences.

uuid*string

UUID of the custom field. Get it from list_audience_custom_fields.

Request Body

The updated 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 PUT "https://api.easymailing.com/audiences/0df14405-90ff-4287-b3e4-ef088901ee6f/list_fields/5e8a1c30-2b94-4f6d-a7c1-9d0e4b3f8a15/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"}