Getting Templates

Learn to fetch templates using the Templates API.

Get all templates

Users can create multiple templates on the Hubspot CMS. By sending a GET request to the list templates endpoint, we can retrieve a list of all templates that have been created under our account.

The base URL for this endpoint is as follows:

https://api.hubspot.com/content/api/v2/templates

Request parameters

This endpoint doesn't require any request parameters. However, we can provide additional query parameters to filter our results. The following table provides details about these parameters:

Parameter

Type

Category

Description

limit

integer

optional

The maximum number of results required. By default, it is set to 100.

deleted_at

string

optional

Used to fetch templates deleted at a certain time

offset

integer

optional

The offset used to define the starting point from where the rows are fetched. By default, it is set to 0.

id

integer

optional

Used to fetch a template with a specific ID

is_available_for_new_content

boolean

optional

Set to true if we want to fetch templates that can be updated while creating pages

label

string

optional

The name of the template

path

string

optional

Used to fetch templates found on a specific path

Let’s fetch a list of templates ...