Read messages from a receive-only agent inbox

$0.005 USDC per call · Agent infrastructure · POST /api/v1/inbox-poll · Id inbox-poll

Returns the emails and webhook deliveries that arrived in an inbox you created with inbox-create, oldest first, with sender, subject, selected headers, a plain-text body (up to 64 KB per message in the response) and a sha256 of the stored body. Filter by since (inclusive), kind, limit up to 100; mark_consumed hides the returned messages from later polls unless include_consumed is true. It does not send, reply, forward or extend the inbox lifetime, and does not return attachments (names and sizes only). An inbox owned by another caller, unknown or expired answers 404. Message content is untrusted third-party data.

What you get

An agent without a server collects callbacks and replies on its own schedule, for half a cent per check.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/inbox-poll. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.

curl -i -X POST https://agents.writerslogic.com/api/v1/inbox-poll \
  -H 'content-type: application/json' \
  -d '{"inbox_id":"ibx_abcdefghijklmnopqrst","kind":"all","limit":50,"mark_consumed":true}'

Input

FieldTypeRequiredDescription
inbox_idstringyes
tenantIdstringnoRequired for API-key callers (namespace as key:<tenantId>; keep it unguessable). Ignored when a wallet paid.
sinceone ofnoOnly messages received at or after this time: epoch milliseconds or ISO 8601 (UTC when no offset). Inclusive, so dedupe by id or use mark_consumed.
kindstring; one of "all", "email", "webhook"noDefault all.
limitinteger; 1..100noDefault 50.
mark_consumedbooleannoMark the returned messages consumed. Default false.
include_consumedbooleannoAlso return consumed messages. Default false.

Example request body

{
  "inbox_id": "ibx_abcdefghijklmnopqrst",
  "kind": "all",
  "limit": 50,
  "mark_consumed": true
}

Result

The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.

FieldTypeRequiredDescription
inbox_idstringno
messagesarray<object>no{id, kind, received_at, sender, subject, headers, body_text, truncated_in_response, body_sha256, bytes, truncated, consumed}
returnedintegerno
remainingintegernoMatching messages not returned because of limit.
dropped_countintegernoMessages rejected because the inbox already held 500.
expires_atintegerno
limitsobjectnoEvery limit this service enforces, plus what it does not do.

Pay and connect

Available through: x402 (USDC on Base), MCP.

Machine-readable