There's a new version of the HubSpot API

As of November 30, 2022, HubSpot API keys are no longer a supported authentication method for accessing HubSpot APIs. Instead, you should use a private app access token or OAuth to authenticate API calls. Learn more about this change and how to migrate an API key integration to use a private app instead.

Get the layout by ID

Last updated May 31, 2023

GET /content/api/v2/layouts/:layout_id

Method Details

HTTP Methods:

GET

Response Format:

json

Requires Authentication?

Yes

Rate Limited?

Yes

Headers

User-Agent

Products:

Marketing

Required Scope:

content

Get the details for a specific layout, by ID.

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.
layout_id Used in the request URL Unique identifier for a particular blog

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 delete the layout - 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
custom_head string Custom HTML added to the head of pages using the layout
include_default_custom_css boolean Flag to include the Primary CSS stylesheet. Defaults to use value from Site Settings. Can be overridden at the page level.
enable_domain_stylesheet boolean Flag to include the domain stylesheets for a page using the layout. Can be overridden at the page level.
attached_stylesheets array List of references to stylesheets that are attached directly to the layout. Can be overridden at the page level.