List template categories and industries
Lists the names you can pass to filter[category] and filter[industry]
when listing templates of one type. Both kinds come back in one list, the
categories first; read kind to tell which filter a name feeds.
filter[type] is required and today accepts only Doc, matching the one
kind of template the API lists. It is required rather than assumed so
that adding a type later cannot change what an existing call returns.
The list is Bonsai's fixed vocabulary, the same for every account, so it
is worth fetching once and keeping. It is not a list of names that have
templates behind them right now — filtering by one that does not will
return an empty page. Your own saved templates are all filed under the
My Templates category.
Filtering
filter[type]— required.Doc, the template type the names belong to.-
filter[kind]—categoryorindustry. Worth sending: each kind fits in a single page, the two together may not. filter[name]— partial, case-insensitive match on the name.
Query Parameters
- Type: integerpage[number]min:1
Page to return, starting at 1.
- Type: integerpage[size]min:1max:100
Records per page. Defaults to 25; anything above 100 is reduced to 100.
- enumfilter[type]const:Docrequired
The template type these names belong to.
- Type: "category" or "industry"enumfilter[kind]
Limit to the names one filter accepts.
- Type: stringfilter[name]
Partial, case-insensitive match on the name.
Responses
- application/json
- application/json
- application/json
- application/json
- application/json
curl 'https://app.hellobonsai.com/public-api/v1/template_categories?filter[type]=Doc&filter[kind]=industry&filter[name]=Design' \
--globoff \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
"data": [
{
"name": "Design",
"kind": "industry"
}
],
"meta": {
"request_id": "b1f0d2c4-7a9e-4c3b-8d5f-1e2a3b4c5d6e",
"pagination": {
"page": 1,
"page_size": 25,
"has_more": true
}
}
}