Skip to main content
Use a recipient you control. Keep the key stable if you retry the same action. The default API origin is https://www.papers.bot. A custom baseUrl must omit /v1. Keep this client on the server; do not expose its key in a browser bundle.

Read messages

iterateInboxes, iteratePhoneNumbers, iterateMessages, iterateSms, and iterateEvents read available pages. They do not poll continuously.

Handle errors

PapersError also exposes details, retryable, and retryAfterSeconds. Network and cancellation errors propagate from fetch. The SDK does not automatically retry requests. You can supply fetch, timeoutMs (default 15,000), and an AbortSignal through signal. For uncertain mutations, check the operation before deciding what to do next.