---
title: "List Audit Trail Records"
method: GET
path: "/audit-trail"
tags: ["AuditTrail"]
---

# List Audit Trail Records

`GET /audit-trail`

## Request

- Base URL: `https://openapi.n3xt.io`
- URL: `https://openapi.n3xt.io/audit-trail`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/n3xt/apis/n3xt-api-documentation/docs/audit-trail/get.ts> (a function with typed inputs; its response is checked against the schema)

Lists all audit trail records for the authenticated user's business matching the filter criteria.

## Query parameters

- `actorId` string
- `walletId` string
- `type` 'business' | 'wallet'
- `limit` number, double
- `offset` number, double
- `orderBy` 'createdAt'
- `order` 'asc' | 'desc'

## Response `200`

Audit trail was retrieved successfully.

- union
  - AuditTrailResponse[]
    - `id` string, required
    - `actorType` string, nullable, required
    - `actorId` string, nullable, required
    - `targetEventType` string, nullable, required
    - `targetEventAction` string, required
    - `targetEventId` string, nullable, required
    - `businessId` string, nullable, required
    - `walletId` string, nullable, required
    - `metadata` unknown
    - `createdAt` string, date-time, required
    - `eventTimestamp` string, date-time, required
  - ErrorResponse
    - `error` string, required

## Other responses

- `400`: Bad Request - Invalid request parameters.
- `401`: Unauthorized - Invalid or missing authentication token.
- `403`: Forbidden - Insufficient permissions to perform this action.
- `404`: Not Found - Requested resource was not found.
- `422`: Unprocessable Entity - Validation failed for the request body.
- `500`: Internal Server Error - An unexpected error occurred while processing the request.

---

[API](https://skmtc.dev/n3xt/apis/n3xt-api-documentation.md) - [All operations](https://skmtc.dev/n3xt/apis/n3xt-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/n3xt/apis/n3xt-api-documentation/revisions/c634c45cd5b4?raw)
