Skip to content

v3 is here — see what changed

Ship messages in minutes with the Relay API

One API for SMS, email and push. Guides, a full reference and SDKs for Node.js, Python, PHP and Go.

POST /v3/messages
$ curl https://api.relay.example/v3/messages \
    -H "Authorization: Bearer $RELAY_KEY" \
    -H "Idempotency-Key: order-1042" \
    -d channel=sms \
    -d to=+15550100001 \
    -d body="Your code is 482913"
202 Accepted{ "id": "msg_7Hq2kD", "status": "queued" }

01 — Quickstart

From zero to first message

02 — Webhooks

Verify every event in five lines

Relay signs each webhook with HMAC-SHA256. Check the signature before you trust the payload.

Verify a webhook
import crypto from 'node:crypto';

// raw body + Relay-Signature header: t=1760371200,v1=5f2c…
const [t, v1] = header.split(',').map((p) => p.split('=')[1]);
const mac = crypto.createHmac('sha256', process.env.RELAY_WEBHOOK_SECRET)
  .update(`${t}.${rawBody}`).digest('hex');
const ok = crypto.timingSafeEqual(Buffer.from(mac), Buffer.from(v1));

04 — Platform

Changelog & API status

  1. New

    API v3 is generally available

    Unified channels, idempotency keys on every write and 40% faster delivery webhooks.

  2. Security

    Webhook signatures now use HMAC-SHA256

    New endpoints sign events with SHA-256. Existing endpoints can switch in Developers → Webhooks.

  3. Improved

    Python SDK 3.1 with async support

    An AsyncClient for asyncio apps, with the same methods as the regular client.

View the full changelog →