API reference
Audit
Generated HTTP reference for the 1 operation the published OpenAPI document describes under audit.
1 min read
Audit
This page is generated from the published OpenAPI document. It is complete with respect to that document and says nothing about surfaces the document does not describe yet. See what is generated here for what that means.
Base URL: https://api.codespar.dev
Every operation below requires a Bearer token. See Authentication.
GET /v1/audit/events
Browse the audit chain (alias path)
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
before_sequence | integer | no | Returns entries strictly below this sequence. Use the previous page's next_before_sequence. |
event_type | string | no | Exact match, or a prefix match when it ends with a dot. |
from | string (date-time) | no | ISO 8601. Defaults to seven days ago. |
limit | integer | no | Clamped to 1..200. Defaults to 50, and falls back to 50 when the value is 0 or is not a number; a negative value becomes 1. |
to | string (date-time) | no | ISO 8601. Defaults to now. |
Responses
| Status | Body | Description |
|---|---|---|
200 | object | OK |
400 | object | Bad Request, in a BARE body. invalid_before_sequence when the cursor is not a number, invalid_iso_8601 when from or to is not a date this server can parse, from_after_to when the window is inverted. |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
events | array of object | yes | — |
next_before_sequence | integer,null | yes | The lowest sequence on this page when the page was full; null when it was not. |
Example response
{
"events": [
{
"sequence_number": 0,
"event_type": "string",
"happened_at": "2026-01-15T12:00:00.000Z",
"payload": {},
"prev_hash": "string",
"entry_hash": "string"
}
]
}Example request
curl -X GET https://api.codespar.dev/v1/audit/events \
-H "Authorization: Bearer $CODESPAR_API_KEY"