POST/user/audit-log

Fetch organization audit logs

Retrieves audit logs for user activity in your organization. Supply a date_range with start_at and end_at to define the period, and use the optional filters to narrow results. Access is limited to users with the owner or admin role.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

5 body fields

Audit log filters and pagination settings. Include date_range with both start_at and end_at to specify the date interval.

activity_typearray<string>optional

Array of activity types to filter the audit logs

date_rangeobjectrequired

Date interval for the logs; include start_at and end_at in yyyy-MM-dd format.

page_numberintegeroptional

Page number of results.

Default:1
page_sizeintegeroptional

Number of logs per page. Must be between 10 and 500.

Default:100
user_emailarray<string>optional

Array of user emails to filter the activity logs.

5 status codes
200Returns audit log entries with activity, IP address, acting user, status code, response time, timestamp, and source, along with pagination details including the current page, page size, total results, and total pages.
dataarray<object>required
paginationobjectrequired

Details about pagination of the audit logs.

400Returned when the request is invalid.

One documented failure

  • user_not_found

    User not found.

errorobjectrequired
401Returned when the API key or bearer token is missing or invalid.

One documented failure

  • invalid_api_key

    API key supplied with request is invalid

errorobjectrequired
403Returned when the account has unpaid dues or the authenticated user lacks the required role permissions.

One documented failure

  • unauthorized

    You don't have access to this feature. Please contact your organization owner.

errorobjectrequired
422Returned when request validation fails.

One documented failure

  • invalid_parameter

    body must have required property '<field>'

errorobjectrequired

Error handling

A 400 is returned when the request is invalid, and a 422 is returned when request validation fails; date_range must include start_at and end_at in yyyy-MM-dd format. A 401 is returned when the API key or bearer token is missing or invalid. A 403 is returned if the account has unpaid dues or the authenticated user's role is not owner or admin.