---
title: "Get a team’s audit trail"
method: GET
path: "/api/v1/teams/{teamId}/audit"
tags: ["Teams"]
---

# Get a team’s audit trail

`GET /api/v1/teams/{teamId}/audit`

## Request

- Base URL: `https://charm.ing`
- URL: `https://charm.ing/api/v1/teams/{teamId}/audit`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `__Secure-better-auth.session_token`

User-gated (`chrm_user_*` or session); the caller must be an owner/admin of the team. Newest-first (unless `sort` says otherwise) feed of share/publish lifecycle events AND end-user activity (renders, API calls) for every app the team owns. Defaults to the trailing 7 days.

## Path parameters

- `teamId` string, required

## Query parameters

- `limit` integer
- `appId` string, uuid
- `actor` string
- `kind` string
- `range` 7 | 30 | 90
- `sort` 'createdAt:desc' | 'createdAt:asc'
- `cursor` string
- `format` 'csv'

## Response `200`

The team’s audit trail, as JSON or (with `format=csv`) as `text/csv`.

- TeamAuditResponse
  - `ok` true, required
  - `audit` TeamAuditRow[], required
    - `id` string, uuid, required
    - `kind` string, required
    - `appId` string, uuid, required
    - `appDisplayName` string, required
    - `actor` string, nullable, required: Null for an anonymous/public end-user viewer.
    - `actorBadges` NameBadges, required: The marks Charming shows beside a person’s name, derived from live plans at read time.
      - `pro` boolean, required: True while the person pays for a plan on their own account.
      - `affiliation` object, nullable, required: The paid team the person shows beside their name, or null for none.
        - `name` string, required
        - `logoUrl` string, uri, required
    - `client` 'Web' | 'MCP' | 'null', nullable, required
    - `createdAtMs` integer, required
    - `summary` string, required
  - `hasMore` boolean, required: True when more rows follow this page under the active sort.
  - `nextCursor` string, nullable, required: Pass back as `cursor`, with the same `sort`, for the next page. Null on the last page.

## Other responses

- `400`: Invalid `limit`, `appId`, `kind`, `range`, `sort`, or `cursor`.
- `401`: Sign-in required.
- `403`: The caller is not an owner/admin of this team.

---

[API](https://skmtc.dev/charm/apis/charming-api.md) · [All operations](https://skmtc.dev/charm/apis/charming-api/llms.txt) · [OpenAPI document](https://skmtc.dev/charm/apis/charming-api/revisions/a9d06c419b3a?raw)
