Skip to main content
GET
/
cms
/
v3
/
source-code
/
{environment}
/
content
/
{path}
Download a file
curl --request GET \
  --url https://api.hubapi.com/cms/v3/source-code/{environment}/content/{path} \
  --header 'Authorization: Bearer <token>'
"<string>"

Supported products

Requires one of the following products or higher.
Marketing HubMarketing Hub -Free
Sales HubSales Hub -Free
Service HubService Hub -Free
Content HubContent Hub -Starter
Data HubData Hub -Free

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

environment
string
required

The environment of the file ("draft" or "published").

path
string
required

The file system location of the file.

Response

File content retrieved successfully

The response is of type file.

Last modified on December 16, 2025