curl --request GET \
--url https://api.hubapi.com/cms/source-code/2026-03/{environment}/metadata/{path} \
--header 'Authorization: Bearer <token>'{
"createdAt": 123,
"folder": true,
"id": "<string>",
"name": "<string>",
"updatedAt": 123,
"archivedAt": 123,
"children": [
"<string>"
],
"hash": "<string>"
}Retrieve metadata for a specific file or folder within a specified environment in the HubSpot CMS. This endpoint is useful for obtaining detailed information about content files, such as their creation and update timestamps, and other metadata attributes.
curl --request GET \
--url https://api.hubapi.com/cms/source-code/2026-03/{environment}/metadata/{path} \
--header 'Authorization: Bearer <token>'{
"createdAt": 123,
"folder": true,
"id": "<string>",
"name": "<string>",
"updatedAt": 123,
"archivedAt": 123,
"children": [
"<string>"
],
"hash": "<string>"
}Supported products
Required Scopes
The access token received from the authorization server in the OAuth 2.0 flow.
The environment in which the file or directory is located, such as 'staging' or 'production'.
The path to the specific file or folder for which metadata is being retrieved.
.+A comma-separated list of specific metadata properties to include in the response.
successful operation
Timestamp of when the object was first created.
Determines whether or not this path points to a folder.
The path of the file in the CMS Developer File System.
The name of the file.
Timestamp of when the object was last updated.
Timestamp of when the object was archived (deleted).
If the object is a folder, contains the filenames of the files within the folder.
A unique identifier for the file's content, used to verify data integrity.
Was this page helpful?