---
title: "List a customer's audit events (admin SPA drilldown)"
method: GET
path: "/api/admin/customers/{customerId}/audit-events"
tags: ["admin"]
---

# List a customer's audit events (admin SPA drilldown)

`GET /api/admin/customers/{customerId}/audit-events`

## Request

- Base URL: `https://api.signalraven.ai`
- URL: `https://api.signalraven.ai/api/admin/customers/{customerId}/audit-events`
- Auth: none declared

Admin-side view of the same audit_events feed /api/me/audit-events exposes to customer admins+managers. Customer is scoped via the URL param (not session — admin tooling spans customers). Cursor + response shape match the /me variant so the dashboard SPA can reuse the portal's row-rendering logic.

## Path parameters

- `customerId` string, uuid, required

## Query parameters

- `limit` integer
- `cursor` string

## Response `200`

Audit-event page

- AuditEventListResponse
  - `items` AuditEvent[], required
    - `id` string, uuid, required
    - `eventType` string, required: Machine-readable event identifier (e.g. team.member_invited, team.role_changed, team.member_removed, trial.inactivity_deactivated, credit.grant.reconciled). Stable enough for the FE to switch on; the canonical list lives in src/services/*/audit emitters.
    - `actorUserId` string, uuid, nullable, required
    - `actorEmail` string, email, nullable, required: Email of the customer-side actor at the time of the event. Hydrated server-side from users.email; nullable when the row was actorless (system/admin) or the actor row has been hard-deleted.
    - `actorAdminId` string, nullable, required: Set when a Zygnal-internal admin tool wrote the event. Mutually exclusive with actorUserId/actorEmail.
    - `actorRemoved` boolean, required: True when the actorUserId no longer has a customer_users link to THIS customer. Same semantics as the notifications endpoint — FE renders "Alice (removed)" so the reader knows the actor is no longer on the team.
    - `resourceId` string, uuid, nullable, required
    - `metadata` object, nullable, required: Free-form per-event metadata. Shape varies by eventType; the FE pretty-prints it inside an expandable details disclosure.
    - `occurredAt` string, date-time, required
  - `nextCursor` string, nullable, required: Opaque pagination cursor. Pass back via ?cursor= to get the next (older) page. Null when there are no more rows. Page size is fixed via the ?limit query param (default 50, max 100).

## Other responses

- `404`: Unknown customerId

---

[API](https://skmtc.dev/signalraven/apis/zygnal-api.md) · [All operations](https://skmtc.dev/signalraven/apis/zygnal-api/llms.txt) · [OpenAPI document](https://skmtc.dev/signalraven/apis/zygnal-api/revisions/36e1d9b9d604?raw)
