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.

FieldTypeRequiredNotes
fromstringyesName and address: Acme <hello@mail.acme.com>
tostring or arrayyesUp to 50 recipients
subjectstringyesRequired unless a template sets it
textstringnoPlain text body
htmlstringnoHTML body; send text as the plain-text alternative
templatestringnoTemplate id or alias
dataobjectnoVariables passed to the template
reply_tostringnoReply address
headersobjectnoExtra headers; reserved names are rejected

Statuses

Status words are fixed. The API, the dashboard, and the webhooks use the same six:

StatusMeaning
queuedAccepted; waiting for the mail provider
deliveredThe receiving server accepted the message
deferredTemporary failure; retrying
bouncedPermanent SMTP failure; not retried
expiredThe 72-hour retry window ended before acceptance
sandboxedTest-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."
  }
}
CodeStatusFix
invalid_request400Read the field note in the message
unauthorized401Send a valid key in the Authorization header
domain_not_verified403Publish the DNS records we generate, then retry
domain_pending_activation403Wait for the operator to activate the domain
smtp_identity_missing400Add a sender identity in the dashboard
not_found404Check the id; messages and keys are account-scoped
rate_limited429Wait 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.