Supported products
Supported products
Requires one of the following products or higher.
Required Scopes
Required Scopes
Query audit logs
To retrieve audit logs, make aGET request to /cms/v3/audit-logs/.
For example, the following request retrieves audit logs for landing page updates made by a specific user:
| Parameter | Type | Description |
|---|---|---|
after | String | Timestamp after which audit logs will be returned. Use for filtering by time range (e.g., 2024-01-01T00:00:00Z). |
before | String | Timestamp before which audit logs will be returned. Use for filtering by time range. |
eventType | String | Comma-separated list of event types to filter by. See event types below. |
limit | String | The number of logs to return per page. |
objectId | String | Comma-separated list of object IDs to filter by. |
objectType | String | Comma-separated list of object types to filter by. See object types below. |
sort | String | The sort direction for the audit logs. Can only sort by timestamp. Use timestamp for ascending or -timestamp for descending. |
userId | String | Comma-separated list of HubSpot user IDs to filter by. To retrieve user IDs, make a GET request to /settings/v3/users/. |
| Field | Type | Description |
|---|---|---|
objectId | String | The ID of the content object that was changed. |
objectName | String | The internal name of the object in HubSpot. |
objectType | String | The type of object. See object types below. |
event | String | The type of event. See event types below. |
userId | String | The ID of the user who made the change. |
fullName | String | The name of the user who made the change. |
timestamp | String | The timestamp when the event occurred (ISO 8601 format). |
meta | Object | Supplementary metadata about the event. For example, HubDB events may include rows deleted/updated, and Content Settings events include the specific fields that were changed. |
Pagination
Results are paginated using cursor-based pagination. To retrieve the next page of results, include anafter query parameter with the value from the paging.next object in the response.
For example, in the example response above, the after value is 1710081138123. To retrieve the next page of results, you would make a GET request to /cms/v3/audit-logs/?objectType=BLOG_POST&limit=10&after=1710081138123.
Example use cases
Find recent changes to a specific page
To find all changes made to a specific page, use theobjectId parameter:
Find all deleted content in a time range
To find all content that was deleted within a specific time window:Audit changes by a specific user
To see all changes made by a specific user across all content types:Event types
TheeventType parameter accepts the following values. You can specify multiple values as comma-separated strings (e.g., eventType=CREATED,UPDATED).
| Event Type | Description |
|---|---|
CREATED | An object has been created. |
DELETED | An object has been deleted or disconnected. |
PUBLISHED | An object has been published. |
UNPUBLISHED | An object has been unpublished. |
UPDATED | An object has been updated. |
Object types
TheobjectType parameter accepts the following values. You can specify multiple values as comma-separated strings (e.g., objectType=BLOG,LANDING_PAGE).
| Object Type | Description |
|---|---|
BLOG | Changes made to your blog settings in your account settings. |
BLOG_POST | Blog posts associated with your blog(s). |
CONTENT_SETTINGS | Changes made to your website settings in your account settings. The values changed will appear in the meta JSON object. |
CTA | Changes made to your Calls-to-action (CTAs). |
DOMAIN | Changes made to the domains connected in your Domains & URLs settings in your account settings. |
EMAIL | Changes made to emails in the email editor. |
FILE | Changes made to files in the files tool. |
GLOBAL_MODULE | Changes made to global modules. |
HUBDB_TABLE | Changes made to HubDB tables. |
KNOWLEDGE_BASE | Changes made to your knowledge base settings in your account settings. |
KNOWLEDGE_BASE_ARTICLE | Changes made to knowledge base articles in the content editor. |
LANDING_PAGE | Changes made to landing pages in the content editor. |
MODULE | Changes made to modules. |
SERVERLESS_FUNCTION | Changes made to serverless functions. |
TEMPLATE | Changes made to templates. |
THEME | Changes made to Theme Settings and when Themes are created. |
URL_MAPPING | Changes made to your URL Redirects in URL Redirects settings in your account settings. |
WEBSITE_PAGE | Changes made to website pages in the content editor. |