Create a custom variable

POST
/lists/custom-variable

Declares a custom variable on the account, so that contact keys with this name (technical or display name) land in it instead of being guessed. Declare your variables before loading contacts. This is the only way to create a COMPANY custom variable: the contact routes only create contact (lead) variables.

Naming rule: a technical name that is already a clean identifier (letter first, then letters, digits or _) is kept, with its first letter lowercased (basile_gmb_name stays basile_gmb_name). Anything else is camelCased with accents and symbols dropped (Ice breaker becomes iceBreaker). The stored name is returned.

The call is refused (422) when a variable with the same name already exists for this schema (comparison ignoring case, spaces, _ and -) or when the name is a standard field of the schema: it is therefore safe to call it every time and treat 422 as already existing. Variables are shared by all your lists and cannot be renamed or deleted through the API.

Authorization

apiKey
Authorization<token>

Your 48 character API key, sent as is (a Bearer prefix is tolerated). Create it at https://v3.emelia.io/settings/api.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/lists/custom-variable" \  -H "Authorization: YOUR_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "technicalName": "icebreaker",    "schema": "lead",    "displayName": "Icebreaker"  }'
{  "technicalName": "icebreaker",  "displayName": "Icebreaker",  "schema": "lead"}