Docs
Create Variable
POST /documents/{documentId}/variables
POST
/documents/{documentId}/variablesRequired Tokens
| Field | Type | Required | Description |
|---|---|---|---|
| Bearer | Authorization: Bearer <api-key> | Optional | Your API key. Pass it as the Bearer token on every request. |
| Event token | x-Event-Token | Optional | Run **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
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Required | Display label for the variable (e.g. "Collaborator", "Show Date"). |
| variableType | string | Required | Type of the variable. One of: `Collaborator`, `Area`, `Activity`, `Crew`, `ResourceType`, `Date`, `Text`. |
| isMultiSelect | boolean | Required | When true, the variable accepts multiple values; filters auto-promote to `in`/`notIn`. |
| isRequired | boolean | Required | When true, the query throws if the variable is not resolved at render time. |
| defaultValues | string | Optional | JSON array of default values (e.g. `["guid-1"]`). Always an array even for single-select. |
Response
201 Created with no body.