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

# Get Flag Audit Log

> Read the append-only record of who changed which flag, and when

An append-only record of every flag change, newest first. Flags are the kind of thing people flip during an incident and then disagree about afterwards.

## Authorization

<ParamField header="Authorization" type="string" required>
  Bearer token for authentication. Format: `Bearer <your-api-key>`
</ParamField>

## Required Permission

`FLAGS_READ`

## Query Parameters

<ParamField query="page" type="number" default="1">
  Page number (1-indexed).
</ParamField>

<ParamField query="limit" type="number" default="20">
  Number of entries per page (1–100).
</ParamField>

<ParamField query="flagId" type="string">
  Restrict the log to one flag's history, by UUID.
</ParamField>

## Response

<ResponseField name="results" type="FeatureFlagAuditEntry[]">
  The entries on this page, newest first.
</ResponseField>

<Expandable title="FeatureFlagAuditEntry properties">
  <ResponseField name="id" type="string">
    Unique identifier (UUID).
  </ResponseField>

  <ResponseField name="flagId" type="string | null">
    The flag's UUID, or `null` once the flag has been deleted.
  </ResponseField>

  <ResponseField name="flagKey" type="string | null">
    The flag's key at the time of the change. Recorded separately from `flagId`
    so a deleted flag's history stays readable.
  </ResponseField>

  <ResponseField name="actorType" type="string">
    `session` (a signed-in user), `apiKey`, or `system`.
  </ResponseField>

  <ResponseField name="actorId" type="string | null">
    The user ID for sessions, the API key ID for API keys, `null` for system
    actions.
  </ResponseField>

  <ResponseField name="action" type="string">
    What happened — see the table below.
  </ResponseField>

  <ResponseField name="before" type="object | null">
    The flag's state before the change. `null` for creations.
  </ResponseField>

  <ResponseField name="after" type="object | null">
    The flag's state after the change. `null` for deletions.
  </ResponseField>

  <ResponseField name="createdAt" type="string">
    ISO 8601 timestamp.
  </ResponseField>
</Expandable>

<ResponseField name="total" type="number">
  Total entries matching the filter.
</ResponseField>

<ResponseField name="page" type="number">
  Current page number.
</ResponseField>

<ResponseField name="totalPages" type="number">
  Total number of pages.
</ResponseField>

## Actions

| Action             | When                             |
| ------------------ | -------------------------------- |
| `flag.create`      | A flag was created               |
| `flag.update`      | Name or description changed      |
| `flag.value.set`   | The value changed                |
| `flag.runtime.set` | The runtime changed              |
| `flag.archive`     | The flag was archived            |
| `flag.unarchive`   | The flag was restored            |
| `flag.delete`      | The flag was permanently deleted |

A runtime change outranks a value change in the label: moving a flag to a client-readable runtime is the one edit that changes *who* can see the value. The `before`/`after` pair carries every field either way.

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.nonefivem.com/cloud/flags/audit?page=1&limit=20" \
    -H "Authorization: Bearer your-api-key"
  ```

  ```bash cURL (one flag) theme={null}
  curl -X GET "https://api.nonefivem.com/cloud/flags/audit?flagId=550e8400-e29b-41d4-a716-446655440000" \
    -H "Authorization: Bearer your-api-key"
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "results": [
      {
        "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
        "flagId": "550e8400-e29b-41d4-a716-446655440000",
        "flagKey": "new-hud",
        "actorType": "session",
        "actorId": "user_2abc123",
        "action": "flag.value.set",
        "before": {
          "name": "New HUD",
          "description": null,
          "type": "boolean",
          "value": true,
          "runtime": "shared",
          "archived": false
        },
        "after": {
          "name": "New HUD",
          "description": null,
          "type": "boolean",
          "value": false,
          "runtime": "shared",
          "archived": false
        },
        "createdAt": "2026-09-19T12:30:00.000Z"
      }
    ],
    "total": 1,
    "page": 1,
    "totalPages": 1
  }
  ```
</ResponseExample>
