Skip to content
Svanja

Docs API reference

Activity

The team's audit log for API access: keys, Spaces and command line sign-ins.

Activity is your team’s audit log for API access. It shows who created a Space, changed an API key, or signed in through the command line, along with when it happened. Actions taken in the app are logged too, so a key created on the API Keys page appears here alongside a Space created by a script.

To read the log, your API key needs the Activity area, which is included in Full access and Read-only keys. If a key is limited to specific Spaces, it sees events for those Spaces plus team-wide key and sign-in events. See The REST API for more on how keys work.

GET /activity records three kinds of events:

  • Spaces created, changed, or deleted
  • API keys created, changed, rotated, or revoked
  • Command line sign-ins approved or denied

You can filter the list, for example by event type or key. Results use cursor pagination, so pass meta.pagination.next_cursor as cursor to get the next page.

Operations

An operation is one thing you can do, like reading a task or starting one. Its effect says what it changes. Some operations that act outside Svanja or change access wait for a person's approval; the approval flow is on the API overview.

activity.read Reads only

Read public API activity.

GET /activity

Endpoints

Paths start at https://app.svanja.com/api/v1. Every endpoint needs an API key unless it says otherwise. A required Idempotency-Key header is listed with the parameters.

GET /activity List public API activity

Lists public API audit activity for the authenticated team. Project rows are narrowed for selected-project keys, while team-level API key and CLI authorization rows remain team-scoped. Raw activity properties, internal ids, names, token material, provider payloads, mail content, and assistant prompts are never exposed.

Parameter In Type Required Notes
per_page query integer no Page size. Defaults to 25 and is capped at 100.
cursor query string no Signed cursor returned by the previous activity page.
sort query one of occurred_at, -occurred_at no Sort activity by occurrence time. A leading dash means descending.
resource_type query one of project, api_key, cli_device_authorization no Filter activity by public resource family.
resource_id query string no Public resource id. When resource_type is present, the id must match that resource family's public id shape.
actor_key_id query string no API key display id for key-originated activity.
actor_user_id query string no Public user ULID for user-originated activity.
event_type query one of project_created, project_updated, project_deleted, team_api_key_created, team_api_key_renamed, team_api_key_preset_changed, team_api_key_expiration_changed, team_api_key_rotated, team_api_key_revoked, team_api_key_project_scope_changed, cli_device_authorization_approved, cli_device_authorization_denied, cli_device_authorization_consumed no Public activity event identifier.
created_from query string no Inclusive occurred_at lower bound. Must include seconds and Z or an explicit UTC offset.
created_to query string no Inclusive occurred_at upper bound. Must include seconds and Z or an explicit UTC offset.

Status codes: 200, 401, 403, 422, 429

This page as plain Markdown, for AI tools: activity.md

Try Svanja with your own mailbox

Sign up now, and you get an email when your account is ready.