---
title: "Upload a file"
method: POST
path: "/cms/source-code/2026-03/{environment}/content/{path}"
tags: ["Content"]
deprecated: true
---

# Upload a file

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

> **Deprecated.**

Upload a content file to a specified environment and path in the HubSpot CMS. This endpoint allows you to add new content files to your HubSpot account by specifying the environment and path where the file should be stored. The request must include a file in binary format.

## Path parameters

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

## Response `200`

successful operation

- CmsSourceCodeAssetFileMetadata
  - `archivedAt` integer — Timestamp of when the object was archived (deleted).
  - `children` string[] — If the object is a folder, contains the filenames of the files within the folder.
  - `createdAt` integer, required — Timestamp of when the object was first created.
  - `folder` boolean, required — Determines whether or not this path points to a folder.
  - `hash` string — A unique identifier for the file's content, used to verify data integrity.
  - `id` string, required — The path of the file in the CMS Developer File System.
  - `name` string, required — The name of the file.
  - `updatedAt` integer, required — Timestamp of when the object was last updated.

## 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/post.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)
