curl -X GET "https://app.cotool.ai/api/audit-logs" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"import requests
url = "https://app.cotool.ai/api/audit-logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.cotool.ai/api/audit-logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://app.cotool.ai/api/audit-logs")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.cotool.ai/api/audit-logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}[
{
"id": "<string>",
"timestamp": "<string>",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event": "<string>",
"actor": "<string>",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ipAddress": "<string>",
"chatId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"triggerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {},
"createdAt": "<string>",
"via": {
"appName": "<string>",
"connectionId": "<string>",
"clientId": "<string>",
"type": "mcp",
"publisher": "<string>"
},
"user": {
"email": "<string>"
},
"agent": {
"name": "<string>"
},
"trigger": {
"name": "<string>",
"type": "<string>"
}
}
]{
"error": "<string>",
"issues": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"missingPerms": [
"<string>"
]
}{
"error": "<string>",
"code": "<string>",
"details": {}
}List audit logs
Return a paginated list of audit logs filtered by query parameters such as userId, event type, date range, etc. Supports two pagination modes: limit/offset (default), and keyset cursors for continuous export — when a page is full, the X-Next-Cursor response header carries an opaque cursor for the next page; pass it back as the cursor query parameter. An absent header (or a short page) means there is no more data. Cursor pages stay equally fast at any depth, unlike large offsets.
curl -X GET "https://app.cotool.ai/api/audit-logs" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"import requests
url = "https://app.cotool.ai/api/audit-logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.cotool.ai/api/audit-logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://app.cotool.ai/api/audit-logs")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.cotool.ai/api/audit-logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}[
{
"id": "<string>",
"timestamp": "<string>",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event": "<string>",
"actor": "<string>",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ipAddress": "<string>",
"chatId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"triggerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {},
"createdAt": "<string>",
"via": {
"appName": "<string>",
"connectionId": "<string>",
"clientId": "<string>",
"type": "mcp",
"publisher": "<string>"
},
"user": {
"email": "<string>"
},
"agent": {
"name": "<string>"
},
"trigger": {
"name": "<string>",
"type": "<string>"
}
}
]{
"error": "<string>",
"issues": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"missingPerms": [
"<string>"
]
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Authorizations
Query Parameters
Opaque keyset-pagination cursor from the X-Next-Cursor response header of the previous page. Preferred over offset for continuous export: pages stay equally fast at any depth and an empty page means there is no more data. Mutually exclusive with offset; only supported with sortBy=timestamp.
1Response
Successful response
Was this page helpful?