. Create an API key under API keys.API reference · Account
Audit log
Read the tenant audit log
/v1/auditSecurity-relevant and destructive events of the tenant, newest first, kept for 365 days. Recorded actions — account: auth.login (detail otp, totp or access_code), tenant.self_register, profile.update, payment.completed, payment.rejected, payment.unverifiable, expiry.reminder_sent, billing.notifications, ai_reply.update, ai_kb.upload, ai_kb.delete (knowledge documents and web pages for AI replies), ai_kb.faq (saved answers: detail add, edit, delete or answer); stores: store.connect, store.update, store.disconnect; access: api_key.create, api_key.revoke, agent.create, agent.revoke_sessions; privacy: consent.config, consent.bulk, privacy.export, privacy.erase, privacy.retention, contact.bulk_delete; devices: session.create, session.delete; messages: message.send (a message sent by a support agent; sends by the owner or through the API are in the message log instead), message.delete, message.edit, message.unsend; campaigns: blast.create, blast.start, blast.cancel, blast.delete; webhooks: webhook.create, webhook.update, webhook.delete; inbox: chat.assign, chat.resolve, and chat.view (a support agent opening a chat, recorded at most once an hour per agent and chat). target is usually the id of the object concerned and detail a short note; message text is never stored and phone numbers in chat ids are masked. Page through older events by passing next_before and next_before_id of the previous response as before and before_id; the cursor is a pair because a bulk action writes several events in the same millisecond.
Query parameters
limitintegerEvents to return (default 100); larger values are capped at 200beforeinteger | nullReturn only events older than this Unix time in milliseconds; usenext_beforeof the previous pagebefore_idinteger | nullTie-breaker forbefore: with an equal timestamp only events with a smaller id are returned; usenext_before_idof the previous page
Responses
- 200Events
Response fields
eventsarray of objectrequiredevents[].idintegerrequiredEvent id, increasing over timeevents[].tsintegerrequiredWhen it happened, Unix time in millisecondsevents[].actor_typestringrequiredadmin(the owner login or an API key),agent,system, or the payment provider (pakasir,creem,paypal)events[].actor_idstring | nullrequiredAgent id for agent actions;api-keyfor some actions done with an API keyevents[].actionstringrequiredevents[].targetstring | nullrequiredevents[].detailstring | nullrequiredevents[].ipstring | nullrequiredClient IP address, when knownnext_beforeinteger | nullrequiredCursor for the next page (before), or null when this was the last pagenext_before_idinteger | nullrequiredCursor for the next page (before_id), or null when this was the last page
- 401Missing, invalid or expired credentials
- 403Forbidden for a customer-service agent login (
Agent access is not allowed for this operation) and an API key restricted to specific sessions (KEY_SCOPE_FORBIDDEN)
curl "https://api.chatkomodo.com/v1/audit" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY"const res = await fetch('https://api.chatkomodo.com/v1/audit', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.CHATKOMODO_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.code}: ${data.error}`);
console.log(data);import os
import requests
res = requests.get(
"https://api.chatkomodo.com/v1/audit",
headers={
"Authorization": f"Bearer {os.environ['CHATKOMODO_API_KEY']}",
},
timeout=30,
)
res.raise_for_status()
print(res.json())<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$res = $client->request('GET', 'https://api.chatkomodo.com/v1/audit', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
]);
print_r(json_decode((string) $res->getBody(), true));{
"events": [
{
"id": 1,
"ts": 1767225600000,
"actor_type": "string",
"actor_id": "01JA5V6Q8M2H7G4K9P3T0R1S2X",
"action": "string",
"target": "+447700900123",
"detail": "string",
"ip": "string"
}
],
"next_before": 1767225600000,
"next_before_id": 1
}