Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

sent-dm-webhooks

БесплатноЗапускает вложенные скриптыНе проверен

Receive and verify Sent (sent.dm) webhooks, a multi-channel messaging API (SMS, WhatsApp, RCS, voice) that signs deliveries with the Standard Webhooks scheme…

hookdeckот hookdeck★ 104 звезды на GitHub

Об этом скилле

Sent Webhooks

Sent is a multi-channel messaging API (SMS, WhatsApp, RCS, voice). When a message changes status, a contact replies, a template is reviewed, a sender channel changes, a contact's consent changes, or a tracked link or call produces an event, Sent POSTs one signed JSON event to every webhook subscribed to it.

Sent signs with the Standard Webhooks scheme. Every webhook has a webhook_version, fixed when it's created: version 2, the default since October 2026, sends the standard webhook-id, webhook-timestamp and webhook-signature headers, and version 1, Sent's original delivery that it says will be retired, sends the same scheme on X-Webhook-* headers. Both deliver the same JSON body and use the same whsec_ secret format, so read version 2's headers first and fall back to version 1's.

When to Use This Skill

  • How do I receive Sent (sent.dm) webhooks?
  • How do I verify a Sent webhook-signature or X-Webhook-Signature?
  • Where do I find my Sent webhook signing secret (whsec_...)?
  • How do I handle message.delivered, message.failed or message.received events?
  • Why does Sent webhook signature verification fail?
  • How do I dedupe Sent webhook retries (webhook-id or X-Webhook-Event-ID)?

Verification (core)

Version 2 (default) Version 1 Value
webhook-id X-Webhook-ID Signed id. On version 2 it's the message id, identical on every attempt and the dedupe key. On version 1 it's the webhook configuration's UUID, the same on every event, so not a dedupe key
webhook-timestamp X-Webhook-Timestamp Unix seconds when this attempt was signed (changes on every retry)
webhook-signature X-Webhook-Signature One or more space-separated v1,<base64 HMAC-SHA256> entries
(use webhook-id) X-Webhook-Event-ID Version 1's event UUID, identical on every attempt. Dedupe on this

Signed content is {id}.{timestamp}.{raw body}, HMAC-SHA256, base64, prefixed v1,. The key is the base64-decoded part of the secret after whsec_. The Sent SDKs do not verify inbound webhooks, so use the standardwebhooks library (npm and PyPI). It reads version 2's headers as they arrive; for version 1, pass Sent's X-Webhook-* values under the names it reads. Do not use the svix library, which reads svix-* headers.

const { Webhook } = require('standardwebhooks');

// rawBody: exact request body string, NOT re-serialised JSON
// Version 2 headers first, then version 1's X-Webhook-* names.
function verifySentWebhook(rawBody, headers, secret = process.env.SENT_WEBHOOK_SECRET) {
  return new Webhook(secret).verify(rawBody, {
    'webhook-id': headers['webhook-id'] ?? headers['x-webhook-id'],
    'webhook-timestamp': headers['webhook-timestamp'] ?? headers['x-webhook-timestamp'],
    'webhook-signature': headers['webhook-signature'] ?? headers['x-webhook-signature'],
  }); // returns the parsed event; throws → respond 401
}

Python: from standardwebhooks.webhooks import Webhook, then Webhook(secret).verify(await request.body(), {"webhook-id": ..., "webhook-timestamp": ..., "webhook-signature": ...}) with the same version 2 then version 1 header lookup. In Express, read the body with express.raw({ type: '*/*' }) so any content type verifies.

Timestamp window. The library always rejects timestamps more than 5 minutes off. Sent signs each retry when it sends it, so Sent's own retries pass. Hookdeck retries and replays resend the original timestamp, so the library rejects them once they are over 5 minutes old. If you receive through Hookdeck and need late retries to pass, use the dependency-free verifier in references/verification.md and widen or disable its window.

For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.

Event Envelope

{ "field": "message", "event": "message.delivered", "timestamp": "2025-10-31T10:10:42Z",
  "payload": { "message_id": "8ba7b830-...", "outbound_number": "+1987654321",
               "message_status": "DELIVERED", "channel": "sms", "body": "Hi Jane, ..." } }

Dispatch on the body's event field (field is the parent family). Version 1 also sends the name in X-Webhook-Event-Type; version 2 sends no event-type header. Some events also carry a request_id.

Common Event Types

Event Fired when
message.delivered The message reached the recipient's device
message.failed The message failed (payload.reason_code, payload.reason)
message.received A contact sent an inbound message (payload.text, payload.inbound_number)
templates.approved / templates.rejected A template review finished
contact.opt_out A contact opted out (
Полный SKILL.md на GitHub

Установить sent-dm-webhooks в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

examples/express/.env.exampleexamples/express/README.mdexamples/express/package.jsonexamples/express/src/index.jsexamples/fastapi/.env.exampleexamples/fastapi/README.mdexamples/fastapi/main.pyexamples/fastapi/requirements.txtexamples/fastapi/test_webhook.pyexamples/nextjs/.env.exampleexamples/nextjs/README.mdexamples/nextjs/app/webhooks/sent-dm/route.tsexamples/nextjs/package.jsonexamples/nextjs/vitest.config.tsreferences/overview.mdreferences/setup.mdreferences/verification.md

FAQ

Что делает скилл sent-dm-webhooks?

Receive and verify Sent (sent.dm) webhooks, a multi-channel messaging API (SMS, WhatsApp, RCS, voice) that signs deliveries with the Standard Webhooks scheme: webhook-* headers on version 2 webhooks (the default) and X-Webhook-* headers on version 1. Use when setting up a Sent webhook endpoint, getting the whsec_ signing secret, debugging webhook-signature or X-Webhook-Signature verification, deduping retries, or handling events like message.delivered, message.failed, message.received, templates.approved and contact.opt_out.

Как установить скилл sent-dm-webhooks?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл sent-dm-webhooks запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить sent-dm-webhooks с