Audit Logs

List Audit Logs

Allowed For

  • Admins on accounts that have audit log access

Pagination

  • Cursor pagination (recommended)
  • Offset pagination

See Pagination.

Returns a maximum of 100 records per page.

get/api/v2/audit_logs

Query parameters

page[before]string

A pagination cursor that tells the endpoint which page to start on. It should be a meta.before_cursor value from a previous request. Note: page[before] and page[after] can't be used together in the same request.

page[after]string

A pagination cursor that tells the endpoint which page to start on. It should be a meta.after_cursor value from a previous request. Note: page[before] and page[after] can't be used together in the same request.

page[size]integer

Specifies how many records should be returned in the response. You can specify up to 100 records per page.

filter[source_type]string

Filter audit logs by the source type. For example, user or rule

filter[source_id]integer

Filter audit logs by the source id. Requires filter[source_type] to also be set

filter[actor_id]integer

Filter audit logs by the actor id

filter[ip_address]string

Filter audit logs by the ip address

filter[created_at]string

Filter audit logs by the time of creation. When used, you must specify filter[created_at] twice in your request, first with the start time and again with an end time

filter[action]string

Filter audit logs by the action

sortstring

Cursor pagination only. Sort audit logs. Default is sort=-created_at

Response

Success response

Example response

{
  "audit_logs": [
    {
      "action": "update",
      "action_label": "Updated",
      "actor_id": 1234,
      "actor_name": "Sameer Patel",
      "change_description": "Role changed from Administrator to End User",
      "created_at": "2012-03-05T11:32:44Z",
      "id": 498483,
      "ip_address": "209.119.38.228",
      "source_id": 3456,
      "source_label": "John Doe",
      "source_type": "user",
      "url": "https://company.zendesk.com/api/v2/audit_logs/498483.json"
    }
  ]
}

Changes