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 allowedValues constraint for a variable, any value submitted outside that whitelist is rejected with 400.
  • 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

FieldTypeRequiredDescription
tokenstringOptionalThe URL-safe token from the public link.
blockIdstringOptionalThe TipTap UniqueID of the `queryBlock` node.

Request Body

FieldTypeRequiredDescription
variablesobjectOptionalMap 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.