Health and maintenance

List audit log entries

Returns audit log entries, newest first. Marfa records changes, sign-ins, exports and the files MCP tools fetch from the web here, not other reads. Requires audit.read.

GET
/audit

Authorization

bearerAuth
headerAuthorizationBearer <token>

Authenticate with an API key (marfa_k1_…) or an OAuth access token (marfa_at_…).

Query parameters

action?string

Only return entries with this action, such as key.create.

resource_type?string

Only return entries for this kind of resource, such as key.

resource_id?string

Only return entries for the resource with this ID.

kind?string

Only return entries of this kind: access is sign-ins, keys, folders and the profile, data is items, edges, types, files and restores, settings is configuration, webhooks and connectors, and housekeeping is what Marfa does on its own.

Value in"access""data""settings""housekeeping"
q?string

Only return entries that hold every word of this text, in any order and ignoring ASCII case, in their action, resource, key, address or details.

Lengthlength <= 200
created_after?string

Only return entries recorded after this time.

created_before?string

Only return entries recorded before this time.

limit?integer

The maximum number of results to return.

Range1 <= value <= 200
Default50
cursor?string

The next_cursor from the previous page. Leave it out to get the first page.

Response body

About errors

Returns a page of entries.

application/json
  1. response

One page of audit log entries.

data*array<>

The entries, newest first.

next_cursor*|

Pass as cursor for the next page; null on the last. A page can be short, or empty, with a cursor still to follow, so a walk stops on null and never on a short page.

  • validation_error: a query parameter is unknown or invalid, such as a time that isn't a timestamp, or cursor is malformed or came from another listing.
application/json
  1. response

An error response.

error*

What went wrong.

unauthorized: the request has no credential, or its credential is not valid. For a key that has expired, details.expired_at says when it expired.

application/json
  1. response

An error response.

error*

What went wrong.

  • forbidden: you don't hold audit.read. details.required_scope names it.
application/json
  1. response

An error response.

error*

What went wrong.

contract_mismatch: X-Marfa-Contract names another contract version than this instance speaks, or is not a whole number. Nothing was done.

application/json
  1. response

An error response.

error*

What went wrong.

rate_limited: you sent too many requests. Wait for the number of seconds in Retry-After, then try again.

application/json
  1. response

An error response.

error*

What went wrong.

internal_error: Marfa failed in a way it didn't expect, and the request may not have completed. Read what you changed before you repeat a write.

application/json
  1. response

An error response.

error*

What went wrong.

write_contention: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. While a restore runs, details.reason is restore_running.

application/json
  1. response

An error response.

error*

What went wrong.

insufficient_storage: the disk that holds the instance's data has no room for the request, or the request would leave less free than the instance keeps in reserve. Nothing changed, unless details.write_outcome is unknown, which means the write may have landed: read what you changed before you repeat it. Free space on the disk, then try the request again.

application/json
  1. response

An error response.

error*

What went wrong.

curl -X GET 'http://localhost:8600/audit'
About errors
{  "data": [    {      "actor": {        "kind": "key",        "id": "01a1011b-b5e5-7be6-8f3b-77492475b5a4",        "name": "CRM sync"      },      "id": "01a10128-009f-7d6b-824c-72ebd7fd5893",      "created_at": "2026-10-03T10:09:45.373Z",      "key_id": "01a1011b-b5e5-7be6-8f3b-77492475b5a4",      "action": "config.update",      "resource_type": "config",      "resource_id": null,      "client_ip": "203.0.113.24",      "details": {        "fields": [          "name"        ]      }    },    {      "actor": {        "kind": "local",        "id": "local",        "name": "Local command"      },      "id": "01a10128-7a40-7d69-887d-0ec0248c3e58",      "created_at": "2026-10-03T10:09:20.536Z",      "key_id": "local:process",      "action": "owner.update",      "resource_type": "owner",      "resource_id": "01a10127-1145-7059-9f7f-0320e4cd3e20",      "client_ip": null,      "details": {        "fields": [          "name"        ]      }    }  ],  "next_cursor": "cCfRqqWQ6z893bq0IBwIHAQYYMjAyNi0xMS0xNlQwODoxNzowNy41OTNaCQGh425uCXdUpRQx8trU9jk"}