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.

List layouts

Last updated May 15, 2023

GET /content/api/v2/layouts

Method Details

HTTP Methods:

GET

Response Format:

json

Requires Authentication?

Yes

Rate Limited?

Yes

Headers

User-Agent

Products:

Marketing

Required Scope:

content

Get all layouts for an account. 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.

Optional query string filters & options

If a parameter supports a filter type of 'gt', that means you can append a double underscore to the parameter name to find all items greater than the value. For example, the following query will find all items created than the 'updated' time:
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.
category_id exact
created exact, range, gt, gte, lt, lte
deleted_at Use a DELETE request to delete the layout - do not set this directly.
id exact, in
label exact
path exact
custom_head Custom HTML added to the head of pages using the layout.
include_default_custom_css Flag to include the Primary CSS stylesheet. Defaults to use value from Site Settings. Can be overridden at the page level.
enable_domain_stylesheet Flag to include the domain stylesheets for a page using the layout. Can be overridden at the page level.
attached_stylesheets List of references to stylesheets that are attached directly to the layout. Can be overridden at the page level.

JSON Fields returned in the response

Parameter name Type Description
body_class string The CSS class applied to the layout body
body_css_id string The CSS id applied to the layout body
category_id string The category the layout applies to
created long When the layout was first created, in milliseconds since the epoch
deleted_at long When the layout was deleted, in milliseconds since the epoch. Zero if the layout was never deleted. Use a DELETE request to layout the page, do not set this directly.
id string The unique id of the layout
label string The name of the layout that shows up in template builder
layout_data string A complex JSON structure with the actual data for the layout
path string The path of the layout as it shows up in template builder
updated long When the layout was last updated, in milliseconds since the epoch