Star
API reference

Audit log

Every change writes an audit row in the same transaction, chained by hash to the one before. Editing history breaks the chain, and verification says where.

Read the audit log

GET/v1/admin/projects/{project}/audit

Auth: Personal access token or dashboard session, role reader or higher.

Newest first. actorKind is token or session; changes made by the flags file, the scheduler or the MCP server say so in the actor. A scoped token sees its own environments' rows and project-level rows.

Path parameters

NameTypeDescription
projectstringProject key.

Query parameters

NameTypeDefaultDescription
limitnumber501 to 200.
flagstringOnly this flag.

Responses

200 OK Found.

{
  "entries": [
    {
      "id": "8e2a3b4c-5d6e-4f7a-8b9c-0d1e2f3a4b5c",
      "action": "flag.updated",
      "entityType": "flag",
      "entityKey": "new-checkout",
      "actorId": "5d1f0c2a-8b3e-4f6a-9c7d-2e1b0a9f8e7d",
      "actorKind": "token",
      "actorName": "Ana",
      "actorEmail": "ana@acme.com",
      "createdAt": "2026-11-18T09:12:44.318Z",
      "comment": "widen to 50%",
      "before": {
        "enabled": true,
        "rollout": "20%"
      },
      "after": {
        "enabled": true,
        "rollout": "50%"
      }
    }
  ]
}
Common errors (401, 429, 500)
{
  "error": "MISSING_TOKEN",
  "message": "an access token is required"
}
{
  "error": "TOKEN_REJECTED",
  "message": "access token rejected"
}
{
  "error": "SESSION_REJECTED",
  "message": "session expired or rejected"
}
{
  "error": "RATE_LIMITED",
  "retryAfterSeconds": 12
}
{
  "error": "INTERNAL_ERROR"
}

Example

curl "http://127.0.0.1:3000/v1/admin/projects/acme/audit?flag=new-checkout&limit=20" -H "Authorization: Bearer $FEATUREKIT_TOKEN"

Verify the audit chain

GET/v1/admin/projects/{project}/audit/verify

Auth: Personal access token or dashboard session, role admin or higher.

Walks the project's whole history and checks each row's hash against the one before.

Path parameters

NameTypeDescription
projectstringProject key.

Responses

{
  "ok": true,
  "checked": 1284
}
{
  "ok": false,
  "checked": 311,
  "brokenAt": "8e2a3b4c-5d6e-4f7a-8b9c-0d1e2f3a4b5c"
}
Common errors (401, 403, 429, 500)
{
  "error": "MISSING_TOKEN",
  "message": "an access token is required"
}
{
  "error": "TOKEN_REJECTED",
  "message": "access token rejected"
}
{
  "error": "SESSION_REJECTED",
  "message": "session expired or rejected"
}
{
  "error": "INSUFFICIENT_ROLE",
  "message": "requires admin or higher"
}
{
  "error": "RATE_LIMITED",
  "retryAfterSeconds": 12
}
{
  "error": "INTERNAL_ERROR"
}

Example

curl http://127.0.0.1:3000/v1/admin/projects/acme/audit/verify -H "Authorization: Bearer $FEATUREKIT_TOKEN"