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

# Audit Log API

> Retrieve the full audit trail for your v1 entities programmatically, including every event recorded against a profile by the API, the Portal, OneSDK and FrankieOne's own systems.

The Audit Log API returns the chronological record of everything that has happened to an entity: when it was created, which checks ran, what each provider returned, every manual action an operator took in the Portal, and every status or risk change along the way. It is the programmatic equivalent of the Portal's **Audit Report** tab, and the usual source for compliance evidence, support investigations and reconciliation.

<Info>
  ##### v1 entities are fully covered

  Audit events generated by v1 processing are returned by this endpoint with the event type `LEGACY_AUDIT`. You do **not** need to migrate to v2 to read your audit trail — the same credentials you use for the v1 API work here.
</Info>

## Before you start

Nothing new to set up. The Audit Log API is on the **same base URL** and uses the **same credentials** as the rest of the v1 API — your existing `api_key` and CustomerID work as they are.

| | Base URL |
| - | - |
| Production | `https://api.frankie.one` |
| UAT | `https://api.uat.frankie.one` |

The only difference from the v1 endpoints is the path: audit events are served from `/v2/audit`, rather than under the `/compliance/v1.2` prefix.

## Endpoint

```http theme={null}
GET /v2/audit
```

<Card title="Full API reference" icon="code" href="/docs/v1/api/audit-log-api/list-audit-events">
  Request and response schemas, every field, and an interactive playground.
</Card>

### Headers

| Header | Required | Description |
| - | - | - |
| `api_key` | Yes | Your FrankieOne API key. |
| `X-Frankie-CustomerID` | Yes | Your CustomerID. |
| `X-Frankie-CustomerChildID` | No | Only if your account uses child entities. |
| `X-Frankie-Channel` | No | `api`, `portal`, `smartui`, or a custom alphanumeric string up to 64 characters. |

### Filters

All query parameters are optional. Combining them narrows the result set.

| Parameter | Type | Description |
| - | - | - |
| `entityId` | string (UUID) | Return only events for this entity. This is the same `entityId` the v1 API returns when you create or query an entity. |
| `eventTypes` | array | Filter by event type, for example `LEGACY_AUDIT`, `ENTITY_CREATE`, `ENTITY_UPDATE`, `PORTAL_ACTION`, `GENERATE_REPORT`. Comma-separated. |
| `workflowNames` | array | Filter by workflow name. |
| `workflowRiskLevels` | array | Filter by risk level, for example `LOW`, `HIGH`. |
| `sources` | array | Filter by what produced the event, for example `FrankieOne System`, `Experian Connector`, or an operator's email address. |
| `requestId` | string | Return the events belonging to a single API call. See [requestId](/docs/v1/api/guide-to-the-api/common-api-objects-fields/requestid). |
| `afterTimestamp` | date | Only events on or after this date. |
| `beforeTimestamp` | date | Only events on or before this date. |
| `channels` | array | `API`, `PORTAL`, `ONESDK` or `SYSTEM`. |
| `functionNames` | array | Filter by the internal function that emitted the event. Comma-separated. |
| `sort` | string | `asc` or `desc`. |
| `sortFields` | array | Currently `timestamp`. |
| `page` | integer | Page number to retrieve. |
| `limit` | integer | Items per page. Minimum `1`, defaults to `20`. |

## Example request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET \
    'https://api.frankie.one/v2/audit?entityId=3fa85f64-5717-4562-b3fc-2c963f66afa6&limit=20&sort=desc&sortFields=timestamp' \
    -H 'api_key: 245c765b124a098d09ef8765....' \
    -H 'X-Frankie-CustomerID: 12345678-1234-1234-1234-123456789012'
  ```

  ```python Python theme={null}
  import requests

  headers = {
      'api_key': '245c765b124a098d09ef8765....',
      'X-Frankie-CustomerID': '12345678-1234-1234-1234-123456789012',
  }

  params = {
      'entityId': '3fa85f64-5717-4562-b3fc-2c963f66afa6',
      'limit': 20,
      'sort': 'desc',
      'sortFields': 'timestamp',
  }

  response = requests.get(
      'https://api.frankie.one/v2/audit',
      headers=headers,
      params=params,
  )

  for event in response.json()['events']:
      print(event['timestamp'], event['type'], event['description'])
  ```
</CodeGroup>

## Example response

```json theme={null}
{
  "requestId": "01HN9XHZN6MGXM9JXG50K59Q85",
  "meta": {
    "page": 1,
    "total": 42,
    "limit": 20,
    "count": 20,
    "sort": "desc",
    "sortFields": ["timestamp"]
  },
  "events": [
    {
      "eventId": "123e4567-e89b-12d3-a456-426614174000",
      "schemaVersion": 2,
      "level": 2,
      "requestId": "01HM5XJ7VASZ3EJMB1VQGTBFJ4",
      "type": "LEGACY_AUDIT",
      "timestamp": "2026-01-01T00:00:00.000Z",
      "source": "FrankieOne System",
      "functionName": "executeVendorCheck",
      "description": "Executing Vendor Check for Entity",
      "entityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "channel": "API",
      "eventStatus": "SUCCESS",
      "elapsedTimeInMilliSeconds": 1843
    }
  ]
}
```

## Working with the response

| Field | Use it for |
| - | - |
| `eventId` | Unique identifier for the event. |
| `type` | The kind of event. v1 processing emits `LEGACY_AUDIT`. |
| `level` | How deep the event sits: `1` is the conclusion of the whole process, `2` a sub-task, `3` finer detail within a task. Filter client-side on `level: 1` for a summary timeline. |
| `timestamp` | When the event occurred, in UTC. |
| `source` | The system, connector or operator responsible. |
| `channel` | Whether it came from the `API`, the `PORTAL`, `ONESDK` or the `SYSTEM`. |
| `description` / `descriptionDetails` | Human-readable summary and detail, as shown in the Portal's Audit Report tab. |
| `requestId` | Correlate the event back to the originating API call. Quote this to Support. |
| `eventStatus` | `SUCCESS`, `ERROR` or `INFO`. |

### Pagination

`meta.total` is the number of events matching your filters, and `meta.count` is the number returned in this page. Increment `page` until you have read `meta.total` events. Keep `sort` and `sortFields` stable across pages.

## Related

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/docs/v1/api/guide-to-the-api/getting-started/reference/authentication">
    API keys, CustomerID and ChildID.
  </Card>

  <Card title="requestId" icon="hashtag" href="/docs/v1/api/guide-to-the-api/common-api-objects-fields/requestid">
    How request identifiers tie calls to results.
  </Card>

  <Card title="Errors" icon="triangle-exclamation" href="/docs/v1/api/guide-to-the-api/getting-started/reference/errors">
    Error codes and response shapes.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.