Advanced

Export CMS audit logs based on specified settings. This endpoint allows users to export logs in various formats such as XLS, XLSX, or CSV. The request requires specifying details like the email, portal ID, and recipient user IDs. This is useful for auditing and monitoring changes within the CMS.

post/cms/audit-logs/2026-09/export

Request

  • Base URL
    https://api.hubapi.com
  • URL
    https://api.hubapi.com/cms/audit-logs/2026-09/export
  • Auth
    OAuth 2
    Authorization code: https://app.hubspot.com/oauth/authorize
    Token URL: https://api.hubapi.com/oauth/v1/token scopes: content

Request body

emailstring required

A string specifying the email address to which notifications about the export should be sent.

format'CSV' | 'XLS' | 'XLSX' required

A string specifying the format of the export file. Valid values include 'XLS', 'XLSX', and 'CSV'.

partitioninteger

An integer used for partitioning the export data, if applicable.

portalIdinteger required

An integer representing the ID of the portal from which the audit logs are being exported.

recipientUserIdsinteger[] required

An array of integers specifying the IDs of users who should receive the exported file.

shouldMarkExportFileAsSensitiveboolean required

A boolean indicating whether the export file should be marked as sensitive.

typestring required

A string indicating the type of export being performed.

userIdinteger

An integer representing the ID of the user initiating the export.

userTimeZonestring

A string representing the time zone of the user initiating the export.

Response

No content

Changes

    • info

      api operation id post-/cms/audit-logs/2026-09/export_/cms/audit-logs/2026-09/export removed and replaced with post-/cms/audit-logs/2026-09/export_/cms/audit-logs/2026-03/export

    • info

      the endpoint scheme security private_apps was removed from the API