Method Details
HTTP Methods:
GET
Response Format:
json
Requires Authentication?
Yes
Rate Limited?
Headers
Products:
Marketing
Required Scope:
Get all templates. Supports paging and filtering.
There's a new version of the HubSpot API
We're also working on a new documentation website, you're invited to check it out and give us your feedback.
HTTP Methods:
GET
Response Format:
json
Requires Authentication?
Yes
Rate Limited?
Headers
Products:
Marketing
Required Scope:
Get all templates. Supports paging and filtering.
Required Parameters | How to use | Description |
---|---|---|
OAuth access token or private app access token | Authorization: Bearer {token} header | Used to authenticate the request. Please see this page for more details about authentication. |
Parameter name | Description |
---|---|
limit | The number of items to return. Defaults to 20 |
offset | The offset set to start returning rows from. Defaults to 0. |
deleted_at | exact, gt, lt |
id | exact |
is_available_for_new_content | exact |
label | exact |
path | exact |
Parameter name | Type | Description |
---|---|---|
archived | bool | If True, the template will not show up in your dashboard, although the template will still be live |
category_id | string | The category of content this template can be used for. 1 for landing page, 2 for email, 3 for site page |
cdn_minified_url | string | For JavaScript and CSS, this is the URL of the version of the content that has been rendered, minified, and uploaded to our Content Delivery Network |
cdn_url | string | For non-HTML templates, the URL to the version of the template that has been rendered and uploaded to the HubSpot CDN |
deleted_at | long | When the template was deleted, in milliseconds since the epoch. Zero if the template was never deleted. Use a DELETE request to template the page, do not set this directly. |
folder | string | The folder this template lives in |
generated_from_layout_id | string | The id of the layout that generated this template |
id | string | The unique id of the template |
is_available_for_new_content | string | True if this template will show up in the content creation screen |
is_from_layout | string | True if template was generated by publishing a layout |
is_read_only | string | True if the template can only be read |
label | string | The label of the template as it shows up in the template builder |
path | string | The path of the template, as should be used for HubL include statements |
source | string | The markup of the template |
thumbnail_path | string | The thumbnail image of the template |
updated | long | When the template was last updated, in milliseconds since the epoch |
Example URL: http://api.hubapi.com/content/api/v2/templates
Example response:
{ "total_count":1, "objects":[ { "category_id":1, "cdn_minified_url":"", "cdn_url":"http://cdn2.hubspot.net/hub/62515/hub_generated/template_resource/1382477851647/custom/page/examples/simple-template.html", "deleted_at":0, "folder":"examples", "generated_from_layout_id":null, "id":359393980, "is_available_for_new_content":true, "is_from_layout":false, "is_read_only":false, "label":"Simple-template", "linked_style_id":"", "path":"custom/page/examples/simple-template.html", "portal_id":62515, "source":"The template source goes here", "template_type":"4", "thumbnail_width":154, "type":"", "updated":1382477851000, "updated_by":"" } ], "limit":20, "offset":0 }