Webhooks

Taysend POSTs message events to your endpoint. Each request is signed in the X-Taysend-Signature header.

Signature

Every request carries two headers: X-Taysend-Signature and X-Taysend-Event (the event type). The signature value has the format t=timestamp,v1=hex where hex is HMAC-SHA256 of `${timestamp}.${rawBody}` with your endpoint secret. Reject if |now − t| > 300s (configurable).

Request headers
POST /your/webhook/path
Content-Type: application/json
X-Taysend-Signature: t=1763460000,v1=5f2b9c…
X-Taysend-Event: message.delivered
verify (node)
import { createHmac, timingSafeEqual } from "node:crypto";

// header = req.headers["x-taysend-signature"], rawBody = the body as received
function verify(header, rawBody, secret, now = Math.floor(Date.now() / 1000)) {
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=").map((s) => s.trim())));
  const timestamp = Number(parts.t);
  if (!timestamp || Math.abs(now - timestamp) > 300) return false;
  const expected = createHmac("sha256", secret).update(`${timestamp}.${rawBody}`).digest("hex");
  const left = Buffer.from(expected);
  const right = Buffer.from(parts.v1 ?? "");
  return left.length === right.length && timingSafeEqual(left, right);
}
With the Node SDK: verifyWebhookSignature({ secret, header, rawBody }) from @taysend/sdk.

Payload

A message event carries the message id, its status and both numbers. id at the top is the event id.

message.delivered
{
  "id": "evt_01hx...",
  "type": "message.delivered",
  "api_version": "2026-08-01",
  "data": {
    "id": "msg_01hx...",
    "status": "DELIVERED",
    "to": "+233200000001",
    "from": "TAYSEND",
    "environment": "TEST"
  }
}
Every active endpoint on the account gets the event, whatever it is set to. Check data.environment to tell TEST from LIVE.

Events

Delivery is at-least-once. Dedupe on the event id in the payload. Retry offsets: 0, 1m, 5m, 15m, 1h, 6h, 24h.

message.queuedTaysend accepted the send and queued it.
message.submittedThe network took the message.
message.deliveredThe delivery report says delivered.
message.failedThe delivery report says failed or undelivered, or the network rejected it after accepting it.
message.expiredThe network gave up before the handset was reached.
message.rejectedThe network refused the message.
message.receivedSomeone replied to your number. The payload carries the text.

message.failed follows a delivery report. A message that fails before it reaches the network sends no event: poll GET /v1/messages/:id. The console also lists campaign, wallet and sender ID events; Taysend does not send those yet.