Content
Update a file
Update the content file in the specified environment and path within the HubSpot CMS. This operation allows you to upload a new file to replace the existing content at the given path. It is useful for managing and updating your website's source code files directly through the API.
put/cms/source-code/2026-03/{environment}/content/{path}
Path parameters
environmentstring required
The environment in which the content file is located, such as 'staging' or 'production'.
pathstring required
The path to the content file that you want to update. This should be a string representing the file's location.
Response
successful operation