Skip to main content
Audit log endpoints expose the admin action log for a guild. All endpoints require admin-level permissions (ADMINISTRATOR). The standard endpoint is rate-limited to 30 requests per minute and the export endpoint to 10 requests per minute per IP.

GET /guilds/:id/audit-log

Returns paginated audit log entries with optional filters. Authentication: API key or JWT Bearer token required.

Path parameters

id
string
required
The Discord guild ID.

Query parameters

action
string
Filter by action type (for example, config.update).
userId
string
Filter by the admin user ID who performed the action.
startDate
string
ISO 8601 timestamp lower bound.
endDate
string
ISO 8601 timestamp upper bound.
limit
integer
Items per page. Default: 25. Maximum: 100.
offset
integer
Number of records to skip. Default: 0.

Response fields

entries
array
List of audit log entries.
total
integer
Total number of matching entries.
limit
integer
Items per page used in this response.
offset
integer
Offset used in this response.

Example

curl -H "x-api-secret: YOUR_SECRET" \
  "https://volvox.bot/api/v1/guilds/987654321098765432/audit-log?action=config.update&limit=10"
{
  "entries": [
    {
      "id": 301,
      "guild_id": "987654321098765432",
      "user_id": "222000222",
      "action": "config.update",
      "target_type": "config",
      "target_id": null,
      "details": { "path": "ai.model", "value": "claude-3-5-sonnet" },
      "ip_address": "203.0.113.42",
      "created_at": "2026-03-21T10:00:00.000Z"
    }
  ],
  "total": 47,
  "limit": 10,
  "offset": 0
}

GET /guilds/:id/audit-log/export

Exports the filtered audit log as a CSV or JSON file download. Allows up to 10,000 rows per export. Authentication: API key or JWT Bearer token required.
This endpoint is rate-limited to 10 requests per minute because exports can be heavy. Use filters to limit the exported set.

Path parameters

id
string
required
The Discord guild ID.

Query parameters

format
string
Export format. Options: csv, json. Default: json.
limit
integer
Maximum rows to export. Default: 1000. Maximum: 10000.
action
string
Filter by action type.
userId
string
Filter by admin user ID.
startDate
string
ISO 8601 timestamp lower bound.
endDate
string
ISO 8601 timestamp upper bound.

Response

Returns either a CSV file with Content-Type: text/csv or a JSON file with Content-Type: application/json. Both include a Content-Disposition: attachment header with a timestamped filename. JSON response shape:
guildId
string
The guild ID.
exportedAt
string
ISO 8601 timestamp of the export.
count
integer
Number of entries exported.
entries
array
The audit log entries.

Example

curl -H "x-api-secret: YOUR_SECRET" \
  "https://volvox.bot/api/v1/guilds/987654321098765432/audit-log/export?format=csv&limit=500" \
  -o audit-log.csv

Build docs developers (and LLMs) love