sendgrid-webhooks

Verify SendGrid webhook signatures and process email events.

79|11|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/hookdeck/webhook-skills --skill sendgrid-webhooks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sendgrid-webhooks
Source: https://github.com/hookdeck/webhook-skills/tree/main/skills/sendgrid-webhooks
Command: npx skills add https://github.com/hookdeck/webhook-skills --skill sendgrid-webhooks

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

SendGrid's Event Webhook provides real-time event data but requires cryptographic verification to ensure authenticity. This Skill standardizes receiving, verifying, and handling SendGrid webhook events across popular web frameworks.

Core Features & Use Cases

  • Verify SendGrid signatures using ECDSA with SHA-256 to prevent replay and tampering.
  • Receive and process webhook payloads containing multiple events (delivered, bounce, open, click, unsubscribe, etc.) across Express, Next.js, and FastAPI.
  • Provide practical examples and guidance to integrate webhook handlers in Node.js and Python environments, including local testing with Hookdeck.

Quick Start

  1. Set the environment variable SENDGRID_WEBHOOK_VERIFICATION_KEY to your SendGrid public key.
  2. Run or deploy the Express, Next.js, or FastAPI example directories provided under examples/webhooks to expose the /webhooks/sendgrid endpoint.
  3. Use a test payload and an EC-SHA256 signature to verify your endpoint responds with 200 and processes events correctly.

Frequently Asked Questions about sendgrid-webhooks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify SendGrid webhook signatures in FastAPI or Express?

Verify SendGrid webhook signatures in FastAPI or Express using ECDSA with SHA-256. This Skill validates signatures against the SENDGRID_WEBHOOK_VERIFICATION_KEY environment variable to prevent replay and tampering, requiring raw request bodies for cryptographic verification.

What SendGrid webhook events can I process and parse?

You can process and parse SendGrid webhook events such as delivered, bounce, open, click, and unsubscribe. The Skill handles payloads containing multiple events simultaneously, allowing your webhook handlers to process batched email event data efficiently.

Do I need raw request bodies for SendGrid webhook signature verification?

Yes, raw request bodies are required for SendGrid webhook signature verification. The ECDSA SHA-256 cryptographic validation depends on the unmodified raw payload to accurately verify authenticity and prevent tampering before parsing event data.

Can I test SendGrid webhooks locally with Next.js or Python environments?

Yes, you can test SendGrid webhooks locally with Next.js or Python. The Skill provides practical examples and guidance for integrating webhook handlers in Node.js and Python, including local testing through Hookdeck using test payloads and EC-SHA256 signatures.

Why does my SendGrid webhook handler fail signature verification?

SendGrid webhook signature verification fails if the raw request body is modified or parsed before validation. Ensure the SENDGRID_WEBHOOK_VERIFICATION_KEY environment variable matches your SendGrid public key and that your framework delivers the unmodified raw payload to the ECDSA verifier.

Does this SendGrid webhook handler support payloads with multiple events?

Yes, this SendGrid webhook handler supports payloads containing multiple events. It correctly parses batched webhook deliveries containing numerous event types like delivered, bounce, open, and click within a single incoming HTTP request across Express, Next.js, and FastAPI.