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).
POST /your/webhook/path
Content-Type: application/json
X-Taysend-Signature: t=1763460000,v1=5f2b9c…
X-Taysend-Event: message.deliveredimport { 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);
}Payload
A message event carries the message id, its status and both numbers. id at the top is the event id.
{
"id": "evt_01hx...",
"type": "message.delivered",
"api_version": "2026-08-01",
"data": {
"id": "msg_01hx...",
"status": "DELIVERED",
"to": "+233200000001",
"from": "TAYSEND",
"environment": "TEST"
}
}Events
Delivery is at-least-once. Dedupe on the event id in the payload. Retry offsets: 0, 1m, 5m, 15m, 1h, 6h, 24h.
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.