---
title: "Delete a file"
method: DELETE
path: "/cms/source-code/2026-03/{environment}/content/{path}"
tags: ["Content"]
---

# Delete a file

`DELETE /cms/source-code/2026-03/{environment}/content/{path}`

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.

## Path parameters

- `environment` string, required
- `path` string, required

## Response `204`

No content

## Other responses

- `default` — An error occurred.

## Changes

- **2026-03-25** `62586336cea2` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/hubspot/apis/hubspot-api-specification/changes/cms/source-code/2026-03/:environment/content/:path/delete.md)

---

[API](https://skmtc.dev/hubspot/apis/hubspot-api-specification.md) · [All operations](https://skmtc.dev/hubspot/apis/hubspot-api-specification/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hubspot/hubspot-api-specification/revisions/62586336cea2/schema)
