Skip to main content
POST
/
cms
/
v3
/
source-code
/
{environment}
/
validate
/
{path}
Validate the contents of a file
curl --request POST \
  --url https://api.hubapi.com/cms/v3/source-code/{environment}/validate/{path} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file'
{
  "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"
  }
}

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
path
string
required

Body

multipart/form-data
file
file

Response

default - */*
category
string
required

The error category

correlationId
string<uuid>
required

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

Example:

"aeb5f871-7f07-4993-9211-075dc63e7cbf"

message
string
required

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

Example:

"An error occurred"

context
object

Context about the error condition

Example:

"{invalidPropertyName=[propertyValue], missingScopes=[scope1, scope2]}"

errors
object[]

further information about the error

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

subCategory
string

A specific category that contains more specific detail about the error

Last modified on February 12, 2026