documentTemplates
Requires permission settings:documents:read.
The organization's document templates, optionally for one document type.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query DocumentTemplates {
documentTemplates {
id
name
createdAt
activeRevisionId
docType
handle
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query DocumentTemplates {\n documentTemplates {\n id\n name\n createdAt\n activeRevisionId\n docType\n handle\n }\n}"
}
EOF
Response:
{
"data": {
"documentTemplates": [
{
"id": "id",
"name": "string",
"createdAt": "2025-01-15T00:00:00Z",
"activeRevisionId": "id",
"docType": "string",
"handle": "string"
}
]
}
}
documentTemplates(
docType: String
): [DocumentTemplate!]!
Arguments
documentTemplates.docType ● String scalar
Only templates for this document type, e.g. invoice.
Type
DocumentTemplate object
A tenant's Liquid template for one document type. Printing uses its published revision.