Advanced

Creates a file at the specified path in the specified environment. Accepts multipart/form-data content type. Throws an error if a file already exists at the specified path.

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

Request

  • Base URL
    https://api.hubapi.com
  • URL
    https://api.hubapi.com/cms/source-code/2026-03/{environment}/content/{path}
  • Auth
    • HTTP bearer
    • or API key in query parameter hapikey
    • or none

Path parameters

environmentstring required
pathstring required

Request body multipart/form-data

filestring binary

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

    • info

      api operation id post-/cms/source-code/2026-03/{environment}/content/{path}_create removed and replaced with post-/cms/source-code/2026-03/{environment}/content/{path}

    • info

      api tag Advanced added

    • info

      api tag Content removed

Some revisions have not been checked yet.