TypeScript
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
});
async function main() {
const response = await client.chats.listChatAuditLogs({
chat_id: '120363000000000000@g.us',
});
console.log(response);
}
main();curl -X GET 'https://api.periskope.app/v1/chats/120363000000000000@g.us/audit-logs' \
-H 'Authorization: Bearer YOUR_API_KEY'{
"from": 1,
"to": 20,
"count": 20,
"logs": [
{
"log_id": "00000000-0000-0000-0000-000000000000",
"org_id": "00000000-0000-0000-0000-000000000000",
"chat_id": "120363000000000000@g.us",
"action": "STATUS_CHANGED",
"performed_by": "user@example.com",
"type": "chat",
"old_record": {},
"new_record": {},
"timestamp": "2026-01-15T09:30:00.000Z"
}
]
}Chat APIs
Get Chat Audit Logs
Returns the audit trail of a chat — who changed what and when — newest first. Filter by performed_by and action, and restrict to a timestamp window.
TypeScript
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
});
async function main() {
const response = await client.chats.listChatAuditLogs({
chat_id: '120363000000000000@g.us',
});
console.log(response);
}
main();curl -X GET 'https://api.periskope.app/v1/chats/120363000000000000@g.us/audit-logs' \
-H 'Authorization: Bearer YOUR_API_KEY'{
"from": 1,
"to": 20,
"count": 20,
"logs": [
{
"log_id": "00000000-0000-0000-0000-000000000000",
"org_id": "00000000-0000-0000-0000-000000000000",
"chat_id": "120363000000000000@g.us",
"action": "STATUS_CHANGED",
"performed_by": "user@example.com",
"type": "chat",
"old_record": {},
"new_record": {},
"timestamp": "2026-01-15T09:30:00.000Z"
}
]
}Authorizations
Path Parameters
Unique id of the chat. For 1-1 chats, country code + number optionally suffixed with @c.us (e.g. 922222222222@c.us — the suffix is added automatically when omitted); for groups, the id ending with @g.us.
Minimum string length:
1Example:
"120363000000000000@g.us"
Query Parameters
Response
Paginated list of audit log entries, newest first
Was this page helpful?