API reference
Audit log API
Read a team's audit log with an admin key: gap-free cursors, filters, exports, the hash chain, webhook streams, limits and errors.
A team's Owner and Admins can read the team's audit log from a script or a SIEM. It is the log of Settings → Audit log: who did what, to whom, when and from where. Pull it page by page, export it as a file, or have Sume send it to your server as it is written.
GET /v1/admin/audit_logs events, newest or oldest first
GET /v1/admin/audit_logs/{id} one event
GET /v1/admin/audit_logs/event_types every event type, with its category
GET /v1/admin/audit_logs/verify Sume checks the hash chain
POST /v1/admin/audit_logs/exports export to NDJSON, CSV or JSON
GET /v1/admin/audit_logs/exports the team's recent exports
GET /v1/admin/audit_logs/exports/{id} one export
GET /v1/admin/audit_logs/exports/{id}/download a signed link to the fileStreams push new events to your HTTPS endpoint. The live OpenAPI gives the exact schemas. Pull your audit log into your SIEM sets up a whole pipeline, step by step.
Keys
The audit log API takes an admin key with audit log access. A team Owner or Admin makes one in the team on Settings → API keys, with one of three accesses:
| Access | Scopes | It can |
|---|---|---|
| Audit log only | audit_logs:read, account:read | read the audit log, export it and check its chain. Nothing else. |
| Admin, read only | admin:read, audit_logs:read, account:read | the same, and read members, usage, limits and policy |
| Admin | admin:read, admin:write, audit_logs:read, audit_logs:write, account:read | the same, change limits and policy, and run streams |
For a SIEM, make an Audit log only key. It is read only. Any admin route
outside /v1/admin/audit_logs answers it 403 insufficient_scope.
- Like every admin key it calls
/v1/adminonly, works for its own team only, and cannot generate or spend. - Every request reads the role of the key's owner again. When they are no
longer an Owner or Admin of the team, the key answers
403 insufficient_role. When they leave the team, the key is revoked. - The team's IP allowlist and maximum key lifetime apply.
- An admin key made before audit log access existed has no
audit_logs:readand answers403 insufficient_scopewithdetails.required_scope: "audit_logs:read". Make a new one. - A personal workspace has no audit log API:
404 team_only.
export SUME_AUDIT_KEY="sume_live_..."List events
curl "https://api.sume.com/v1/admin/audit_logs?limit=100" \
-H "Authorization: Bearer $SUME_AUDIT_KEY"{
"object": "list",
"schema_version": "2026-11-27",
"data": [{ "object": "audit_log.event", "id": "ale_2n9c", "sequence": 4182 }],
"has_more": true,
"next_cursor": "eyJ2IjoxLCJ3IjoiM2E5...",
"first_sequence": 4182,
"last_sequence": 4083,
"order": "desc",
"head_sequence": 4182,
"retention": {
"days": 365,
"oldest_effective_at": "2025-11-27T06:12:03.481Z",
"oldest_sequence": 1
}
}order=desc, the default, gives the newest first.order=ascgives the oldest first and is the way to follow the log.first_sequenceandlast_sequenceare the first and last event of the page,nullwhen it is empty.head_sequenceis the team's newest sequence when the page was read, whatever the filters.retentionis the API's window: every event fromoldest_sequenceon (see Retention).
An event
{
"object": "audit_log.event",
"id": "ale_2n9c",
"schema_version": "2026-11-27",
"sequence": 4182,
"type": "security_settings.changed",
"category": "access",
"effective_at": "2026-11-27T06:12:03.481920Z",
"actor": {
"type": "user",
"id": "user_2ada",
"email": "ada@example.com",
"role": "owner",
"api_key": { "id": "key_8f1", "prefix": "sume_live_ab12cd34", "kind": "ledger" }
},
"context": {
"client": "api",
"ip_address": "203.0.113.9",
"user_agent": "python-requests/2.32.3",
"request_id": "iad1::7c2b0e"
},
"target": { "type": "setting", "id": "security", "name": null },
"result": { "status": "success", "reason": null },
"changes": {
"before": { "ip_allowlist": [] },
"after": { "ip_allowlist": ["203.0.113.0/24"] }
},
"details": {},
"backfilled": false,
"integrity": {
"algorithm": "sha256-chain-v1",
"hash": "9f2c51…",
"prev_hash": "41aa07…"
}
}idis stable (ale_…). Use it to de-duplicate.sequenceis the event's place in the team's log: 1, 2, 3… with no gaps, in the order events were written (Pages and cursors).typesays what happened.categoryis its group:auth,members,access,credentials,ai_governance,data,billing,spend,workspace,computeoraudit. Event types lists them. New types are added over time: keep the events of a type you do not know.effective_atis when it happened, UTC, to the microsecond. A backfilled event keeps its original time, so it can be older than events with a lower sequence.actor.typeisuserfor a team member,sume_stafffor Sume support acting for the team,systemfor a webhook, a sweep or a worker, andapi_keyfor a credential with no person behind it (a service account, or a refused key).emailandroleare as they were when the event was written.actor.api_keynames the credential the request used:id,prefix, andkind(ledgerfor an API key,mcp_oauthfor an MCP or CLI sign-in,desktop_sessionfor the Mac app,service_account). It isnullfor an action taken in the app.context.clientisweb,desktop,api,mcp,cli,scimorsystem.changesholds the fields of a setting before and after the change, or isnull.detailsholds everything else the event records. Neither ever holds a secret, a token, key material, a card number or prompt text.backfilledistruefor an event rebuilt from earlier records after the fact.integrityis the event's place in the hash chain (Integrity).
Events never change once written. Fields may be added to this schema; a
change that removes or renames a field comes with a new schema_version.
Filters
Send the same filters with every page.
| Parameter | Takes |
|---|---|
effective_at[gte], effective_at[gt], effective_at[lte], effective_at[lt] | a time: RFC 3339 with an offset (2026-11-27T06:00:00Z), a date (2026-11-27, read as 00:00 UTC) or Unix seconds. Send gte or gt, and lte or lt, not both. |
sequence[gte], sequence[lte] | a sequence, 1 or more |
event_types | exact types such as api_key.created, or a prefix such as billing.* |
exclude_event_types | types or prefixes to leave out, such as audit_log.api_read |
categories | auth, members, access, credentials, ai_governance, data, billing, spend, workspace, compute, audit |
actor_ids | the acting people's user ids |
actor_emails | their email addresses, in any case |
actor_types | user, sume_staff, system, api_key |
target_types | target types such as api_key, member or setting |
target_ids | target ids |
clients | web, desktop, api, mcp, cli, scim, system |
result | success or failure |
request_ids | request ids, as in context.request_id |
order | desc (default) or asc |
limit | events per page, 1 to 1,000. Default 100. |
cursor | next_cursor from the previous page |
include | integrity.preimage adds the hashed fields to each event |
- A list takes up to 100 values. Repeat the parameter
(
event_types=member.invited&event_types=billing.*), use brackets (event_types[]=member.invited&event_types[]=billing.*) or commas (event_types=member.invited,billing.*). - Filters combine with AND. The values of one filter combine with OR, and the
exact types and prefixes of
event_typestogether. An excluded type is always left out. result,order,limit,cursorand each bound are sent once.- A parameter the API does not know is refused with
400 invalid_requestanddetails.paramnaming it, so a typo never widens a read.event_type=member.invitedanswers "event_type is not a parameter of the audit log. Did you mean event_types?". - Times in filters are compared to the microsecond, in UTC:
effective_at[gt]set to an event's owneffective_atleaves that event out. Events are always in sequence order, so to continue where you stopped, use the cursor rather than a time.
Pages and cursors
Each team's events are numbered 1, 2, 3… by sequence, in the order they
were written, with no gaps. Sume gives an event its sequence inside the write,
under a lock for the team that is held until the write commits. A higher
sequence therefore never becomes visible before a lower one, and paging by
sequence never skips or repeats an event, even while events are being
written.
- Send
next_cursorback ascursor, with the same filters. The cursor keeps its order, so later pages may leaveorderout. - A cursor is bound to the team, the filters and the order. Another team,
other filters or the other order answer
400 invalid_cursorwithdetails.reasonworkspace,filterororder; a cursor this API did not return answersmalformed. Do not build or change a cursor. has_moreistruewhile more events match now.- In
descordernext_cursorisnullon the last page. - In
ascordernext_cursoris always set, on the last page too. Keep it and ask again later to get only the events written since. That is how a SIEM follows the log. - While
has_moreistrue, the answer also carriesLink: </v1/admin/audit_logs?…&cursor=…>; rel="next". - To read a fixed snapshot, send the first page's
head_sequenceassequence[lte]with every page.
Unchanged pages
- The list answers an
ETag, withCache-Control: private, no-cache. Send it back asIf-None-Match: when the page would be the same, the answer is304 Not Modifiedwith no body. - One event answers a strong
ETagandCache-Control: private, max-age=3600, because an event never changes. - A
304is still a read, and it is still written to the audit log.
Your own reads
Every call to the audit log API is itself written to the team's audit log,
with the key's owner as the actor, the key in actor.api_key and
context.client: "api":
| Type | Written for | details |
|---|---|---|
audit_log.api_read | each read: the list, one event, the event types, a chain check, the export list, one export, and a refused download | operation (list, get, event_types, verify, export_list, export_get or export_download), the filter, the rows read, the sequences, and not_modified for a 304 |
audit_log.export_requested | each export | the export id, format, compression, filter and snapshot_sequence |
audit_log.export_downloaded | each download link | the export id, rows, bytes and sha256 |
audit_log.stream_* | each change to a stream | see Streams |
A request the API refuses with 403 (scope, role or IP allowlist) is
written as access.denied, once per key and route every 10 minutes.
A poller therefore reads its own earlier reads back, and a page never stays
the same long enough for a 304. Leave them out with
exclude_event_types=audit_log.api_read. That also leaves out the reads of
other keys; read those apart with event_types=audit_log.api_read.
Event types
curl "https://api.sume.com/v1/admin/audit_logs/event_types" \
-H "Authorization: Bearer $SUME_AUDIT_KEY"{
"object": "list",
"schema_version": "2026-11-27",
"data": [
{
"object": "audit_log.event_type",
"type": "member.invited",
"category": "members",
"description": "An Admin invited someone to the team."
}
]
}One event
curl "https://api.sume.com/v1/admin/audit_logs/ale_2n9c?include=integrity.preimage" \
-H "Authorization: Bearer $SUME_AUDIT_KEY"It answers the event, or 404 audit_log_event_not_found when the team has no
such event or it is older than the window.
Integrity
Each team's events form one SHA-256 hash chain, sha256-chain-v1. An event's
hash covers its stored fields and the hash of the event before it, so an
event that was changed, removed or put out of order breaks the chain from that
point. The store refuses every change and every deletion of an event.
integrity.hashis the event's SHA-256, in hex.integrity.prev_hashis the hash of the event before it,nullfor sequence 1.- With
include=integrity.preimage,integrity.preimageholds the 22 hashed fields as strings. Join them with U+001F (the unit separator), take the SHA-256 of the UTF-8 bytes, and the hex digest isintegrity.hash.
| # | Field | |
|---|---|---|
| 1 | the previous event's hash | empty for sequence 1 |
| 2 | sequence | |
| 3 | the team's id | org_… |
| 4 | time | effective_at, as 2026-11-27T06:12:03.481920Z |
| 5 | type | |
| 6 | category, as stored | empty for an event written before categories |
| 7 | actor kind, as stored | member, sume_staff, system or credential |
| 8 | actor user id | |
| 9 | actor email | |
| 10 | actor role | |
| 11 | client | |
| 12 | target type | |
| 13 | target id | |
| 14 | target name | |
| 15 | detail, as stored | JSON text, with before, after and credential still inside |
| 16 | IP address | |
| 17 | user agent | |
| 18 | result | success or failure |
| 19 | failure reason | |
| 20 | request id | |
| 21 | backfilled | true or false |
| 22 | source of a backfilled event |
An empty field is an empty string. Hash the preimage as it is given: it holds
the stored values, which the event shows in a friendlier shape (the actor kind
member is actor.type: "user", before and after move to changes, and
credential to actor.api_key). Then check that the fields you rely on match
it: field 1 is prev_hash (empty for null), 2 is sequence, 4 is
effective_at and 5 is type.
Check the chain yourself
Read a range without filters, oldest first, with
include=integrity.preimage. A filter leaves gaps on purpose. Then check
that:
- each event's preimage hashes to its
hash; - each event's
prev_hashis thehashof the event before it; - each
sequenceis one more than the one before.
import hashlib
def chain_break(events):
previous = None
for event in events:
integrity = event["integrity"]
preimage = integrity["preimage"]
digest = hashlib.sha256("\x1f".join(preimage).encode("utf-8")).hexdigest()
if digest != integrity["hash"] or preimage[1] != str(event["sequence"]):
return event["sequence"], "hash"
if preimage[0] != (integrity["prev_hash"] or ""):
return event["sequence"], "link"
if previous is not None:
if event["sequence"] != previous["sequence"] + 1:
return previous["sequence"] + 1, "gap"
if integrity["prev_hash"] != previous["integrity"]["hash"]:
return event["sequence"], "link"
previous = event
return NoneThe first event you hold anchors the chain: its prev_hash names an event
you do not have. Keep the last hash and sequence you checked, and go on from
there next time. The SIEM guide
has a script that pulls and checks the whole range.
Start a full check at retention.oldest_sequence: the window keeps every
sequence from there on, so a pull from it has no gaps. Sume's chain check
below reads the whole chain, older events included.
Sume checks the chain
curl "https://api.sume.com/v1/admin/audit_logs/verify?from_sequence=1" \
-H "Authorization: Bearer $SUME_AUDIT_KEY"{
"object": "audit_log.chain_check",
"status": "verified",
"algorithm": "sha256-chain-v1",
"from_sequence": 1,
"to_sequence": 4182,
"rows": 4182,
"first_break": null,
"last_hash": "9f2c51…",
"head_sequence": 4182,
"complete": true,
"next_from_sequence": null
}- Sume recomputes each hash from the stored fields and checks each link and
sequence, up to 50,000 events per request, from
from_sequence(default 1) toto_sequence(default the head). - When
completeisfalseand nothing broke, ask again fromnext_from_sequence. status: "broken"names the first bad event infirst_break:{ "sequence": 1207, "reason": "hash" }.reasonishash(the fields do not match the hash),link(prev_hashis not the hash before it) orgap(a sequence is missing).last_hashis the hash of the last event that checked out. Compare it with the hash you hold for that sequence.- It reads the whole chain, older than the window too, and it takes the smaller rate budget (Limits).
Exports
An export writes the matching events to one file, for a first backfill or an archive.
curl -X POST "https://api.sume.com/v1/admin/audit_logs/exports" \
-H "Authorization: Bearer $SUME_AUDIT_KEY" \
-H "Content-Type: application/json" \
-d '{ "format": "ndjson", "compression": "gzip", "filter": { "effective_at": { "gte": "2026-01-01" }, "exclude_event_types": ["audit_log.api_read"] } }'| Field | Value |
|---|---|
format | ndjson (default): one event per line, the list's event shape. csv: one row per event, with changes and details as JSON cells. json: one document with a data list. |
compression | gzip (default) or none |
filter | the list's filters, as JSON (below) |
include | ["integrity.preimage"] adds each event's preimage, in NDJSON and JSON. A CSV export with it is refused (400, details.param: "include"). |
The filter takes the list's filters by the same names. Lists are arrays of
strings, effective_at takes gte, gt, lte and lt, and sequence
takes gte and lte:
{
"effective_at": { "gte": "2026-01-01", "lt": "2026-07-01" },
"sequence": { "lte": 50000 },
"event_types": ["member.*", "security_settings.changed"],
"exclude_event_types": ["audit_log.api_read"],
"categories": ["access"],
"actor_ids": ["user_2ada"],
"actor_emails": ["ada@example.com"],
"actor_types": ["user"],
"target_types": ["api_key"],
"target_ids": ["key_8f1"],
"clients": ["web"],
"result": "success",
"request_ids": ["iad1::7c2b0e"]
}A field the API does not know, in the body or in filter, is refused with
400 invalid_request, so a typo never widens an export.
The answer is 201 Created, with Location: /v1/admin/audit_logs/exports/{id}:
{
"object": "audit_log.export",
"id": "alx_6f1c2a9e0b3d4c5e6f7a8b9c",
"status": "queued",
"format": "ndjson",
"compression": "gzip",
"filter": {
"effective_at": { "gte": "2026-01-01T00:00:00.000Z" },
"exclude_event_types": ["audit_log.api_read"]
},
"include": [],
"snapshot_sequence": 4182,
"rows": null,
"bytes": null,
"sha256": null,
"first_sequence": null,
"last_sequence": null,
"last_hash": null,
"created_at": "2026-11-27T06:20:00.000Z",
"started_at": null,
"completed_at": null,
"expires_at": null,
"error": null,
"download_url": null
}- An export is a snapshot. It holds the matching events up to
snapshot_sequence, the team's newest sequence when you asked (or yoursequence.lte, when that is lower), oldest first. Events written later are not in it. To follow on from an export, list withsequence[gte]set tosnapshot_sequence + 1. - Read
GET /v1/admin/audit_logs/exports/{id}untilstatusissucceededorfailed. It goesqueued,running, thensucceededorfailed, andexpiredafter 7 days. - Once it succeeded:
rows,bytes,sha256(of the file as you download it, so of the gzip bytes when compressed),first_sequence,last_sequence,last_hash(the hash of the last event in the file) anddownload_url. GET /v1/admin/audit_logs/exports/{id}/downloadanswers302to a signed link valid for 15 minutes. Withredirect=falseit answers the link as JSON:{ "object": "audit_log.export_download", "url", "expires_at", "sha256", "bytes" }. The link is signed already: do not send your key to it.- Before it succeeded, or after it expired, the download answers
409 audit_log_export_not_readywithdetails.status. - A team has at most 3 exports queued or running. A fourth answers
409 audit_log_export_in_progress. - An export holds at most 2,000,000 events. A larger one fails with
error.code: "export_too_large": narrow the filter or split the range. - A run that fails is tried again, up to 3 times. Then the export is
failedwitherror.code: "export_failed". - An export keeps to the window (Retention).
- Read-only and Audit log only keys can export.
GET /v1/admin/audit_logs/exports?limit=20lists the team's exports, newest first, 1 to 100.
CSV columns: id, sequence, effective_at, type, category,
actor_type, actor_id, actor_email, actor_role, actor_api_key_id,
actor_api_key_prefix, client, ip_address, user_agent, request_id,
target_type, target_id, target_name, result, result_reason,
changes_before, changes_after, details, backfilled, hash,
prev_hash. A cell that starts with =, +, -, @, a tab or a carriage
return gets a leading ', so a spreadsheet does not run it as a formula.
The JSON document is
{ "object": "list", "schema_version", "export_id", "workspace_id", "snapshot_sequence", "filter", "data": [ … ] }.
Streams
A stream sends new events to your HTTPS endpoint as they are written, in order, in signed batches.
POST /v1/admin/audit_logs/streams make a stream
GET /v1/admin/audit_logs/streams the team's streams
GET /v1/admin/audit_logs/streams/{id} one stream
PATCH /v1/admin/audit_logs/streams/{id} change its URL, filter, batch size or status
DELETE /v1/admin/audit_logs/streams/{id} delete it
POST /v1/admin/audit_logs/streams/{id}/replay deliver again from a sequence
POST /v1/admin/audit_logs/streams/{id}/test send one signed test delivery now
GET /v1/admin/audit_logs/streams/{id}/deliveries the delivery logcurl -X POST "https://api.sume.com/v1/admin/audit_logs/streams" \
-H "Authorization: Bearer $SUME_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{ "url": "https://siem-bridge.example.com/sume/audit", "filter": { "exclude_event_types": ["audit_log.api_read"] }, "batch_size": 500, "start": "now" }'- Making, changing, replaying, testing and deleting a stream take an
Admin key (
audit_logs:write). Read-only and Audit log only keys can read streams and their deliveries. urlis a public HTTPS URL; anything else answers400 invalid_webhook_url.filterandincludeare those of an export.batch_sizeis 1 to 1,000, default 100.startis"now"(from the next event, and the default),"beginning"(from the oldest in the window) or{ "after_sequence": 4000 }.- A team has at most 5 streams:
409 audit_log_stream_limit. - The stream answers
{ "object": "audit_log.stream", "id", "url", "url_fingerprint", "description", "status", "filter", "include", "batch_size", "cursor_sequence", "lag", "consecutive_failures", "next_attempt_at", "last_success_at", "last_failure_at", "last_status_code", "last_error", "created_at", "updated_at" }.statusisactive,pausedorfailing.cursor_sequenceis the last sequence delivered, andlagis how far the head is ahead of it. - Sume never shows the full URL again after you set it, because collectors
often carry a token in the path or query.
urlis its origin (https://siem-bridge.example.com/…), andurl_fingerprintis the first 16 hex characters of the SHA-256 of the full URL:printf %s "$URL" | sha256sum | cut -c1-16tells you which URL is set. The audit log records the host only.
Each delivery is a POST of:
{
"object": "audit_log.delivery",
"id": "ald_…",
"stream_id": "als_…",
"schema_version": "2026-11-27",
"test": false,
"data": [{ "object": "audit_log.event", "id": "ale_2n9c", "sequence": 4182 }],
"first_sequence": 4180,
"last_sequence": 4182,
"next_cursor": "eyJ2IjoxLCJ3IjoiM2E5..."
}- It is signed as webhooks are: HMAC SHA-256 with the
team's webhook signing secret over
<timestamp>.<raw_body>, sent asx-sume-webhook-timestampandx-sume-webhook-signature: sume-v1=<hex>(two entries, newest first, during a secret rotation). It also carriesx-sume-webhook-id(the delivery id) anduser-agent: Sume-Audit-Log/1. - Read the signing secret on the dashboard's Webhooks tab, or from
GET /v1/webhooks/signing-secretwith a regular API key that hasaccount:read. An admin key cannot read it. - Store the batch, then answer
2xxwithin 10 seconds. - Delivery is at least once and in order. A batch is sent again until it gets
a
2xx, and the stream never moves past it. Use each event'sidto de-duplicate. - A failed attempt is tried again after 10 seconds, then twice as long each
time, up to 1 hour. A
Retry-Afteron a429or503is followed, up to 1 hour. - After 24 hours of failures in a row the stream turns
failingand stops, and anaudit_log.stream_failingevent is written. Fix the endpoint, then set"status": "active"withPATCH. replaywith{ "from_sequence": 4000 }delivers again from that sequence.testsends{ "object": "audit_log.delivery", "test": true, "data": [] }and answers your endpoint's status code and the time it took. It works on a paused or failing stream and does not move it.- The delivery log keeps 30 days: each attempt, its sequences, status code, duration and error.
- Each change is written to the audit log as
audit_log.stream_created,audit_log.stream_updated,audit_log.stream_deleted,audit_log.stream_replayedoraudit_log.stream_tested.
Not yet
Sume does not push to Splunk, Datadog, Elastic or an S3 bucket by itself. Today you pull the log, export it, or receive a stream on your own endpoint and forward it from there. The SIEM guide shows each.
Retention
The API returns the last 365 days of events, or 730 days for an enterprise
team. The window starts at the oldest event written in that time and keeps
every sequence after it, so a pull from retention.oldest_sequence has no
gaps. An event backfilled with an older effective_at keeps its place by
sequence. Sume keeps the events longer: older ones stay in the app's audit
log and its downloads, and in the chain that verify checks. The list, one
event, exports and streams keep to the window.
CLI and TypeScript
sume audit-logs list --order asc --all --json > sume-audit.ndjson
sume audit-logs export --format ndjson --output sume-audit.ndjson.gz
sume audit-logs verify
sume audit-logs streams create --url https://siem-bridge.example.com/sume/audit --exclude-type audit_log.api_readThe CLI reference lists every sume audit-logs
command. In TypeScript, @sume-com/sdk has iterateAuditLogEvents,
verifyAuditLogEvent and verifyAuditLogChain.
Limits
- The audit log API has two rate budgets of its own, apart from your other reads and writes. Reads take half of your plan's write number per minute: 60 on Free, 150 on Pro, 300 on Startup, 600 on Scale. The chain check and every change (exports, streams) take a twentieth: 6, 15, 30 and 60.
- A budget counts per key, and all of one person's keys in the team share it too.
- Every answer carries
ratelimit-limit,ratelimit-remainingandratelimit-reset(seconds). Past the budget the answer is429 rate_limited, withretry-afterin seconds anddetails.scope: "report". - A page holds up to 1,000 events and a filter up to 100 values. A chain check covers up to 50,000 events and an export up to 2,000,000. A team has at most 3 exports running and 5 streams.
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | A parameter, a body field or a filter is wrong or unknown. details.param names it, or details.errors[].path for a value the schema refuses. |
| 400 | invalid_cursor | details.reason: malformed (not a cursor this API returned), workspace (another team's), filter (made with other filters) or order (the other order). |
| 400 | invalid_webhook_url | A stream URL is not a public HTTPS URL. |
| 403 | insufficient_scope | Not an admin key with audit log access (details.required_scope: "audit_logs:read"), a stream change without audit_logs:write, or an admin key outside /v1/admin (details.reason: "admin_key"). |
| 403 | insufficient_role | The key's owner is no longer an Owner or Admin of the team. |
| 403 | ip_not_allowed | The request came from outside the team's IP allowlist. |
| 404 | team_only | The key belongs to a personal workspace. |
| 404 | audit_log_event_not_found | The team has no such event, or it is older than the window. |
| 404 | audit_log_export_not_found | The team has no such export. |
| 404 | audit_log_stream_not_found | The team has no such stream. |
| 409 | audit_log_export_in_progress | The team already has 3 exports queued or running. |
| 409 | audit_log_export_not_ready | The export has not succeeded, or it expired; details.status says which. |
| 409 | audit_log_stream_limit | The team already has 5 streams. |
| 429 | rate_limited | Past a budget. Wait retry-after seconds. |
| 503 | provider_not_configured | A stream test cannot sign right now. Retry. |
| 503 | audit_log_api_unavailable | The audit log or the export storage cannot be reached right now. Retry. |