v2

latestOpenAPI 3.1.0Proprietary2026-07-26127193620.1 KB
Sending

Try send-mail without authentication (simulation)

Unauthenticated sandbox for POST /send-mail. Accepts the same request body, validates it identically, and returns a realistic synthetic success envelope with demo: true. No email is sent, queued, or stored. Use this to exercise the send flow without credentials; to send real mail, sign up at https://primitive.dev/signup for an API key and call POST /send-mail with Authorization: Bearer prim_<key>.

post/send-mail/demo

Headers

Idempotency-Keystring

Optional client-supplied idempotency key. Retrying a request with the same key returns the original result instead of performing the action a second time; if omitted the server derives one from the canonical payload hash. Safe to retry network failures without duplicating side effects.

Request body

fromstring required

RFC 5322 From header. The sender domain must be a verified outbound domain for your organization.

tostring required

Recipient address. Recipient eligibility depends on your account's outbound entitlements.

subjectstring required

Subject line for the outbound message

body_textstring

Plain-text message body. At least one of body_text or body_html is required. The combined UTF-8 byte length of body_text and body_html must be at most 262144 bytes.

body_htmlstring

HTML message body. At least one of body_text or body_html is required. The combined UTF-8 byte length of body_text and body_html must be at most 262144 bytes.

in_reply_tostring

Message-ID of the direct parent email when sending a threaded reply.

referencesstring[]

Full ordered message-id chain for the thread.

waitboolean

When true, wait for the first downstream SMTP delivery outcome before returning.

wait_timeout_msinteger

Maximum time to wait for a delivery outcome when wait is true. Defaults to 30000.

Response

Simulated send accepted. Identical shape to a fresh asynchronous /send-mail response, plus a top-level demo flag. No mail was sent.

successtrue required
demotrue required
notestring

Human-readable reminder that the response is simulated.