Skip to main content
PUT
/
content
/
api
/
v2
/
templates
/
{template_id}
Update the Template
curl --request PUT \
  --url https://api.hubapi.com/content/api/v2/templates/{template_id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "source": "<string>",
  "label": "<string>",
  "is_available_for_new_content": true
}
'
{
  "id": "<string>",
  "label": "<string>",
  "path": "<string>",
  "source": "<string>",
  "category_id": 123,
  "template_type": "<string>",
  "folder": "<string>",
  "is_available_for_new_content": true,
  "is_from_layout": true,
  "is_read_only": true,
  "cdn_url": "<string>",
  "cdn_minified_url": "<string>",
  "deleted_at": 123,
  "generated_from_layout_id": "<string>",
  "thumbnail_path": "<string>",
  "thumbnail_width": 123,
  "updated": 123,
  "updated_by": "<string>",
  "portal_id": 123,
  "archived": true,
  "linked_style_id": "<string>",
  "type": "<string>"
}

Path Parameters

template_id
string
required

Unique identifier for the template.

Body

application/json
source
string

The updated source code of the template

label
string

The label of the template

is_available_for_new_content
boolean

Whether template is available for new content

Response

200 - application/json

Template updated successfully

id
string

The unique id of the template

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

category_id
integer

The category of content this template can be used for. 1 for landing page, 2 for email, 3 for site page

template_type
string

The type of template

folder
string

The folder this template lives in

is_available_for_new_content
boolean

True if this template will show up in the content creation screen

is_from_layout
boolean

True if template was generated by publishing a layout

is_read_only
boolean

True if the template can only be read

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

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

deleted_at
integer

When the template was deleted, in milliseconds since the epoch. Zero if the template was never deleted.

generated_from_layout_id
string

The id of the layout that generated this template

thumbnail_path
string

The thumbnail image of the template

thumbnail_width
integer

The width of the thumbnail image

updated
integer

When the template was last updated, in milliseconds since the epoch

updated_by
string

Who last updated the template

portal_id
integer

The portal/account ID

archived
boolean

If True, the template will not show up in your dashboard, although the template will still be live

linked_style_id
string

ID of linked stylesheet

type
string

Template type field

Last modified on December 12, 2025