Basic

Download a file

Changed on

Downloads the byte contents of the file at the specified path in the specified environment.

get/cms/source-code/2026-09/{environment}/content/{path}

Request

  • Base URL
    https://api.hubapi.com
  • URL
    https://api.hubapi.com/cms/source-code/2026-09/{environment}/content/{path}
  • Auth
    OAuth 2
    Authorization code: https://app.hubspot.com/oauth/authorize
    Token URL: https://api.hubapi.com/oauth/v1/token scopes: content

Path parameters

environmentstring required

The environment from which to retrieve the content. It specifies the context or stage of the source code.

pathstring required

The path to the specific content file within the environment. It identifies the location of the file to be retrieved.

Response

An error occurred.

categorystring required

The error category

contextobject

Context about the error condition

correlationIdstring uuid required

A unique identifier for the request. Include this value with any error reports or support tickets

linksobject

A map of link names to associated URIs containing documentation about the error or recommended remediation steps

messagestring required

A human readable message describing the error along with remediation steps where appropriate

subCategorystring

A specific category that contains more specific detail about the error

Example response

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}

Changes