---
title: "List message analytics"
method: GET
path: "/messages/analytics"
tags: ["Messages"]
---

# List message analytics

`GET /messages/analytics`

## Request

- Base URL: `https://shipmail.to/api/v1`
- URL: `https://shipmail.to/api/v1/messages/analytics`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://shipmail.to/api/auth/oauth2/authorize`, token URL `https://shipmail.to/api/auth/oauth2/token`)

List an organization-wide, analytics-safe message projection in stable ascending (updated_at, id) order. The first page is bounded by updated_before, which cannot be later than the server's current time, or by the server's current time when omitted; subsequent pages retain that snapshot in the signed cursor. The projection excludes subjects, BCC addresses, headers, free-form metadata, attachment filenames, auto-reply content, and message bodies. contact_addresses contains personal data. client_reference is caller-defined and may contain personal or customer data.

## Query parameters

- `updated_after` string, date-time
- `updated_before` string, date-time
- `cursor` string
- `limit` integer

## Headers

- `X-Shipmail-Organization` string

## Response `200`

A bounded page of analytics-safe messages.

- object
  - `data` MessageAnalytics[], required
    - `object` 'message_analytics', required
    - `id` string, required
    - `mailbox_id` string, required
    - `thread_id` string, nullable, required: Deprecated and not stable: a legacy thread ID that changes when the mail server re-threads its IDs or a relayed send's placeholder key is replaced. It remains supported in thread paths; store conversation_id instead.
    - `conversation_id` string, nullable, required: Stable Shipmail conversation identifier (thd_...). Store this: it survives thread merges and mail-server re-threading, which thread_id does not.
    - `client_reference` string, nullable, required: Caller-defined organization-scoped reference. May contain personal or customer data.
    - `direction` 'inbound' | 'outbound', required
    - `contact_addresses` string[], required: Normalized unique sender address for inbound messages or To/Cc addresses for outbound messages. BCC addresses are never included. Contains personal data. Addresses are returned as the mail server stored them, so they may not pass a strict email format check.
    - `recipient_count` integer, required: Total To, Cc, and Bcc recipients. BCC addresses are counted but never returned.
    - `attachment_count` integer, required
    - `source` 'api' | 'dashboard' | 'newsletter' | 'inbound' | 'smtp' | 'assistant', required
    - `mode` 'live' | 'test', required: The API-key data plane that owns this resource. Test resources are isolated from live delivery, quota, suppression, and reputation.
    - `status` 'scheduled' | 'queued' | 'sent' | 'delivered' | 'bounced' | 'complained' | 'failed' | 'suppressed' | 'cancelled', required
    - `scheduled_at` string, date-time, nullable, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
  - `pagination` MessageAnalyticsPagination, required
    - `next_cursor` string, nullable, required: Signed cursor for the next page. Null when the bounded snapshot is complete.
    - `has_more` boolean, required: Whether more results exist in this bounded snapshot.
    - `limit` integer, required: Maximum number of items in this page.
    - `snapshot_at` string, date-time, required: Exclusive upper bound retained across every page. Without updated_before it is a few seconds behind server time and behind the start of any database transaction still open, so no write still committing can land behind it; an updated_after later than that snapshot returns an empty page with snapshot_at equal to it. Use it as updated_after for the next incremental sync.

## Other responses

- `422`: Validation failed.
- `429`: Rate limit exceeded.

---

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