Choose a send path
Pick SMTP, HTTP inject, or the REST API for your first send.
PostShiba accepts mail three ways. All three send from the same clusters, apply the same suppressions and firewall, and report the same delivery events.
Before you start
- A cluster that shows
sending_ready. See Clusters. - A verified domain. See Add and verify a domain.
Compare the paths
| SMTP | HTTP inject | REST API | |
|---|---|---|---|
| Endpoint | The cluster's SMTP host, port 587 | POST {http_endpoint}/api/inject/v1 on the cluster |
POST /api/v1/emails |
| Auth | SMTP username and password, AUTH PLAIN after STARTTLS | The same username and password as HTTP Basic | API key as a Bearer token |
| Body | Your own MIME message | Raw MIME, or text, HTML, headers, and attachments as JSON | JSON fields. PostShiba composes the message |
| Hosted templates | No | No | Yes |
| At your cluster's cap | Messages wait in the queue | 429 with hourly send limit reached or daily send limit reached |
429 throttled |
| Best for | Existing mail libraries and high volume | High volume from code, without an SMTP client | Lower-volume transactional sends and templates |
For high-volume sending, use SMTP or HTTP inject. The REST API also has a limit of 300 send requests per minute per API key. See REST API.
Send with the REST API
Use a Send only key from Create an API key for each app that sends. It can call POST /api/v1/emails and the cluster's POST /sends. Listing clusters, events, templates, or webhooks needs a Full access key.
unique_args comes back on every delivery event for this message. See Unique args.
from is Optional. Send from any address on a verified domain. If you leave from blank, PostShiba uses hello@ on the sending tenant's first sending-ready domain. See Sender email addresses.
POST /api/v1/emails picks a sending-ready cluster for you. To choose one, set the X-Capsule-Cluster-Id header. Every field is on Sending.
Step-by-step guides
- Send emails with SMTP
- Send emails with HTTP
- Send emails with the CLI
- SDKs for Node.js, Python, Ruby, PHP, Go, and more