Skip to Content

Read message logs

Search message events and inspect waits, delivery outcomes, and rejected sends with the Samva CLI, API, or MCP.

Each log line records one event in a message's life. A send can produce several lines as it is accepted, waits, reaches a provider, and is delivered or bounces. A waiting line carries its reason, such as onboarding-review. A rejected line records a send that failed before Samva created a message and carries the error tag and request ID.

The organization log covers email, WhatsApp, and SMS, both inbound and outbound, and every message origin. It includes shared and agent mailboxes. Personal Samva Mail stays private and is excluded from the organization log.

PlanLog window
Free7 days
Starter30 days
Growth90 days
Scale90 days

Read from the terminal

samva logs prints the latest 20 lines, oldest first. Use -n to change the count, --all to walk the available window, -r for newest first, and --since or --until to bound the time. Time bounds accept durations such as 30m, 1h, or 2d, yesterday, a date, or an ISO timestamp.

samva logs status:failed --since 1h
samva logs --jsonl | jq 'select(.event=="bounced")'
samva logs show req_86c0d92e-2b8a-4139-a13a-9a90fe00c1ee

Terminal timestamps show local time with a numeric offset. Use --utc to display UTC. Piped text uses tab-separated columns in this order: timestamp, event, channel, message or rejection ID, reason or error tag, request ID, address, and subject. Piped text and JSONL use UTC ISO 8601 timestamps ending in Z.

--jsonl prints one event object per line. --json prints an array. Each event includes a cursor. Pass a cursor to samva logs --after <cursor> to follow the order Samva recorded the events in. This includes events that arrived late and can repeat lines from an initial timestamp-sorted read. After a send error, pass the printed request ID to samva logs show to look up the rejection or its message. show also accepts a message ID (msg_…) or a rejection ID (rej_…). Message detail includes its timeline, content, and recorded request data with redaction and body limits.

Follow new events

samva logs -f status:failed --jsonl | jq '{timestamp, messageId, reason}'

--follow (-f) prints recent matching lines and waits for new ones. It uses the same filter tokens as a one-time read. The CLI reconnects automatically from the last stream position. The stream retains 72 hours for replay. Use samva logs --since <time> to read older lines within your plan's log window.

Use --jsonl for one JSON object per line. --json requires a finite result and cannot be combined with --follow. Ctrl+C stops the stream with exit code 130.

Read in the dashboard

Open Activity and choose Log to read the same lines, newest first, with the same filter tokens in the filter bar. Select a line to open its message, or the error and request body of a rejected send. Turn on Live to see new events at the top as they happen.

Filter tokens

Separate tokens with spaces. Use commas for multiple event names within one token.

TokenMatches
status:, event:Event name, for example event:waiting,bounced
channel:email, whatsapp, or sms
direction:inbound or outbound
origin:Message origin, for example campaign, journey, or mailbox
key:An API key ID, for example key:apik_…
credential:session, unattributed, key:apik_…, or oauth:<client-id>
from:The sender's address or number
mailbox:, msg:, req:The mailbox, message, or request ID
after:, before:The start or end time. These tokens take times. The --after flag takes a cursor.

API and MCP

GET /v1/logs accepts filters and returns items and nextCursor. The default sort is by event time. To poll, start with orderBy=recorded&order=asc and pass the last event's cursor as after on the next call. The timestamp still reports when the event occurred. Keep the same sort and direction when paging. GET /v1/logs/{id} returns the detail. Both operations require message-read access.

In MCP, call logs_search with a query such as event:rejected after:1h or use its named fields. Its default sort is ingestion order, oldest first. Pass the last event's cursor as after on your next call. logs_get requests approval on OAuth connections before reading detail.

Related documentation

On this page