Audit Log API
A read-only HTTP API to fetch your organization's audit log from external applications. Each request is scoped to the organization that owns the API key.
Authentication
All requests must include a Bearer token in the Authorization header. Tokens start with the prefix pck_ and are tied to a single organization. Revoked tokens return 401.
Authorization: Bearer pck_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxEndpoint
GET https://hnoqvrgxarrdarowlube.supabase.co/functions/v1/public-audit-logQuery parameters
| Name | Type | Description |
|---|---|---|
| start | required | Inclusive start date (YYYY-MM-DD, UTC). |
| end | required | Inclusive end date (YYYY-MM-DD, UTC). |
| action | optional | Filter by action code (see list below). |
| limit | optional | Max items per page (1–1000, default 100). |
| offset | optional | Pagination offset (default 0). |
Example request
curl -H "Authorization: Bearer pck_xxx..." \
"https://hnoqvrgxarrdarowlube.supabase.co/functions/v1/public-audit-log?start=2026-01-01&end=2026-01-31&action=message_created"Example response
{
"organization_id": "8a1b...",
"start": "2026-01-01",
"end": "2026-01-31",
"total": 312,
"limit": 100,
"offset": 0,
"items": [
{
"id": "f0c7...",
"created_at": "2026-01-15T09:23:11.482Z",
"action": "message_created",
"user_email": "alice@example.com",
"agent_name": "Supplier Radar",
"data": {
"message_id": "...",
"conversation_id": "...",
"agent_id": "...",
"dust_agent_sid": "..."
}
}
]
}Action codes
agent_added— An agent was activated for the organization.conversation_created— A user started a new conversation.message_created— A user sent a message in a conversation.feedback_given— A user gave thumbs up / down feedback on a message.
Rate limits
Each API key is limited to 60 requests per minute. Exceeding the limit returns HTTP 429.
Errors
- 400 — Missing or invalid start / end parameters.
- 401 — Missing, malformed, or revoked Bearer token.
- 405 — Method not allowed (only GET is supported).
- 429 — Rate limit exceeded (60 requests/minute per key).
- 500 — Unexpected server error.
How to get a key
An organization administrator creates API keys from the admin console of Pivotal Chat. The token is displayed only once at creation — store it securely. Keys can be revoked at any time and immediately stop working.