Create a Variable

Creates a new Variable for the Tenant

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Creates a new Variable for the Tenant, for use as a field engine_name in Page submit or elsewhere.

Environment. A live_ key creates the variable in Production. Any other key, such as a test_ key, creates it in Sandbox. engine_name must be unique within that environment only, so the same engine_name can exist once in Production and once in Sandbox.

⚠️ Only types 1 (numeric), 2 (string), 3 (boolean) and 6 (list) can be created through this endpoint. Any other type, such as 5 (date), returns a 400.

Body Params
string
required

Name of the variable. Up to 120 characters.

string
required

Unique identifier for the variable, used to store/retrieve values. Lowercase letters, digits, underscores, and periods only; max 60 characters; no consecutive dots/underscores or trailing dot. Must be unique in your account within the key's environment (live_ key: Production; any other key: Sandbox).

int32
required

Type of values the variable holds: 1 numeric, 2 string, 3 boolean, 6 list. Other types, such as 5 (date) and 7 (json), can't be created through this endpoint.

string
list_values
array

Required when type is 6 (list). It is not saved for other types. An array of {"value": ..., "displayValue": ...} objects that defines the allowed options. Both values are stored as strings. You can also send the array as a JSON-encoded string.

list_values
Responses

401

The API key is not recognised or is inactive. The body is empty.

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json