> ## Documentation Index
> Fetch the complete documentation index at: https://feather.mupeni.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List Audit Log

> Returns paginated audit log entries for a project.

All management actions (flag changes, key creation, approvals, etc.) are recorded. Entries are append-only and immutable.

**Retention**: Free plan returns only the last 7 days. Pro/Enterprise returns full history.

## Path parameters

<ParamField path="projectId" type="string" required />

## Query parameters

<ParamField query="limit" type="number">
  Page size. 1–100, default 50.
</ParamField>

<ParamField query="cursor" type="number">
  Timestamp cursor for the next page.
</ParamField>

<ParamField query="resourceType" type="string">
  Filter by resource type, e.g. `flag`, `api_key`, `proposal`.
</ParamField>

<ParamField query="resourceId" type="string">
  Filter by a specific resource ID.
</ParamField>

## Response fields

<ResponseField name="items" type="AuditLogEntry[]" required />

<ResponseField name="nextCursor" type="number | null" required />

<ResponseField name="hasMore" type="boolean" required />

Each `AuditLogEntry`:

| Field          | Type                  | Description                                    |
| -------------- | --------------------- | ---------------------------------------------- |
| `id`           | string                |                                                |
| `actorId`      | string                | API key ID or session user ID                  |
| `actorType`    | `"api_key" \| "user"` |                                                |
| `action`       | string                | e.g. `flag.version.created`, `api_key.revoked` |
| `resourceType` | string                | e.g. `flag`, `flag_version`, `proposal`        |
| `resourceId`   | string                |                                                |
| `meta`         | object                | Action-specific metadata (see table below)     |
| `createdAt`    | string                | ISO 8601                                       |

## `meta` shapes by action

| `action`                 | `meta` fields                                       |
| ------------------------ | --------------------------------------------------- |
| `flag.created`           | `{ key, name, type }`                               |
| `flag.updated`           | `{ name?, description?, clientSafe?, archivedAt? }` |
| `flag.version.created`   | `{ flagKey, envId, version }`                       |
| `flag.proposal.created`  | `{ flagKey, envId }`                                |
| `flag.proposal.approved` | `{ flagKey, envId, version }`                       |
| `flag.proposal.rejected` | `{ envId }`                                         |
| `environment.created`    | `{ name, slug }`                                    |
| `environment.updated`    | subset of `{ name, color, protected }`              |
| `project.created`        | `{ name, slug }`                                    |
| `api_key.created`        | `{ type, description, keyPrefix }`                  |
| `api_key.revoked`        | `{ keyPrefix }`                                     |

<RequestExample>
  ```bash theme={null}
  curl "https://nest.feather.mupeni.dev/v1/projects/proj_01hx.../audit-log?limit=10&resourceType=flag" \
    -H "Authorization: Bearer <server_key>"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "items": [
      {
        "id": "al_01hx...",
        "orgId": "org_01hx...",
        "actorId": "key_01hx...",
        "actorType": "api_key",
        "action": "flag.version.created",
        "resourceType": "flag_version",
        "resourceId": "fv_02hx...",
        "meta": { "flagKey": "new-checkout", "version": 2, "environmentId": "env_01hx..." },
        "createdAt": "2024-04-02T08:00:00.000Z"
      }
    ],
    "nextCursor": null,
    "hasMore": false
  }
  ```
</ResponseExample>
