API Reference
List Audit Events
Page through the immutable audit log for the active organisation. Every state-changing action produces an audit row with the actor, target, request id, and result. Append-only with hash chaining for tamper evidence.
GET/admin/team/audit-logs
Authentication
Accepts a JWT bearer token (Authorization: Bearer eyJ…) or an API key (X-API-Key: ms_live_…). API-key callers should send X-Project-ID unless the key is project-locked. Cross-tenant operators must send X-Tenant-ID.
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
actor_id | integer | optional | Filter by acting user. |
action | string | optional | Filter by action name (e.g. memory.add). |
created_after | string | optional | RFC 3339 lower bound. |
created_before | string | optional | RFC 3339 upper bound. |
offset | integer | optional | Default 0. |
limit | integer | optional | Default 50, max 100. |
Response
Returns 200 OK with the following body.
| Field | Type | Required | Description |
|---|---|---|---|
items | array | optional | Audit event objects. |
total | integer | optional | Total matching rows. |
offset | integer | optional | Echoed cursor. |
limit | integer | optional | Echoed page size. |
has_next | boolean | optional | Whether another page exists. |
200.json
{"items": [{"id": 9012,"actor_id": 42,"action": "memory.add","target_type": "memory","target_id": "184213","result": "created","request_id": "req_01HX...","created_at": "2026-05-04T12:30:11Z"}],"total": 1284,"offset": 0,"limit": 20,"has_next": true}
Errors
| Status | Code | Description |
|---|---|---|
| 400 | validation_error | Body or query failed schema validation. The error includes the offending field name. |
| 401 | unauthenticated | Missing or invalid bearer token / API key. |
| 403 | forbidden | Authenticated principal lacks the required scope, role, or project access. |
| 404 | not_found | Target resource does not exist or is not visible to the calling tenant. |
| 429 | rate_limited | Per-IP or per-route limit exceeded. Respect the Retry-After header. |
| 500 | internal_error | Unhandled server error. Quote the request_id when contacting support. |
Examples
cURL
curl -X GET https://api.memorysync.io/admin/team/audit-logs \-H "Authorization: Bearer $MEMORYSYNC_KEY"
javascript
import { MemorySync } from 'memorysync'const client = new MemorySync({ apiKey: process.env.MEMORYSYNC_KEY })const result = await client.request({method: 'GET',path: '/admin/team/audit-logs',})console.log(result)
python
from memorysync import Clientclient = Client(api_key=os.environ["MEMORYSYNC_KEY"])result = client.request(method="GET",path="/admin/team/audit-logs",)print(result)
Behavior & notes
Idempotent through Idempotency-Key on writes. Replays within 24h return the original response unchanged.