Content

Upload a file

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.

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

Path parameters

environmentstring required

The environment in which the content file will be uploaded. Typically represents different stages like 'staging' or 'production'.

pathstring required

The specific path within the environment where the content file will be stored. This should be a valid path string.

Response

successful operation

archivedAtinteger

Timestamp of when the object was archived (deleted).

childrenstring[]

If the object is a folder, contains the filenames of the files within the folder.

createdAtinteger required

Timestamp of when the object was first created.

folderboolean required

Determines whether or not this path points to a folder.

hashstring

A unique identifier for the file's content, used to verify data integrity.

idstring required

The path of the file in the CMS Developer File System.

namestring required

The name of the file.

updatedAtinteger required

Timestamp of when the object was last updated.

Changes