API reference

Audit log

Export an app's hash-chained audit events as JSON or CSV, and check that the chain is intact.

Every app's audit events form a hash chain. Each event has a sequence_number, its own event_hash and the previous_event_hash of the event before it, so a removed or edited event breaks the chain. These endpoints export the events and check the chain.

Both take the app's key (or a workspace key above it) in Authorization and an M2M token in X-Authorization, and need the token's read scope. See Authentication.

Export the audit log#

Returns the app's events, oldest first.

GET/v1/apps/:app_id/audit_log/exportAPI key + M2M token
app_idstringrequired
The app (app_...).
formatstring
json (default) or csv. CSV is sent as a file attachment.
start_datestring
Only events at or after this time.
end_datestring
Only events at or before this time.
categorystring
One or more categories, comma separated: auth, user, token, verification, workspace, app, security, system, or agents for the agents' events.
limitinteger
Default 10000, maximum 50000.
Requestbash
curl "https://api.scute.io/v1/apps/$SCUTE_APP_ID/audit_log/export?start_date=2026-11-01T00:00:00Z&category=auth" \  -H "Authorization: Bearer $SCUTE_APP_SECRET" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN"
Response 200json
{  "app_id": "0193f8aa-9999-7aaa-8bbb-cccccccccccc",  "exported_at": "2026-11-19T10:00:00Z",  "count": 1,  "events": [    {      "id": "0193fb00-0000-7000-8000-000000000123",      "sequence_number": 4182,      "slug": "auth.login.new_device",      "category": "auth",      "note": "Sign-in from a new device",      "app_user_id": "0193f900-aaaa-7bbb-8ccc-000000000001",      "ip_address": "203.0.113.10",      "user_agent": "Mozilla/5.0",      "metadata": {},      "event_hash": "9f2c...e41a",      "previous_event_hash": "51b0...7d03",      "created_at": "2026-11-18T14:02:11Z"    }  ]}

The CSV has the columns id, sequence_number, timestamp, slug, category, note, app_user_id, ip_address, user_agent, metadata, event_hash, previous_event_hash.

A date that cannot be parsed returns 400 with Invalid date format: ....

Verify the chain#

Recomputes the hashes of the newest limit events, or of the limit events up to and including to_sequence, and reports whether the chain is intact.

GET/v1/apps/:app_id/audit_log/verifyAPI key + M2M token
app_idstringrequired
The app (app_...).
limitinteger
Events to check. Default 1000, maximum 100000.
to_sequenceinteger
Check the events up to and including this sequence number.
Requestbash
curl "https://api.scute.io/v1/apps/$SCUTE_APP_ID/audit_log/verify?limit=5000" \  -H "Authorization: Bearer $SCUTE_APP_SECRET" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN"
Response 200json
{  "app_id": "0193f8aa-9999-7aaa-8bbb-cccccccccccc",  "verified_at": "2026-11-19T10:00:00Z",  "chain_integrity": "valid",  "total_checked": 4182,  "valid": 4182,  "invalid": 0,  "newest_sequence": 4182,  "oldest_sequence": 1,  "complete": true,  "head": { "sequence": 4182, "event_hash": "9f2c...e41a" },  "errors": []}
FieldMeaning
chain_integrityvalid when no event failed, else broken
completetrue when the check reached the first event of the chain. When false, call again with to_sequence set to oldest_sequence - 1
headThe newest event checked. Keep it outside Scute to prove later that nothing was cut off the end
errorsThe first 20 failures

Errors#

StatusWhen
401No valid key, or no valid M2M token
403The key does not own the app, or the token's app is outside the app's workspace and the workspaces above it
404The app does not exist