Documentation
Docs
One endpoint to send. One call to check.
Quickstart
Create a key and a sender identity in the dashboard. Keys start with sk_ and are shown once. Then send the first message:
curl -X POST https://weir.itcass.net/v1/send \
-H "Authorization: Bearer $WEIR_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "Acme ",
"to": "you@example.com",
"subject": "Hello",
"text": "It works."
}'
The API accepts the message and returns an id:
{
"id": "msg_01HZY4K8",
"status": "queued"
}
Check it with GET /v1/messages/msg_01HZY4K8.
Authentication
Send the key in the Authorization header:
Authorization: Bearer sk_live_...
Keys belong to one account. Create and revoke them in the dashboard. Revocation takes effect on the next request.
Sender identities
Every account sends through one relay with its own SMTP login. Add each mailbox in the dashboard: name, From address, SMTP user, password, and bounce address.
Passwords are encrypted at rest and never shown again. One identity is the default; the message stores the identity chosen when it was queued.
Domains
Adding a domain returns five records: MX, SPF, DMARC, DKIM, and a verification TXT. Publish them, then call POST /v1/domains/:id/verify.
Verification checks the DKIM and verification TXT. The domain then moves to pending_activation. Sending is blocked until the operator adds the domain to the mail host and activates it.
Activation checks that MX includes the relay host, exactly one SPF authorizes the relay, DKIM still matches, and DMARC is absent (warning) or valid. A broken DMARC blocks activation.
Suspended domains stop sending. Sending from an active domain is allowed for that account only.
Send
POST /v1/send accepts one message per request.
| Field | Type | Required | Notes |
|---|---|---|---|
from | string | yes | Name and address: Acme <hello@mail.acme.com> |
to | string or array | yes | Up to 50 recipients |
subject | string | yes | Required unless a template sets it |
text | string | no | Plain text body |
html | string | no | HTML body; send text as the plain-text alternative |
template | string | no | Template id or alias |
data | object | no | Variables passed to the template |
reply_to | string | no | Reply address |
headers | object | no | Extra headers; reserved names are rejected |
Statuses
Status words are fixed. The API, the dashboard, and the webhooks use the same six:
| Status | Meaning |
|---|---|
queued | Accepted; waiting for the mail provider |
delivered | The receiving server accepted the message |
deferred | Temporary failure; retrying |
bounced | Permanent SMTP failure; not retried |
expired | The 72-hour retry window ended before acceptance |
sandboxed | Test-key message; never sent over SMTP |
Deferred messages retry for 72 hours. Every attempt appears in the message log with a timestamp.
Webhooks
Register an endpoint in the dashboard. Each delivery event is one POST with a JSON body:
{
"event": "delivered",
"id": "evt_01HZY5M2",
"messageId": "msg_01HZY4K8",
"detail": "250 2.0.0 Ok: queued as 4F2C",
"at": "2026-11-29T14:02:11Z"
}
Events: delivered, deferred, bounced, expired, and rejected_recipient for a partial reject.
Verify the signature header before you trust the body:
Weir-Signature: t=1796124131,v1=hex-hmac-sha256
Compute HMAC-SHA256 over timestamp + "." + raw body with the signing secret. Reject requests older than five minutes.
Errors
Errors name the cause and the fix. The message is for the person reading the log, not for the end user.
{
"error": {
"code": "domain_not_verified",
"message": "Domain not verified. Add the DKIM record and the verification TXT, then retry."
}
}
| Code | Status | Fix |
|---|---|---|
invalid_request | 400 | Read the field note in the message |
unauthorized | 401 | Send a valid key in the Authorization header |
domain_not_verified | 403 | Publish the DNS records we generate, then retry |
domain_pending_activation | 403 | Wait for the operator to activate the domain |
smtp_identity_missing | 400 | Add a sender identity in the dashboard |
not_found | 404 | Check the id; messages and keys are account-scoped |
rate_limited | 429 | Wait for Retry-After seconds |
Send limit: 120 requests per minute per key. The response carries Retry-After in seconds.
Migration
Coming from SendGrid? One endpoint, one cutover.
Point the base URL at https://weir.itcass.net/v1. Templates move with you. Compare logs side by side, then move the cutover when you decide.
Changelog
2026-11-29 — Docs and pricing published. Send, message status, webhooks, and errors documented.