Skip to content

Templates

Fetch a list of all available templates. Use this if you want to create a fully customized UI for selecting templates. If you prefer to use our ready-made UI, you can use the Template Browser instead.

List templates

Request

Fetch templates available for the authenticated workspace.

Use filter[query] to search templates by title with a partial, case-insensitive match. Example: GET /api/templates?filter[query]=employment

Use filter[collection] to only return templates that belong to a specific collection ID. Example: GET /api/templates?filter[collection]=01965c7e-dc1e-7292-8199-8184041c1204

You can combine both filters in one request. Example: GET /api/templates?filter[query]=employment&filter[collection]=01965c7e-dc1e-7292-8199-8184041c1204

To include template collections in each template item, request include=collections.

Security
APIKey
Query
per_pageinteger, [ 1 .. 100 ]

Number of items per page.

Default:15
Example:per_page=20
pageinteger, >= 1

Page number to retrieve. Defaults to 1.

Default:1
Example:page=1
filter[query]string, <= 200 characters

Filter templates by a partial match against the localized title.

Example:filter[query]=employment
filter[collection]string, (uuid)

Filter templates to those belonging to the specified template collection. Use GET /api/template-collections to discover available collection IDs. Please note that a template may belong to multiple collections.

Example:filter[collection]=01965c7e-dc1e-7292-8199-8184041c1204
sortstring, <= 200 characters

Sort order for the template list. Use the field name for ascending order, or prefix with - for descending order (for example, title sorts by localized title ascending; -title sorts descending).

Allowed sort fields: title, created_at, and updated_at.

Multiple sorts can be combined in one parameter as a comma-separated list (for example, sort=title,-created_at).

When sorting by title, set sort_locale to control which translation is preferred for the comparison. If sort_locale is omitted, the API compares titles using a fallback across all supported languages.

Example:sort=title
sort_localestring

Locale code used when sorting by title: that language’s string is preferred when comparing titles (other languages are still used as fallback). Must be one of the supported Builder language codes. Ignored when the active sort does not use localized title.

Enum:"en""en-US""en-GB""en-AU""en-CA""en-IN""en-NZ""en-ZA""es""pt"
Example:sort_locale=en-GB
includestring

Comma delimited list of optional relationships to include.
Available includes: collections, jurisdictions, languages.

Example:include=collections,languages,jurisdictions
Headers
Acceptstringrequired

Specify the response format.

Value:"application/json"
curl -i -X GET \
  'https://api.builder.docue.com/api/templates?per_page=20&page=1&filter%5Bquery%5D=employment&filter%5Bcollection%5D=01965c7e-dc1e-7292-8199-8184041c1204&sort=title&sort_locale=en-GB&include=collections%2Clanguages%2Cjurisdictions' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <YOUR_API Key_HERE>'

Responses

Successful response with a list of templates.

Bodyapplication/json
dataArray of objects(App.Data.Template.TemplateData.TemplateData)
metaobject(ResponseMeta)
Response
{ "data": [ { … } ], "meta": { "status": { … }, "pagination": { … } } }