mailersend-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and verify MailerSend webhooks. Use when setting up MailerSend webhook handlers, debugging MailerSend signature verification with the `Signature`…
от hookdeck★ 104 звезды на GitHubОб этом скилле
MailerSend Webhooks
When to Use This Skill
- How do I receive MailerSend webhooks?
- How do I verify a MailerSend webhook signature?
- Why is my MailerSend
Signatureheader verification failing? - Why won't my MailerSend webhook save / why does the URL validation fail?
- What is
webhook.testand thetest_Am3L1GuOIc4blLUuHqAPxxwkZaJyEk8Gsecret? - How do I handle
activity.hard_bounced/activity.spam_complaintevents? - How do I handle MailerSend SMS webhooks (
sms.sent,sms.delivered,sms.failed)?
MailerSend, not MailerLite. MailerSend is the transactional email and SMS API from the MailerLite group (developers.mailersend.com). MailerLite (marketing email) is a separate product with a separate webhook scheme. This skill is not for Mailgun, Mailchimp or Resend either.
Verification (core)
Signature: <lowercase hex HMAC-SHA256 of the RAW request body>, keyed with the
per-webhook Signing Secret. No timestamp, no nonce, no version prefix, no
field concatenation — the header value is the bare digest.
const crypto = require('crypto');
// MailerSend signs its URL-validation ping with this FIXED, PUBLICLY DOCUMENTED
// secret — not your signing secret. Accept it, but only for `webhook.test`.
const MAILERSEND_TEST_SECRET = 'test_Am3L1GuOIc4blLUuHqAPxxwkZaJyEk8G';
function verifySignature(rawBody, signature, secret) {
if (!signature || !secret) return false;
const expected = crypto.createHmac('sha256', secret).update(rawBody).digest('hex');
const a = Buffer.from(String(signature).trim().toLowerCase(), 'utf8');
const b = Buffer.from(expected, 'utf8');
// timingSafeEqual THROWS on a length mismatch — guard the length first
return a.length === b.length && crypto.timingSafeEqual(a, b);
}
// rawBody MUST be the exact bytes received. Re-serialising parsed JSON breaks it.
const signature = req.header('Signature');
const signedByYou = verifySignature(rawBody, signature, process.env.MAILERSEND_WEBHOOK_SECRET);
const signedByPing = !signedByYou && verifySignature(rawBody, signature, MAILERSEND_TEST_SECRET);
if (!signedByYou && !signedByPing) return res.status(401).send('Invalid signature');
// After parsing: if signedByPing, require type === 'webhook.test' — the test
// secret is public, so it must never authorise a real event.
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.
The official Node SDK (mailersend) ships MailerSendUtils.verifyWebHook(rawBody, headersOrSignature, signingSecret),
exported from the package entry point in current releases (3.9.0). It reads the
Signature header, guards the length before timingSafeEqual, and works for
email, SMS and WhatsApp webhooks. It throws when the body, header or secret
is missing, so wrap it in try/catch and answer 401. Verifying manually, as
above, is equivalent. See references/verification.md.
The webhook.test Ping (read this before your first webhook fails to save)
When you create or update an email or SMS webhook, MailerSend immediately calls the URL to validate it. If that request does not get a 2xx, the webhook is not saved.
{
"type": "webhook.test",
"message": "This is a ping test message",
"created_at": "2026-03-27T07:24:20.577080Z"
}
Two traps:
- Different envelope. It carries
message, notdata. Code that doespayload.data.idunconditionally will 500 on the ping. - Different secret. It is signed with the fixed, publicly documented
test_Am3L1GuOIc4blLUuHqAPxxwkZaJyEk8G, not your webhook's signing secret. A handler that only checks the real secret rejects the ping and the webhook never saves.
Because that secret is public, anyone can forge a valid webhook.test.
Accept it, return 200, and never let it gate privileged work.
Payload Envelope
Real events:
{
"type": "activity.sent",
"created_at": "2025-08-05T21:23:54.000000Z",
"data": {
"id": "6892766a5b66e2daf3dc9155",
"domain_id": "yv69oxl5kl785kw2",
"message_id": "6892766ae78995a317577aa1",
"email_id": "6892766a8d52ba62543d5e71",
"type": "sent",
"subject": "Test email",
"recipient": "[email protected]",
"tags": ["test", "test2"],
"meta": []
}
}
- This is the version 2 payload. Email webhooks have a
versionsetting: version 1 (nesteddata.emailobject) stops working on December 1, 2026. Dashboard webhooks default to 2, but the create-webhook API still defaults to1, so send"version": 2. A version 2 webhook can't go back to 1. data.typeis the bare activity name (sent), without theactivity.prefix. The unique events print the non-unique word (opened,clicked).data.metais an empty ARRAY[]when there is nothing to report, and an object otherwise. This breaks naive typed dese
Установить mailersend-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл mailersend-webhooks?
Receive and verify MailerSend webhooks. Use when setting up MailerSend webhook handlers, debugging MailerSend signature verification with the `Signature` header (HMAC-SHA256 hex over the raw body), handling the `webhook.test` URL validation ping, or handling MailerSend activity events like activity.sent, activity.delivered, activity.hard_bounced, activity.opened, activity.clicked and activity.spam_complaint. Also covers MailerSend SMS webhooks (sms.sent, sms.delivered, sms.failed) and WhatsApp webhooks (whatsapp.delivered, whatsapp.inbound and others). MailerSend is the transactional email/SMS API — not MailerLite, Mailgun, Mailchimp or Resend.
Как установить скилл mailersend-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл mailersend-webhooks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic