curl --request DELETE \
--url https://api.hubapi.com/cms/source-code/2026-03/{environment}/content/{path} \
--header 'Authorization: Bearer <token>'This response has no body data.Delete a specific content file from the specified environment in your HubSpot CMS. This operation is useful for removing outdated or unnecessary files from your source code repository. Ensure you have the necessary permissions to perform this action.
curl --request DELETE \
--url https://api.hubapi.com/cms/source-code/2026-03/{environment}/content/{path} \
--header 'Authorization: Bearer <token>'This response has no body data.Supported products
Required Scopes
The access token received from the authorization server in the OAuth 2.0 flow.
The environment from which the content file will be deleted. This could refer to different stages such as development, staging, or production.
The specific path to the content file that you want to delete. This should be a valid path string.
.+Was this page helpful?