Docs

Create Variable

POST /documents/{documentId}/variables

POST/documents/{documentId}/variables

Required Tokens

FieldTypeRequiredDescription
BearerAuthorization: Bearer <api-key>OptionalYour API key. Pass it as the Bearer token on every request.
Event tokenx-Event-TokenOptionalRun **Get Tokens** in the Authorization folder.

Adds a named input parameter to a document. Variables can be referenced in QueryBlock filters using "$var:<variableId>" syntax to scope query results at render time.

Request Body

FieldTypeRequiredDescription
namestringRequiredDisplay label for the variable (e.g. "Collaborator", "Show Date").
variableTypestringRequiredType of the variable. One of: `Collaborator`, `Area`, `Activity`, `Crew`, `ResourceType`, `Date`, `Text`.
isMultiSelectbooleanRequiredWhen true, the variable accepts multiple values; filters auto-promote to `in`/`notIn`.
isRequiredbooleanRequiredWhen true, the query throws if the variable is not resolved at render time.
defaultValuesstringOptionalJSON array of default values (e.g. `["guid-1"]`). Always an array even for single-select.

Response

201 Created with no body.