Templates

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] — category or industry. Worth sending: each kind fits in a single page, the two together may not.
  • filter[name] — partial, case-insensitive match on the name.
get/public-api/v1/template_categories

Request

  • Base URL
    https://app.hellobonsai.com
  • URL
    https://app.hellobonsai.com/public-api/v1/template_categories
  • Auth
    • OAuth 2
      Authorization code: https://app.hellobonsai.com/oauth/authorize
      Token URL: https://app.hellobonsai.com/oauth/token
    • or HTTP bearer

Query parameters

page[number]integer

Page to return, starting at 1.

page[size]integer

Records per page. Defaults to 25; anything above 100 is reduced to 100.

filter[type]'Doc' required

The template type these names belong to.

filter[kind]'category' | 'industry'

Limit to the names one filter accepts.

filter[name]string

Partial, case-insensitive match on the name.

Response

A page of category and industry names, categories first.

Example response

{
  "data": [
    {
      "name": "Design",
      "kind": "industry"
    }
  ],
  "meta": {
    "request_id": "b1f0d2c4-7a9e-4c3b-8d5f-1e2a3b4c5d6e",
    "pagination": {
      "page": 1,
      "page_size": 25,
      "has_more": true
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.