Sign in to fill these examples with your own keys. Sign in Start free trial

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

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.

send.sh
1curl -sS -X POST \ 2 -H 'Authorization: Bearer YOUR_API_KEY' \ 3 -H 'Content-Type: application/json' \ 4 -d '{"from": "hello@mail.example.com", "to": ["you@example.com"], "subject": "Hello from PostShiba", "text": "It works.", "unique_args": {"order_id": "1234"}}' \ 5 https://app.postshiba.com/api/v1/emails
send-response.json
1{ 2 "queued": true, 3 "message_id": "abc@capsule.test", 4 "from": "hello@mail.example.com", 5 "to": ["you@example.com"], 6 "subject": "Hello from PostShiba", 7 "unique_args": {"order_id": "1234"} 8}

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

Next steps