---
title: "Get mailbox activity"
method: GET
path: "/v1/mailboxes/{id}/agent-activity"
tags: ["Mailboxes"]
---

# Get mailbox activity

`GET /v1/mailboxes/{id}/agent-activity`

## Request

- Base URL: `https://api.samva.dev`
- URL: `https://api.samva.dev/v1/mailboxes/{id}/agent-activity`
- Auth: API key in header `x-api-key`

Counts the actions proposed and events recorded on a mailbox between `after` and `before` (omit both for all time), and the sends waiting for approval now. List the actions and events themselves with `GET /v1/mailboxes/{id}/actions` and `GET /v1/mailboxes/{id}/events`.

## Path parameters

- `id` string, required

## Query parameters

- `after` string, nullable
- `before` string, nullable

## Response `200`

MailboxAgentActivity

- MailboxAgentActivity
  - `actions` object, required
    - `byType` object[], required
      - `type` 'sendMessage' | 'reply' | 'updateDraft' | 'createNote' | 'assignThread' | 'changeThreadState' | 'call' | 'extensionRequest', required
      - `count` integer, required
    - `byState` object[], required
      - `state` 'proposed' | 'allowed' | 'approvalRequired' | 'policyDenied' | 'approved' | 'approvalDenied' | 'executing' | 'executed' | 'failed' | 'queued' | 'accepted' | 'completed' | 'notSent' | 'uncertain', required
      - `count` integer, required
  - `events` object, required
    - `byType` object[], required
      - `type` 'mailbox.created' | 'endpoint.attached' | 'endpoint.detached' | 'message.received' | 'message.released' | 'message.sent' | 'thread.created' | 'action.proposed' | 'action.policy_decided' | 'action.approval_requested' | 'action.approval_resolved' | 'action.accepted' | 'action.executed' | 'action.failed', required
      - `count` integer, required
  - `pendingApprovals` integer, required

## Other responses

- `401`: UnauthorizedError
- `403`: ForbiddenError
- `404`: ResourceNotFoundError
- `422`: ValidationError
- `500`: InternalError
- `504`: GatewayTimeoutError

---

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