Skip to main content
DELETE
/
cms
/
v3
/
source-code
/
{environment}
/
content
/
{path}
Delete a file
curl --request DELETE \
  --url https://api.hubapi.com/cms/v3/source-code/{environment}/content/{path} \
  --header 'Authorization: Bearer <token>'
This response has no body data.

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

Last modified on December 16, 2025