The Access log API is a 90 day record of events that captures what an agent has accessed in your account (i.e. API calls that they've made), without necessarily updating, creating or deleting anything. We call these the “read” events and the Access log is your record of read events for your account.
In the API response you can see the full URL path of what was accessed, along with information about:
- Timestamp
- Query Params
- Http Method (Get/Post/…)
- User-ID of who made the request
- IP address of who made the request
This article explains how you authenticate against our APIs.
This is an example call to the Access log endpoint
https://[yoursubdomain].zendesk.com/api/v2/access_logs?filter[start]=2022-03-01T00:00:00Z&filter[end]=2022-03-12T00:00:00Z
filter[start] - should be older date
filter[end] - should be later date
Here’s an example of an JSON formatted response and its payload
{
"access_logs": [
{
"id: TYUHJKBHTYFGU",
"timestamp": "2022-03-11T00:10:34Z",
"user_id": 12345,
"ip_address": "00.00.000.85",
"url": "/api/services/access_logs",
"method": "GET"
},
{
"id:YTFCGVHBJKLJH",
"timestamp": "2022-03-11T00:13:38Z",
"user_id": 12345,
"ip_address": "00.00.000.85",
"url": "/api/services/access_logs",
"method": "GET"
},
{
"id:POIJUHGCTFYGUHJKHGF",
"timestamp": "2022-03-11T00:14:02Z",
"user_id": 12345,
"ip_address": "00.00.000.85",
"url": "/api/services/access_logs",
"method": "GET"
}
]
}
Supported filtering
By object
filter[start] - UTC Time stamp in format of yyyy-mm-ddThh:mm:ssZ
filter[end] - UTC Time stamp in format of yyyy-mm-ddThh:mm:ssZ
filter[path] - URL path. excluding query params.
Example
https://subdomain.zendesk.com/api/v2/access_logs?filter[start]=2022-08-01T15:04:05Z&filter[end]=2022-08-02T20:04:05Z&filter[path]=/api/v2/ticket_fields
By user
filter[start] - UTC Time stamp in format of yyyy-mm-ddThh:mm:ssZ
filter[end] - UTC Time stamp in format of yyyy-mm-ddThh:mm:ssZ
filter[user_id] - Number. Valid userID
Example
https://subdomain.zendesk.com/api/v2/access_logs?filter[start]=2022-08-01T15:04:05Z&filter[end]=2022-08-01T20:04:05Z&filter[user_id]=12345678
By timestamp
filter[start] - UTC Time stamp in format of yyyy-mm-ddThh:mm:ssZ
filter[end] - UTC Time stamp in format of yyyy-mm-ddThh:mm:ssZ
Example
https://subdomain.zendesk.com/api/v2/access_logs?filter[start]=2022-08-01T15:04:05Z&filter[end]=2022-08-01T20:04:05Z
Additional information about the API
- Requests are rate limited to 1000 requests per account per hour.
- Only agents with the Admin role will be able to get responses from the API.
- The API only captures data for the past 90 days.
- The API supports cursor-based pagination.