Audit log
Read the audit log of every write in the organization.
Every write is audit logged: who did it (a user, an API key or the system), what, to which target, in which mode, and from roughly where. Admins see every row. Developers see only their own actions, and so do keys they created.
List audit entries#
GET
/api/v1/orgs/{org_id}/auditAudit entries, newest first.
Auth: secret key with the audit:read scope, or a session. Either way the role behind it needs audit.view.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
org_id |
uuid | required | Organization id |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
actor |
uuid | optional | A user id or API key id |
action |
string | optional | An exact action, e.g. api_key.created, or a prefix ending in *, e.g. issue.*. Up to 100 characters. |
target_type |
string | optional | e.g. project, api_key, release_file |
mode |
string | optional | live or test. Default: the request's mode. A key can only read its own mode. |
from |
datetime | optional | From this time |
to |
datetime | optional | Until this time |
limit |
integer | optional | 1 to 200, default 50 |
cursor |
string | optional | next_cursor from the previous page |
Response
| Field | Type | Description |
|---|---|---|
items[].id |
uuid | Entry id |
items[].at |
datetime | When |
items[].actor |
object | {type: user|system|api_key, id, name} |
items[].action |
string | e.g. release_file.uploaded |
items[].target_type |
string or null | What kind of thing changed |
items[].target_id |
string or null | Its id |
items[].mode |
string | live or test |
items[].ip_hint |
string or null | The caller's address with the last IPv4 octet dropped (203.0.113.x), or an IPv6 /48 |
items[].details |
object | Action-specific details |
next_cursor |
string or null | Cursor for the next page |
Errors
| Status | Code | When |
|---|---|---|
| 403 | mode_mismatch |
A key asked for the other mode's rows |
curl "https://app.getmendloop.com/api/v1/orgs/ORG_ID/audit?action=api_key.*&limit=20" \
-H "Authorization: Bearer sk_test_…"const res = await fetch("https://app.getmendloop.com/api/v1/orgs/ORG_ID/audit?action=api_key.*&limit=20", {
headers: { Authorization: "Bearer sk_test_…" },
});
if (!res.ok) throw new Error((await res.json()).error.message);
const data = await res.json();import requests
resp = requests.get(
"https://app.getmendloop.com/api/v1/orgs/ORG_ID/audit",
headers={"Authorization": "Bearer sk_test_…"},
params={
"action": "api_key.*",
"limit": 20
},
timeout=30,
)
resp.raise_for_status()
data = resp.json(){
"items": [
{
"id": "0193c8e5-a1b2-7c3d-9e4f-5a6b7c8d9e01",
"at": "2026-11-05T09:00:00Z",
"actor": {
"type": "user",
"id": "0193a2c4-5e20-7c11-a3f0-6b9d2e4c8a15",
"name": "Priya Shah"
},
"action": "api_key.created",
"target_type": "api_key",
"target_id": "0193a2c5-0a1b-7c2d-8e3f-4a5b6c7d8e9f",
"mode": "live",
"ip_hint": "203.0.113.x",
"details": {
"name": "CI source maps",
"kind": "secret",
"scopes": [
"sourcemaps:write"
],
"personal": false
}
}
],
"next_cursor": null
}