# Audit

1 endpoints.

## List a workspace's audit trail

```http
GET https://orbitwrite.com/api/v1/audit-log
```

Newest-first audit entries with actor details. Owner/admin only — the trail includes member management and key/secret lifecycle events.

**Authentication:** session cookie.

### Query parameters

- `organizationId` (string, required)
- `limit` (integer, optional)
- `offset` (integer | null, optional)

### Responses

#### 200

The audit entries

- `entries` (AuditEntry[], required)
  - `id` (string, required)
  - `action` (string, required)
  - `targetType` (string | null, required)
  - `targetId` (string | null, required)
  - `metadata` (string | null, required) — JSON-encoded event details, shape varies per action
  - `ipAddress` (string | null, required)
  - `createdAt` (string, required) — ISO 8601.
  - `actorName` (string, required)
  - `actorEmail` (string, required)
  - `actorImage` (string | null, required)

#### 400

Invalid request

- `error` (string, required)
- `issues` (any[], optional)

#### 401

Not signed in

- `error` (string, required)
- `issues` (any[], optional)

#### 403

Not a member of the organization

- `error` (string, required)
- `issues` (any[], optional)
