Skip to main content

The account activity API allows you to retrieve login history and security activity related to your HubSpot account. To learn how to export this information from within the HubSpot account, check out HubSpot's Knowledge Base.

To retrieve an audit log of all user actions, make a GET request to /account-info/v3/activity/audit-logs. You can include the following query parameters to filter the results:

  • actingUserId: retrieve user-specific logs by specifying a user ID.
  • occurredAfter: retrieve logs starting from a specific timestamp.
  • occurredBefore: retrieve logs up until a specific timestamp.

The response will contain an object for each user action included in the audit log. This includes actions related to CRM object creation, property value updates, security activity, and more. Learn more about the data included in audit logs on HubSpot's Knowledge Base.

ParameterTypeDescription
idStringThe unique ID of the action event.
categoryStringThe type of user action.
subCategoryStringThe subcategory of user action.
actionStringThe action performed.
targetObjectIdStringThe ID of the object that the user performed the action on.
occurredAtStringThe timestamp of when the action was performed.
actingUserObjectAn object containing the user's ID and email address.

To retrieve an audit log of all user logins, make a GET request to /account-info/v3/activity/login. You can retrieve user-specific login history by including the userId query parameter followed by the user ID.

The response will include an object for each login attempt (successful and unsuccessful) made in the past 90 days, including login attempts to app.hubspot.com and the HubSpot mobile app.

ParameterTypeDescription
idStringThe unique ID of the login event.
loginAtStringThe timestamp of when login was attempted.
userIdIntegerThe ID of the user associated with the activity.
emailStringThe email address of the user associated with the activity.
loginSucceededBooleanWhether the login attempt was successful.
ipAddressStringThe IP address used for the login attempt.
locationStringThe location where the login was attempted.
userAgentStringUser agent information about the device used for login.
countryCodeStringThe country code of the location where the login was attempted.
regionCodeStringThe region code of the location where the login was attempted.

To retrieve a history of security-related user activity, make a GET request to /account-info/v3/activity/security. You can include the following query parameters to filter the results:

  • userId: retrieve user-specific history by specifying a user ID.
  • fromTimestamp: retrieve history starting from a specific datetime.
  • toTimestamp: retrieve history up until a specific datetime.

The response will include an object for each activity, including CRM exports, adding and removing users, and installing integrations. Learn more about the data included in security activity history on HubSpot's Knowledge Base.

ParameterTypeDescription
idStringThe unique ID of the login event.
createdAtStringThe timestamp of when activity occurred.
userIdIntegerThe ID of the user associated with the activity.
typeStringThe type of activity.
actingUserStringThe email address of the user associated with the activity.
objectIdStringThe ID of the object that the activity was performed on.
infoUrlStringThe URL of the page where the activity occurred.
locationStringThe location where the login was attempted.
ipAddressStringThe IP address used for the login attempt.
userAgentStringUser agent information about the device used for login.
countryCodeStringThe country code of the location where the login was attempted.
regionCodeStringThe region code of the location where the login was attempted.