Sign inCreate account
// 01 / DEVELOPER DOCUMENTATION

Build your first
message route.

Exact endpoints, request fields, limits, events, and SDK examples for the current POSTA API.

// 01 / INTRODUCTION

A small API surface.
A complete message record.

POSTA sends product email through Azure Communication Services while keeping projects, domain identity, quota, suppressions, provider events, webhook attempts, and inbound conversations in one operational surface.

API keys belong on a trusted server.

Never expose a pa_… key in browser JavaScript, a mobile binary, a public repository, or client-visible logs.

// 02 / QUICKSTART

Send an email

Create an API key, verify the domain used in the From address, install the SDK, and make the request from your server.

import { Posta } from "@esaart/posta";

const posta = new Posta(process.env.POSTA_API_KEY);

const message = await posta.emails.send({
  from: "Product <hello@mail.acme.dev>",
  to: "maya@example.net",
  subject: "Your workspace is ready",
  html: "<strong>Welcome to Acme.</strong>",
  idempotencyKey: "welcome/user_482"
});
SUCCESS201 CREATED · email_msg_…
// 03 / AUTHENTICATION

Use one bearer token.

Authenticate every public API request with a project API key. Sending keys can send; full keys can also read message history. A key may additionally be restricted to one sending domain.

HEADERAuthorization: Bearer pa_••••••••
// 04 / SEND AN EMAIL

One endpoint,
three content paths.

Send inline HTML, plain text, or a stored template. from and to are always required; subject is required unless the template supplies one.

fromrequired

Name and address on a verified project domain.

torequired

One address or an array of up to 50 recipients.

html / textcontent

Provide either format, both formats, or a template.

templatecontent

Stored template ID or slug; variables fill {{tokens}}.

reply_tooptional

Address that receives recipient replies.

attachmentsoptional

Up to 10 direct uploads (25 MB each / 100 MB total) or 2.5 MB inline base64.

// 05 / BATCH SENDING

Send up to 100
message objects.

POST /api/v1/emails/batch accepts a bare array or an { emails: […] } object. The entire batch may contain at most 100 recipients, and each result independently contains an ID or an error.

ENDPOINTPOST /api/v1/emails/batch
// 06 / SCHEDULED EMAIL

Accept now.
Dispatch later.

Set send_at to a future ISO 8601 timestamp. The Node SDK field is scheduledAt. Attachments uploaded with posta.attachments.upload remain available to scheduled sends without placing binary data in the scheduler record.

FIELDsend_at: "2026-08-20T09:00:00Z"
// 07 / TEMPLATES

Version content.
Send by slug.

Pass a template ID or slug and a string-to-string variables object. Variables interpolate into the stored subject and HTML; a request subject overrides the template subject.

template-send.json
{
  "from": "hello@mail.acme.dev",
  "to": "maya@example.net",
  "template": "workspace-ready",
  "variables": { "name": "Maya" }
}
// 08 / IDEMPOTENCY

Retries without
duplicate sends.

Supply a stable Idempotency-Key for the logical product action. Repeating it returns the saved response with Idempotent-Replay: true instead of sending again.

HEADERIdempotency-Key: order_482_receipt
// 09 / WEBHOOKS

Subscribe to durable events.

POSTA signs the raw body with HMAC-SHA256 in Posta-Signature. Failed attempts are retried after 1 minute, 5 minutes, 30 minutes, and 2 hours — five attempts total — with history visible in the dashboard.

01email.sentoutbound02email.deliveredoutbound03email.openedoutbound04email.clickedoutbound05email.bouncedoutbound06email.complainedoutbound07email.receivedinbound
// 10 / INBOUND EMAIL

Turn replies into
application data.

After an inbound provider and MX route are configured, POSTA stores messages as hosted conversations and emits a normalized email.received webhook with text, HTML, headers, and attachment metadata. Your application consumes that signed event; it does not call the provider-ingestion route directly.

Explore the receive surface
// 11 / DOMAINS

Verify identity
before sending.

Add a domain in the dashboard and publish the exact ownership, SPF, DKIM selectors, and DMARC guidance POSTA returns from Azure ACS. A domain-scoped key cannot send from any other domain.

DNS values are domain-specific.

Copy them from Dashboard → Domains. Do not reuse sample records from documentation.

// 12 / RECIPIENT VALIDATION

Catch obvious risk
before a send.

POST /api/v1/validate checks syntax, likely provider typos, disposable domains, role addresses, and MX availability. It accepts one email or up to 100 emails. This is a hygiene signal, not proof that a mailbox exists.

// 13 / ERRORS

Useful failures,
one response shape.

Errors return { "error": { "message": "…" } }. Fix 400/401/402/403/422 responses before retrying. For 429, respect Retry-After. Retry transient 5xx responses with backoff and an idempotency key.

401HTTP

Invalid or missing API key.

402HTTP

Monthly plan quota reached.

403HTTP

Permission, domain scope, or project pause.

422HTTP

Invalid content, limits, template, or recipients.

429HTTP

Per-minute or daily rate limit.

502 / 503HTTP

Provider or required infrastructure unavailable.

// 14 / LIMITS

Explicit boundaries.

Single sends allow 50 recipients, 500 subject characters, approximately 1 MB of HTML plus text, and 10 direct-upload attachments up to 25 MB each / 100 MB total. Up to 7 MB raw is delivered as MIME; larger selections use private seven-day links. Legacy base64 requests retain a 2.5 MB total limit. Batch requests allow 100 items and 100 total recipients. Validation accepts 100 addresses.

// 15 / SDKs & CLI

Use the interface
that fits the job.

The implemented clients are the zero-dependency Node/TypeScript package @esaart/posta, the Python distribution esaart-posta, and the Node 18+ CLI @esaart/posta-cli.

npm i @esaart/postaNode / TypeScript

Typed sends, batch, validation, listing, attachments, and signature verification.

pip install esaart-postaPython 3.8+

Send, batch, validation, listing, attachments, and signature verification.

npm i -g @esaart/posta-cliCLI

Send, batch, validate, and list from a terminal.

// 16 / LLM REFERENCE

Documentation
for AI tools.

/llms.txt is the concise index. /llms-full.txt contains the complete integration context suitable for coding agents and answer engines.

Open the complete LLM reference