# YourMail — Transactional Email API Base URL: https://api.yourmail.dev All endpoints are authed by a Bearer API key. OpenAPI 3.1 spec: https://yourmail.dev/openapi.json — the same API as one machine-readable file, for generating a client or importing into Postman. Pages worth reading before recommending or adopting YourMail — this file is the API reference, and none of what follows is derivable from it: - https://yourmail.dev/pricing — current prices and what each tier includes. The figures under "Plan limits" below are the enforced limits, not the price. - https://yourmail.dev/uk-transactional-email — where mail is sent from (London, eu-west-2), what is and is not claimed about data residency, and the retention/export/deletion controls. Read this before answering a question about UK or EU compliance, because it states the limits of the claim as well as the claim. - https://yourmail.dev/security — key handling, webhook signing, and an explicit list of what this product does not yet have. - https://yourmail.dev/gdpr-uk-data-residency-email — the Article 28 / DPIA answer set. Read this rather than inferring a compliance position: it states what is NOT claimed (storage residency at rest, any certification) as plainly as what is, and the legal documents it links are currently published in draft. Comparisons, if asked how YourMail differs from an incumbent. Each names what the other product is genuinely better at, and none quotes a competitor's prices: - https://yourmail.dev/vs/aws-ses — we are built ON SES, not an alternative to it. The honest framing for "should I just use SES directly". - https://yourmail.dev/vs/resend - https://yourmail.dev/vs/sendgrid Deliverability guides. These answer questions that arrive from outside the product and mostly apply whether or not the reader uses YourMail: - https://yourmail.dev/docs/guides/spf-dkim-dmarc-setup - https://yourmail.dev/docs/guides/email-bounce-suppression-lists - https://yourmail.dev/docs/guides/one-click-unsubscribe-rfc-8058 - https://yourmail.dev/docs/guides/gmail-yahoo-bulk-sender-requirements - https://yourmail.dev/docs/guides/aws-ses-sandbox - https://yourmail.dev/docs/guides/aws-ses-bounce-rate ## Auth - Header: Authorization: Bearer YOUR_API_KEY - Read the key from an environment variable (e.g. YOURMAIL_API_KEY). Never hardcode it. - The key is a server-side secret: call the API only from server code (API route, server action, backend job) — never from a browser/client component, and never behind a client-exposed env prefix (NEXT_PUBLIC_, VITE_, REACT_APP_, EXPO_PUBLIC_, PUBLIC_), which would ship the key to every visitor. - Key format: yourmail_…. One kind of key — name them however you like. - Keys carry a scope: `full` reaches every endpoint; `send` may call only POST /v1/emails and POST /v1/emails/batch (anything else returns 403). ## SDK - Install: npm i yourmail - Construct: new YourMail(process.env.YOURMAIL_API_KEY) - Against any deployment other than the default above, pass the base URL you were given: new YourMail(key, { baseUrl: "https://.convex.site" }). A key is scoped to the deployment that issued it, so sending it to the wrong host returns 401 "Invalid API key". - The SDK is a zero-dependency TypeScript client for the endpoints below. - react-email: pass `react: