Docs
Execute Public Query
POST /documents/public/{token}/query/{blockId}
POST
/documents/public/{token}/query/{blockId}Required Tokens
No authentication required. This is a public endpoint — anyone with the link token can call it.
Executes a QueryBlock within a publicly shared document. Identical query execution pipeline as the authenticated endpoint, with two additional constraints enforced by the link:
- AllowedValues: If the link defines an
allowedValuesconstraint for a variable, any value submitted outside that whitelist is rejected with400. - VariableValues: The link's pre-set variable values are merged into the request for any variable the viewer did not supply.
Event scope is derived from the document the token points to — no auth token required.
Path Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| token | string | Optional | The URL-safe token from the public link. |
| blockId | string | Optional | The TipTap UniqueID of the `queryBlock` node. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| variables | object | Optional | Map of variable IDs to resolved values. Pass `{}` if no variable filters are needed. |
Response
Same shape as the authenticated Execute Query response — rows array for flat results, groups array when a GroupBy is set.