Advanced
Create a file
Changed onCreates 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-09/{environment}/content/{path}
Request
- Base URLhttps://api.hubapi.com
- URLhttps://api.hubapi.com/cms/source-code/2026-09/{environment}/content/{path}
- AuthOAuth 2Authorization code: https://app.hubspot.com/oauth/authorizeToken URL: https://api.hubapi.com/oauth/v1/token scopes: content
Path parameters
environmentstring required
The environment in which the content file will be uploaded, such as 'staging' or 'production'.
pathstring required
The specific path where the content file will be stored within the environment.
Request body multipart/form-data
Response
successful operation
Changes
- info
the endpoint scheme security
private_appswas removed from the API
- info