[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-twilio-twilio-sendgrid-webhooks":3,"mdc-xwubaz-key":35,"related-org-twilio-twilio-sendgrid-webhooks":1498,"related-repo-twilio-twilio-sendgrid-webhooks":1679},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":25,"repoUrl":26,"updatedAt":27,"license":28,"forks":29,"topics":30,"repo":31,"sourceUrl":33,"mdContent":34},"twilio-sendgrid-webhooks","track email engagement via SendGrid webhooks","Track email delivery and engagement via SendGrid Event Webhooks. Covers all 11 event types (delivery + engagement), webhook handler implementation, ECDSA signature verification, batched event processing, and common debugging patterns. Use when building SendGrid delivery tracking, engagement analytics, or bounce handling. Requires a SendGrid API key (SG.-prefix) — not applicable to the Twilio Email API (comms.twilio.com).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"twilio","Twilio","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Ftwilio.png",[12,16,19,22],{"name":13,"slug":14,"type":15},"SendGrid","sendgrid","tag",{"name":17,"slug":18,"type":15},"Monitoring","monitoring",{"name":20,"slug":21,"type":15},"Webhooks","webhooks",{"name":23,"slug":24,"type":15},"Email","email",25,"https:\u002F\u002Fgithub.com\u002Ftwilio\u002Fai","2026-07-17T06:06:32.753547",null,7,[],{"repoUrl":26,"stars":25,"forks":29,"topics":32,"description":28},[],"https:\u002F\u002Fgithub.com\u002Ftwilio\u002Fai\u002Ftree\u002FHEAD\u002Fskills\u002Fsendgrid\u002Ftwilio-sendgrid-webhooks","---\nname: twilio-sendgrid-webhooks\ndescription: >\n  Track email delivery and engagement via SendGrid Event Webhooks.\n  Covers all 11 event types (delivery + engagement), webhook handler\n  implementation, ECDSA signature verification, batched event processing,\n  and common debugging patterns. Use when building SendGrid delivery\n  tracking, engagement analytics, or bounce handling. Requires a SendGrid\n  API key (SG.-prefix) — not applicable to the Twilio Email API (comms.twilio.com).\n---\n\n## Overview\n\nThe Mail Send API returns `202 Accepted` (queued) — it does NOT confirm delivery. To know what happened to an email, use Event Webhooks.\n\n**Enable:** SendGrid Console > Settings > Mail Settings > Event Notification\n\n---\n\n## Event Types\n\n### Delivery Events\n| Event | Meaning |\n|-------|---------|\n| `processed` | SendGrid accepted and will attempt delivery |\n| `deferred` | Temporary failure — SendGrid will retry |\n| `delivered` | Recipient's mail server accepted the message |\n| `bounce` | Permanent failure — address invalid or rejected |\n| `dropped` | SendGrid will not deliver (suppression, invalid, spam) |\n\n### Engagement Events\n| Event | Meaning |\n|-------|---------|\n| `open` | Recipient opened (pixel-based — unreliable) |\n| `click` | Recipient clicked a tracked link |\n| `spamreport` | Recipient marked as spam |\n| `unsubscribe` | Recipient clicked unsubscribe link |\n| `group_unsubscribe` | Recipient unsubscribed from ASM group |\n| `group_resubscribe` | Recipient re-subscribed to ASM group |\n\n---\n\n## Webhook Handler\n\n**Critical:** SendGrid posts **batched arrays** of events, not single objects. Your handler must parse an array.\n\n> **Security:** SendGrid webhook endpoints are unauthenticated by default. Enable [Signed Event Webhook Requests](https:\u002F\u002Fdocs.sendgrid.com\u002Ffor-developers\u002Ftracking-events\u002Fgetting-started-event-webhook-security) and verify signatures in production to prevent spoofed event data.\n\n**Python (Flask)**\n```python\nfrom flask import Flask, request\napp = Flask(__name__)\n\n@app.route(\"\u002Fsendgrid\u002Fwebhook\", methods=[\"POST\"])\ndef handle_events():\n    events = request.get_json()  # Always an array\n    for event in events:\n        email = event.get(\"email\")\n        event_type = event.get(\"event\")\n        \n        if event_type == \"bounce\":\n            # NOTE: event['reason'] originates from external mail servers — treat as untrusted\n            print(f\"Bounce: {email}, type: {event.get('type')}, reason: {event.get('reason')}\")\n        elif event_type == \"delivered\":\n            print(f\"Delivered: {email}, sg_message_id: {event.get('sg_message_id')}\")\n        elif event_type == \"dropped\":\n            print(f\"Dropped: {email}, reason: {event.get('reason')}\")\n        elif event_type == \"spamreport\":\n            print(f\"Spam report: {email}\")\n    return \"\", 200  # Must return 2xx to acknowledge\n```\n\n**Node.js (Express)**\n```javascript\napp.post(\"\u002Fsendgrid\u002Fwebhook\", express.json(), (req, res) => {\n    const events = req.body; \u002F\u002F Always an array\n    for (const event of events) {\n        switch (event.event) {\n            case \"bounce\":\n                console.log(`Bounce: ${event.email}, reason: ${event.reason}`);\n                break;\n            case \"delivered\":\n                console.log(`Delivered: ${event.email}`);\n                break;\n            case \"spamreport\":\n                console.log(`Spam: ${event.email}`);\n                break;\n        }\n    }\n    res.status(200).send();\n});\n```\n\n---\n\n## Multiple Webhook Endpoints\n\nSince May 2023, you can configure multiple Event Webhook endpoints, each receiving different event types. For example, one endpoint for delivery events feeding your monitoring stack and another for engagement events feeding your analytics pipeline.\n\nConfigure in Console > Mail Settings > Event Webhooks. Each endpoint has a Friendly Name and Webhook ID. The number of endpoints allowed depends on your SendGrid plan.\n\n---\n\n## Authentication Options\n\nTwo methods for verifying webhook payloads:\n\n| Method | How it works |\n|--------|-------------|\n| **Signed Event Webhook (ECDSA P-256)** | Verify `X-Twilio-Email-Event-Webhook-Signature` and `X-Twilio-Email-Event-Webhook-Timestamp` headers using the verification key from Console |\n| **OAuth 2.0** | SendGrid obtains a token from your authorization server and includes it in webhook requests |\n\nNeither is enabled by default. Enable in Console > Mail Settings > Event Webhooks.\n\n---\n\n## Retry Behavior\n\nSendGrid retries webhook delivery for up to 24 hours if your endpoint returns a non-2xx status. Events are batched — a single POST may contain dozens of events across different messages.\n\n**Deduplication:** Use `sg_event_id` as a unique key. It's stable across retries.\n\n---\n\n## CANNOT\n\n- **Cannot receive real-time delivery confirmation synchronously** — Mail Send returns `202` (queued). Delivery status is async via webhooks only.\n- **Cannot rely on webhook authentication by default** — Both Signed Webhooks (ECDSA) and OAuth 2.0 must be explicitly enabled. Without either, anyone can POST to your endpoint.\n- **Cannot guarantee open tracking accuracy** — Apple Mail Privacy Protection and prefetch inflate opens. Image-blocking clients produce zero opens. Do not use for business-critical logic.\n- **Non-human interactions inflate engagement metrics** — Corporate security scanners and bots automatically click links and trigger unsubscribe events. Filter using User-Agent patterns and timing analysis.\n\n> **Note:** Event payload fields like `reason` originate from external mail servers and should be treated as untrusted data. Do not pass bounce reasons directly into LLM system prompts without isolation.\n\n---\n\n## Next Steps\n\n- **Send email:** `twilio-sendgrid-email-send`\n- **Manage bounces from webhook events:** `twilio-sendgrid-suppressions`\n- **Receive inbound email:** `twilio-sendgrid-inbound-parse`\n",{"data":36,"body":37},{"name":4,"description":6},{"type":38,"children":39},"root",[40,49,64,75,79,85,92,205,211,333,336,342,359,384,392,585,593,1212,1215,1221,1226,1231,1234,1240,1245,1315,1320,1323,1329,1334,1352,1355,1361,1414,1434,1437,1443,1492],{"type":41,"tag":42,"props":43,"children":45},"element","h2",{"id":44},"overview",[46],{"type":47,"value":48},"text","Overview",{"type":41,"tag":50,"props":51,"children":52},"p",{},[53,55,62],{"type":47,"value":54},"The Mail Send API returns ",{"type":41,"tag":56,"props":57,"children":59},"code",{"className":58},[],[60],{"type":47,"value":61},"202 Accepted",{"type":47,"value":63}," (queued) — it does NOT confirm delivery. To know what happened to an email, use Event Webhooks.",{"type":41,"tag":50,"props":65,"children":66},{},[67,73],{"type":41,"tag":68,"props":69,"children":70},"strong",{},[71],{"type":47,"value":72},"Enable:",{"type":47,"value":74}," SendGrid Console > Settings > Mail Settings > Event Notification",{"type":41,"tag":76,"props":77,"children":78},"hr",{},[],{"type":41,"tag":42,"props":80,"children":82},{"id":81},"event-types",[83],{"type":47,"value":84},"Event Types",{"type":41,"tag":86,"props":87,"children":89},"h3",{"id":88},"delivery-events",[90],{"type":47,"value":91},"Delivery Events",{"type":41,"tag":93,"props":94,"children":95},"table",{},[96,115],{"type":41,"tag":97,"props":98,"children":99},"thead",{},[100],{"type":41,"tag":101,"props":102,"children":103},"tr",{},[104,110],{"type":41,"tag":105,"props":106,"children":107},"th",{},[108],{"type":47,"value":109},"Event",{"type":41,"tag":105,"props":111,"children":112},{},[113],{"type":47,"value":114},"Meaning",{"type":41,"tag":116,"props":117,"children":118},"tbody",{},[119,137,154,171,188],{"type":41,"tag":101,"props":120,"children":121},{},[122,132],{"type":41,"tag":123,"props":124,"children":125},"td",{},[126],{"type":41,"tag":56,"props":127,"children":129},{"className":128},[],[130],{"type":47,"value":131},"processed",{"type":41,"tag":123,"props":133,"children":134},{},[135],{"type":47,"value":136},"SendGrid accepted and will attempt delivery",{"type":41,"tag":101,"props":138,"children":139},{},[140,149],{"type":41,"tag":123,"props":141,"children":142},{},[143],{"type":41,"tag":56,"props":144,"children":146},{"className":145},[],[147],{"type":47,"value":148},"deferred",{"type":41,"tag":123,"props":150,"children":151},{},[152],{"type":47,"value":153},"Temporary failure — SendGrid will retry",{"type":41,"tag":101,"props":155,"children":156},{},[157,166],{"type":41,"tag":123,"props":158,"children":159},{},[160],{"type":41,"tag":56,"props":161,"children":163},{"className":162},[],[164],{"type":47,"value":165},"delivered",{"type":41,"tag":123,"props":167,"children":168},{},[169],{"type":47,"value":170},"Recipient's mail server accepted the message",{"type":41,"tag":101,"props":172,"children":173},{},[174,183],{"type":41,"tag":123,"props":175,"children":176},{},[177],{"type":41,"tag":56,"props":178,"children":180},{"className":179},[],[181],{"type":47,"value":182},"bounce",{"type":41,"tag":123,"props":184,"children":185},{},[186],{"type":47,"value":187},"Permanent failure — address invalid or rejected",{"type":41,"tag":101,"props":189,"children":190},{},[191,200],{"type":41,"tag":123,"props":192,"children":193},{},[194],{"type":41,"tag":56,"props":195,"children":197},{"className":196},[],[198],{"type":47,"value":199},"dropped",{"type":41,"tag":123,"props":201,"children":202},{},[203],{"type":47,"value":204},"SendGrid will not deliver (suppression, invalid, spam)",{"type":41,"tag":86,"props":206,"children":208},{"id":207},"engagement-events",[209],{"type":47,"value":210},"Engagement Events",{"type":41,"tag":93,"props":212,"children":213},{},[214,228],{"type":41,"tag":97,"props":215,"children":216},{},[217],{"type":41,"tag":101,"props":218,"children":219},{},[220,224],{"type":41,"tag":105,"props":221,"children":222},{},[223],{"type":47,"value":109},{"type":41,"tag":105,"props":225,"children":226},{},[227],{"type":47,"value":114},{"type":41,"tag":116,"props":229,"children":230},{},[231,248,265,282,299,316],{"type":41,"tag":101,"props":232,"children":233},{},[234,243],{"type":41,"tag":123,"props":235,"children":236},{},[237],{"type":41,"tag":56,"props":238,"children":240},{"className":239},[],[241],{"type":47,"value":242},"open",{"type":41,"tag":123,"props":244,"children":245},{},[246],{"type":47,"value":247},"Recipient opened (pixel-based — unreliable)",{"type":41,"tag":101,"props":249,"children":250},{},[251,260],{"type":41,"tag":123,"props":252,"children":253},{},[254],{"type":41,"tag":56,"props":255,"children":257},{"className":256},[],[258],{"type":47,"value":259},"click",{"type":41,"tag":123,"props":261,"children":262},{},[263],{"type":47,"value":264},"Recipient clicked a tracked link",{"type":41,"tag":101,"props":266,"children":267},{},[268,277],{"type":41,"tag":123,"props":269,"children":270},{},[271],{"type":41,"tag":56,"props":272,"children":274},{"className":273},[],[275],{"type":47,"value":276},"spamreport",{"type":41,"tag":123,"props":278,"children":279},{},[280],{"type":47,"value":281},"Recipient marked as spam",{"type":41,"tag":101,"props":283,"children":284},{},[285,294],{"type":41,"tag":123,"props":286,"children":287},{},[288],{"type":41,"tag":56,"props":289,"children":291},{"className":290},[],[292],{"type":47,"value":293},"unsubscribe",{"type":41,"tag":123,"props":295,"children":296},{},[297],{"type":47,"value":298},"Recipient clicked unsubscribe link",{"type":41,"tag":101,"props":300,"children":301},{},[302,311],{"type":41,"tag":123,"props":303,"children":304},{},[305],{"type":41,"tag":56,"props":306,"children":308},{"className":307},[],[309],{"type":47,"value":310},"group_unsubscribe",{"type":41,"tag":123,"props":312,"children":313},{},[314],{"type":47,"value":315},"Recipient unsubscribed from ASM group",{"type":41,"tag":101,"props":317,"children":318},{},[319,328],{"type":41,"tag":123,"props":320,"children":321},{},[322],{"type":41,"tag":56,"props":323,"children":325},{"className":324},[],[326],{"type":47,"value":327},"group_resubscribe",{"type":41,"tag":123,"props":329,"children":330},{},[331],{"type":47,"value":332},"Recipient re-subscribed to ASM group",{"type":41,"tag":76,"props":334,"children":335},{},[],{"type":41,"tag":42,"props":337,"children":339},{"id":338},"webhook-handler",[340],{"type":47,"value":341},"Webhook Handler",{"type":41,"tag":50,"props":343,"children":344},{},[345,350,352,357],{"type":41,"tag":68,"props":346,"children":347},{},[348],{"type":47,"value":349},"Critical:",{"type":47,"value":351}," SendGrid posts ",{"type":41,"tag":68,"props":353,"children":354},{},[355],{"type":47,"value":356},"batched arrays",{"type":47,"value":358}," of events, not single objects. Your handler must parse an array.",{"type":41,"tag":360,"props":361,"children":362},"blockquote",{},[363],{"type":41,"tag":50,"props":364,"children":365},{},[366,371,373,382],{"type":41,"tag":68,"props":367,"children":368},{},[369],{"type":47,"value":370},"Security:",{"type":47,"value":372}," SendGrid webhook endpoints are unauthenticated by default. Enable ",{"type":41,"tag":374,"props":375,"children":379},"a",{"href":376,"rel":377},"https:\u002F\u002Fdocs.sendgrid.com\u002Ffor-developers\u002Ftracking-events\u002Fgetting-started-event-webhook-security",[378],"nofollow",[380],{"type":47,"value":381},"Signed Event Webhook Requests",{"type":47,"value":383}," and verify signatures in production to prevent spoofed event data.",{"type":41,"tag":50,"props":385,"children":386},{},[387],{"type":41,"tag":68,"props":388,"children":389},{},[390],{"type":47,"value":391},"Python (Flask)",{"type":41,"tag":393,"props":394,"children":399},"pre",{"className":395,"code":396,"language":397,"meta":398,"style":398},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","from flask import Flask, request\napp = Flask(__name__)\n\n@app.route(\"\u002Fsendgrid\u002Fwebhook\", methods=[\"POST\"])\ndef handle_events():\n    events = request.get_json()  # Always an array\n    for event in events:\n        email = event.get(\"email\")\n        event_type = event.get(\"event\")\n        \n        if event_type == \"bounce\":\n            # NOTE: event['reason'] originates from external mail servers — treat as untrusted\n            print(f\"Bounce: {email}, type: {event.get('type')}, reason: {event.get('reason')}\")\n        elif event_type == \"delivered\":\n            print(f\"Delivered: {email}, sg_message_id: {event.get('sg_message_id')}\")\n        elif event_type == \"dropped\":\n            print(f\"Dropped: {email}, reason: {event.get('reason')}\")\n        elif event_type == \"spamreport\":\n            print(f\"Spam report: {email}\")\n    return \"\", 200  # Must return 2xx to acknowledge\n","python","",[400],{"type":41,"tag":56,"props":401,"children":402},{"__ignoreMap":398},[403,414,423,433,442,451,460,468,477,486,495,504,513,522,531,540,549,558,567,576],{"type":41,"tag":404,"props":405,"children":408},"span",{"class":406,"line":407},"line",1,[409],{"type":41,"tag":404,"props":410,"children":411},{},[412],{"type":47,"value":413},"from flask import Flask, request\n",{"type":41,"tag":404,"props":415,"children":417},{"class":406,"line":416},2,[418],{"type":41,"tag":404,"props":419,"children":420},{},[421],{"type":47,"value":422},"app = Flask(__name__)\n",{"type":41,"tag":404,"props":424,"children":426},{"class":406,"line":425},3,[427],{"type":41,"tag":404,"props":428,"children":430},{"emptyLinePlaceholder":429},true,[431],{"type":47,"value":432},"\n",{"type":41,"tag":404,"props":434,"children":436},{"class":406,"line":435},4,[437],{"type":41,"tag":404,"props":438,"children":439},{},[440],{"type":47,"value":441},"@app.route(\"\u002Fsendgrid\u002Fwebhook\", methods=[\"POST\"])\n",{"type":41,"tag":404,"props":443,"children":445},{"class":406,"line":444},5,[446],{"type":41,"tag":404,"props":447,"children":448},{},[449],{"type":47,"value":450},"def handle_events():\n",{"type":41,"tag":404,"props":452,"children":454},{"class":406,"line":453},6,[455],{"type":41,"tag":404,"props":456,"children":457},{},[458],{"type":47,"value":459},"    events = request.get_json()  # Always an array\n",{"type":41,"tag":404,"props":461,"children":462},{"class":406,"line":29},[463],{"type":41,"tag":404,"props":464,"children":465},{},[466],{"type":47,"value":467},"    for event in events:\n",{"type":41,"tag":404,"props":469,"children":471},{"class":406,"line":470},8,[472],{"type":41,"tag":404,"props":473,"children":474},{},[475],{"type":47,"value":476},"        email = event.get(\"email\")\n",{"type":41,"tag":404,"props":478,"children":480},{"class":406,"line":479},9,[481],{"type":41,"tag":404,"props":482,"children":483},{},[484],{"type":47,"value":485},"        event_type = event.get(\"event\")\n",{"type":41,"tag":404,"props":487,"children":489},{"class":406,"line":488},10,[490],{"type":41,"tag":404,"props":491,"children":492},{},[493],{"type":47,"value":494},"        \n",{"type":41,"tag":404,"props":496,"children":498},{"class":406,"line":497},11,[499],{"type":41,"tag":404,"props":500,"children":501},{},[502],{"type":47,"value":503},"        if event_type == \"bounce\":\n",{"type":41,"tag":404,"props":505,"children":507},{"class":406,"line":506},12,[508],{"type":41,"tag":404,"props":509,"children":510},{},[511],{"type":47,"value":512},"            # NOTE: event['reason'] originates from external mail servers — treat as untrusted\n",{"type":41,"tag":404,"props":514,"children":516},{"class":406,"line":515},13,[517],{"type":41,"tag":404,"props":518,"children":519},{},[520],{"type":47,"value":521},"            print(f\"Bounce: {email}, type: {event.get('type')}, reason: {event.get('reason')}\")\n",{"type":41,"tag":404,"props":523,"children":525},{"class":406,"line":524},14,[526],{"type":41,"tag":404,"props":527,"children":528},{},[529],{"type":47,"value":530},"        elif event_type == \"delivered\":\n",{"type":41,"tag":404,"props":532,"children":534},{"class":406,"line":533},15,[535],{"type":41,"tag":404,"props":536,"children":537},{},[538],{"type":47,"value":539},"            print(f\"Delivered: {email}, sg_message_id: {event.get('sg_message_id')}\")\n",{"type":41,"tag":404,"props":541,"children":543},{"class":406,"line":542},16,[544],{"type":41,"tag":404,"props":545,"children":546},{},[547],{"type":47,"value":548},"        elif event_type == \"dropped\":\n",{"type":41,"tag":404,"props":550,"children":552},{"class":406,"line":551},17,[553],{"type":41,"tag":404,"props":554,"children":555},{},[556],{"type":47,"value":557},"            print(f\"Dropped: {email}, reason: {event.get('reason')}\")\n",{"type":41,"tag":404,"props":559,"children":561},{"class":406,"line":560},18,[562],{"type":41,"tag":404,"props":563,"children":564},{},[565],{"type":47,"value":566},"        elif event_type == \"spamreport\":\n",{"type":41,"tag":404,"props":568,"children":570},{"class":406,"line":569},19,[571],{"type":41,"tag":404,"props":572,"children":573},{},[574],{"type":47,"value":575},"            print(f\"Spam report: {email}\")\n",{"type":41,"tag":404,"props":577,"children":579},{"class":406,"line":578},20,[580],{"type":41,"tag":404,"props":581,"children":582},{},[583],{"type":47,"value":584},"    return \"\", 200  # Must return 2xx to acknowledge\n",{"type":41,"tag":50,"props":586,"children":587},{},[588],{"type":41,"tag":68,"props":589,"children":590},{},[591],{"type":47,"value":592},"Node.js (Express)",{"type":41,"tag":393,"props":594,"children":598},{"className":595,"code":596,"language":597,"meta":398,"style":398},"language-javascript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","app.post(\"\u002Fsendgrid\u002Fwebhook\", express.json(), (req, res) => {\n    const events = req.body; \u002F\u002F Always an array\n    for (const event of events) {\n        switch (event.event) {\n            case \"bounce\":\n                console.log(`Bounce: ${event.email}, reason: ${event.reason}`);\n                break;\n            case \"delivered\":\n                console.log(`Delivered: ${event.email}`);\n                break;\n            case \"spamreport\":\n                console.log(`Spam: ${event.email}`);\n                break;\n        }\n    }\n    res.status(200).send();\n});\n","javascript",[599],{"type":41,"tag":56,"props":600,"children":601},{"__ignoreMap":398},[602,707,750,793,826,852,941,953,976,1032,1043,1066,1122,1133,1141,1149,1197],{"type":41,"tag":404,"props":603,"children":604},{"class":406,"line":407},[605,611,617,623,628,633,639,643,648,653,657,662,667,671,676,682,686,691,696,702],{"type":41,"tag":404,"props":606,"children":608},{"style":607},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[609],{"type":47,"value":610},"app",{"type":41,"tag":404,"props":612,"children":614},{"style":613},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[615],{"type":47,"value":616},".",{"type":41,"tag":404,"props":618,"children":620},{"style":619},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[621],{"type":47,"value":622},"post",{"type":41,"tag":404,"props":624,"children":625},{"style":607},[626],{"type":47,"value":627},"(",{"type":41,"tag":404,"props":629,"children":630},{"style":613},[631],{"type":47,"value":632},"\"",{"type":41,"tag":404,"props":634,"children":636},{"style":635},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[637],{"type":47,"value":638},"\u002Fsendgrid\u002Fwebhook",{"type":41,"tag":404,"props":640,"children":641},{"style":613},[642],{"type":47,"value":632},{"type":41,"tag":404,"props":644,"children":645},{"style":613},[646],{"type":47,"value":647},",",{"type":41,"tag":404,"props":649,"children":650},{"style":607},[651],{"type":47,"value":652}," express",{"type":41,"tag":404,"props":654,"children":655},{"style":613},[656],{"type":47,"value":616},{"type":41,"tag":404,"props":658,"children":659},{"style":619},[660],{"type":47,"value":661},"json",{"type":41,"tag":404,"props":663,"children":664},{"style":607},[665],{"type":47,"value":666},"()",{"type":41,"tag":404,"props":668,"children":669},{"style":613},[670],{"type":47,"value":647},{"type":41,"tag":404,"props":672,"children":673},{"style":613},[674],{"type":47,"value":675}," (",{"type":41,"tag":404,"props":677,"children":679},{"style":678},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[680],{"type":47,"value":681},"req",{"type":41,"tag":404,"props":683,"children":684},{"style":613},[685],{"type":47,"value":647},{"type":41,"tag":404,"props":687,"children":688},{"style":678},[689],{"type":47,"value":690}," res",{"type":41,"tag":404,"props":692,"children":693},{"style":613},[694],{"type":47,"value":695},")",{"type":41,"tag":404,"props":697,"children":699},{"style":698},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[700],{"type":47,"value":701}," =>",{"type":41,"tag":404,"props":703,"children":704},{"style":613},[705],{"type":47,"value":706}," {\n",{"type":41,"tag":404,"props":708,"children":709},{"class":406,"line":416},[710,715,720,725,730,734,739,744],{"type":41,"tag":404,"props":711,"children":712},{"style":698},[713],{"type":47,"value":714},"    const",{"type":41,"tag":404,"props":716,"children":717},{"style":607},[718],{"type":47,"value":719}," events",{"type":41,"tag":404,"props":721,"children":722},{"style":613},[723],{"type":47,"value":724}," =",{"type":41,"tag":404,"props":726,"children":727},{"style":607},[728],{"type":47,"value":729}," req",{"type":41,"tag":404,"props":731,"children":732},{"style":613},[733],{"type":47,"value":616},{"type":41,"tag":404,"props":735,"children":736},{"style":607},[737],{"type":47,"value":738},"body",{"type":41,"tag":404,"props":740,"children":741},{"style":613},[742],{"type":47,"value":743},";",{"type":41,"tag":404,"props":745,"children":747},{"style":746},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[748],{"type":47,"value":749}," \u002F\u002F Always an array\n",{"type":41,"tag":404,"props":751,"children":752},{"class":406,"line":425},[753,759,764,769,774,779,783,788],{"type":41,"tag":404,"props":754,"children":756},{"style":755},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[757],{"type":47,"value":758},"    for",{"type":41,"tag":404,"props":760,"children":762},{"style":761},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[763],{"type":47,"value":675},{"type":41,"tag":404,"props":765,"children":766},{"style":698},[767],{"type":47,"value":768},"const",{"type":41,"tag":404,"props":770,"children":771},{"style":607},[772],{"type":47,"value":773}," event",{"type":41,"tag":404,"props":775,"children":776},{"style":613},[777],{"type":47,"value":778}," of",{"type":41,"tag":404,"props":780,"children":781},{"style":607},[782],{"type":47,"value":719},{"type":41,"tag":404,"props":784,"children":785},{"style":761},[786],{"type":47,"value":787},") ",{"type":41,"tag":404,"props":789,"children":790},{"style":613},[791],{"type":47,"value":792},"{\n",{"type":41,"tag":404,"props":794,"children":795},{"class":406,"line":435},[796,801,805,810,814,818,822],{"type":41,"tag":404,"props":797,"children":798},{"style":755},[799],{"type":47,"value":800},"        switch",{"type":41,"tag":404,"props":802,"children":803},{"style":761},[804],{"type":47,"value":675},{"type":41,"tag":404,"props":806,"children":807},{"style":607},[808],{"type":47,"value":809},"event",{"type":41,"tag":404,"props":811,"children":812},{"style":613},[813],{"type":47,"value":616},{"type":41,"tag":404,"props":815,"children":816},{"style":607},[817],{"type":47,"value":809},{"type":41,"tag":404,"props":819,"children":820},{"style":761},[821],{"type":47,"value":787},{"type":41,"tag":404,"props":823,"children":824},{"style":613},[825],{"type":47,"value":792},{"type":41,"tag":404,"props":827,"children":828},{"class":406,"line":444},[829,834,839,843,847],{"type":41,"tag":404,"props":830,"children":831},{"style":755},[832],{"type":47,"value":833},"            case",{"type":41,"tag":404,"props":835,"children":836},{"style":613},[837],{"type":47,"value":838}," \"",{"type":41,"tag":404,"props":840,"children":841},{"style":635},[842],{"type":47,"value":182},{"type":41,"tag":404,"props":844,"children":845},{"style":613},[846],{"type":47,"value":632},{"type":41,"tag":404,"props":848,"children":849},{"style":613},[850],{"type":47,"value":851},":\n",{"type":41,"tag":404,"props":853,"children":854},{"class":406,"line":453},[855,860,864,869,873,878,883,888,892,896,900,905,910,914,918,922,927,932,936],{"type":41,"tag":404,"props":856,"children":857},{"style":607},[858],{"type":47,"value":859},"                console",{"type":41,"tag":404,"props":861,"children":862},{"style":613},[863],{"type":47,"value":616},{"type":41,"tag":404,"props":865,"children":866},{"style":619},[867],{"type":47,"value":868},"log",{"type":41,"tag":404,"props":870,"children":871},{"style":761},[872],{"type":47,"value":627},{"type":41,"tag":404,"props":874,"children":875},{"style":613},[876],{"type":47,"value":877},"`",{"type":41,"tag":404,"props":879,"children":880},{"style":635},[881],{"type":47,"value":882},"Bounce: ",{"type":41,"tag":404,"props":884,"children":885},{"style":613},[886],{"type":47,"value":887},"${",{"type":41,"tag":404,"props":889,"children":890},{"style":607},[891],{"type":47,"value":809},{"type":41,"tag":404,"props":893,"children":894},{"style":613},[895],{"type":47,"value":616},{"type":41,"tag":404,"props":897,"children":898},{"style":607},[899],{"type":47,"value":24},{"type":41,"tag":404,"props":901,"children":902},{"style":613},[903],{"type":47,"value":904},"}",{"type":41,"tag":404,"props":906,"children":907},{"style":635},[908],{"type":47,"value":909},", reason: ",{"type":41,"tag":404,"props":911,"children":912},{"style":613},[913],{"type":47,"value":887},{"type":41,"tag":404,"props":915,"children":916},{"style":607},[917],{"type":47,"value":809},{"type":41,"tag":404,"props":919,"children":920},{"style":613},[921],{"type":47,"value":616},{"type":41,"tag":404,"props":923,"children":924},{"style":607},[925],{"type":47,"value":926},"reason",{"type":41,"tag":404,"props":928,"children":929},{"style":613},[930],{"type":47,"value":931},"}`",{"type":41,"tag":404,"props":933,"children":934},{"style":761},[935],{"type":47,"value":695},{"type":41,"tag":404,"props":937,"children":938},{"style":613},[939],{"type":47,"value":940},";\n",{"type":41,"tag":404,"props":942,"children":943},{"class":406,"line":29},[944,949],{"type":41,"tag":404,"props":945,"children":946},{"style":755},[947],{"type":47,"value":948},"                break",{"type":41,"tag":404,"props":950,"children":951},{"style":613},[952],{"type":47,"value":940},{"type":41,"tag":404,"props":954,"children":955},{"class":406,"line":470},[956,960,964,968,972],{"type":41,"tag":404,"props":957,"children":958},{"style":755},[959],{"type":47,"value":833},{"type":41,"tag":404,"props":961,"children":962},{"style":613},[963],{"type":47,"value":838},{"type":41,"tag":404,"props":965,"children":966},{"style":635},[967],{"type":47,"value":165},{"type":41,"tag":404,"props":969,"children":970},{"style":613},[971],{"type":47,"value":632},{"type":41,"tag":404,"props":973,"children":974},{"style":613},[975],{"type":47,"value":851},{"type":41,"tag":404,"props":977,"children":978},{"class":406,"line":479},[979,983,987,991,995,999,1004,1008,1012,1016,1020,1024,1028],{"type":41,"tag":404,"props":980,"children":981},{"style":607},[982],{"type":47,"value":859},{"type":41,"tag":404,"props":984,"children":985},{"style":613},[986],{"type":47,"value":616},{"type":41,"tag":404,"props":988,"children":989},{"style":619},[990],{"type":47,"value":868},{"type":41,"tag":404,"props":992,"children":993},{"style":761},[994],{"type":47,"value":627},{"type":41,"tag":404,"props":996,"children":997},{"style":613},[998],{"type":47,"value":877},{"type":41,"tag":404,"props":1000,"children":1001},{"style":635},[1002],{"type":47,"value":1003},"Delivered: ",{"type":41,"tag":404,"props":1005,"children":1006},{"style":613},[1007],{"type":47,"value":887},{"type":41,"tag":404,"props":1009,"children":1010},{"style":607},[1011],{"type":47,"value":809},{"type":41,"tag":404,"props":1013,"children":1014},{"style":613},[1015],{"type":47,"value":616},{"type":41,"tag":404,"props":1017,"children":1018},{"style":607},[1019],{"type":47,"value":24},{"type":41,"tag":404,"props":1021,"children":1022},{"style":613},[1023],{"type":47,"value":931},{"type":41,"tag":404,"props":1025,"children":1026},{"style":761},[1027],{"type":47,"value":695},{"type":41,"tag":404,"props":1029,"children":1030},{"style":613},[1031],{"type":47,"value":940},{"type":41,"tag":404,"props":1033,"children":1034},{"class":406,"line":488},[1035,1039],{"type":41,"tag":404,"props":1036,"children":1037},{"style":755},[1038],{"type":47,"value":948},{"type":41,"tag":404,"props":1040,"children":1041},{"style":613},[1042],{"type":47,"value":940},{"type":41,"tag":404,"props":1044,"children":1045},{"class":406,"line":497},[1046,1050,1054,1058,1062],{"type":41,"tag":404,"props":1047,"children":1048},{"style":755},[1049],{"type":47,"value":833},{"type":41,"tag":404,"props":1051,"children":1052},{"style":613},[1053],{"type":47,"value":838},{"type":41,"tag":404,"props":1055,"children":1056},{"style":635},[1057],{"type":47,"value":276},{"type":41,"tag":404,"props":1059,"children":1060},{"style":613},[1061],{"type":47,"value":632},{"type":41,"tag":404,"props":1063,"children":1064},{"style":613},[1065],{"type":47,"value":851},{"type":41,"tag":404,"props":1067,"children":1068},{"class":406,"line":506},[1069,1073,1077,1081,1085,1089,1094,1098,1102,1106,1110,1114,1118],{"type":41,"tag":404,"props":1070,"children":1071},{"style":607},[1072],{"type":47,"value":859},{"type":41,"tag":404,"props":1074,"children":1075},{"style":613},[1076],{"type":47,"value":616},{"type":41,"tag":404,"props":1078,"children":1079},{"style":619},[1080],{"type":47,"value":868},{"type":41,"tag":404,"props":1082,"children":1083},{"style":761},[1084],{"type":47,"value":627},{"type":41,"tag":404,"props":1086,"children":1087},{"style":613},[1088],{"type":47,"value":877},{"type":41,"tag":404,"props":1090,"children":1091},{"style":635},[1092],{"type":47,"value":1093},"Spam: ",{"type":41,"tag":404,"props":1095,"children":1096},{"style":613},[1097],{"type":47,"value":887},{"type":41,"tag":404,"props":1099,"children":1100},{"style":607},[1101],{"type":47,"value":809},{"type":41,"tag":404,"props":1103,"children":1104},{"style":613},[1105],{"type":47,"value":616},{"type":41,"tag":404,"props":1107,"children":1108},{"style":607},[1109],{"type":47,"value":24},{"type":41,"tag":404,"props":1111,"children":1112},{"style":613},[1113],{"type":47,"value":931},{"type":41,"tag":404,"props":1115,"children":1116},{"style":761},[1117],{"type":47,"value":695},{"type":41,"tag":404,"props":1119,"children":1120},{"style":613},[1121],{"type":47,"value":940},{"type":41,"tag":404,"props":1123,"children":1124},{"class":406,"line":515},[1125,1129],{"type":41,"tag":404,"props":1126,"children":1127},{"style":755},[1128],{"type":47,"value":948},{"type":41,"tag":404,"props":1130,"children":1131},{"style":613},[1132],{"type":47,"value":940},{"type":41,"tag":404,"props":1134,"children":1135},{"class":406,"line":524},[1136],{"type":41,"tag":404,"props":1137,"children":1138},{"style":613},[1139],{"type":47,"value":1140},"        }\n",{"type":41,"tag":404,"props":1142,"children":1143},{"class":406,"line":533},[1144],{"type":41,"tag":404,"props":1145,"children":1146},{"style":613},[1147],{"type":47,"value":1148},"    }\n",{"type":41,"tag":404,"props":1150,"children":1151},{"class":406,"line":542},[1152,1157,1161,1166,1170,1176,1180,1184,1189,1193],{"type":41,"tag":404,"props":1153,"children":1154},{"style":607},[1155],{"type":47,"value":1156},"    res",{"type":41,"tag":404,"props":1158,"children":1159},{"style":613},[1160],{"type":47,"value":616},{"type":41,"tag":404,"props":1162,"children":1163},{"style":619},[1164],{"type":47,"value":1165},"status",{"type":41,"tag":404,"props":1167,"children":1168},{"style":761},[1169],{"type":47,"value":627},{"type":41,"tag":404,"props":1171,"children":1173},{"style":1172},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1174],{"type":47,"value":1175},"200",{"type":41,"tag":404,"props":1177,"children":1178},{"style":761},[1179],{"type":47,"value":695},{"type":41,"tag":404,"props":1181,"children":1182},{"style":613},[1183],{"type":47,"value":616},{"type":41,"tag":404,"props":1185,"children":1186},{"style":619},[1187],{"type":47,"value":1188},"send",{"type":41,"tag":404,"props":1190,"children":1191},{"style":761},[1192],{"type":47,"value":666},{"type":41,"tag":404,"props":1194,"children":1195},{"style":613},[1196],{"type":47,"value":940},{"type":41,"tag":404,"props":1198,"children":1199},{"class":406,"line":551},[1200,1204,1208],{"type":41,"tag":404,"props":1201,"children":1202},{"style":613},[1203],{"type":47,"value":904},{"type":41,"tag":404,"props":1205,"children":1206},{"style":607},[1207],{"type":47,"value":695},{"type":41,"tag":404,"props":1209,"children":1210},{"style":613},[1211],{"type":47,"value":940},{"type":41,"tag":76,"props":1213,"children":1214},{},[],{"type":41,"tag":42,"props":1216,"children":1218},{"id":1217},"multiple-webhook-endpoints",[1219],{"type":47,"value":1220},"Multiple Webhook Endpoints",{"type":41,"tag":50,"props":1222,"children":1223},{},[1224],{"type":47,"value":1225},"Since May 2023, you can configure multiple Event Webhook endpoints, each receiving different event types. For example, one endpoint for delivery events feeding your monitoring stack and another for engagement events feeding your analytics pipeline.",{"type":41,"tag":50,"props":1227,"children":1228},{},[1229],{"type":47,"value":1230},"Configure in Console > Mail Settings > Event Webhooks. Each endpoint has a Friendly Name and Webhook ID. The number of endpoints allowed depends on your SendGrid plan.",{"type":41,"tag":76,"props":1232,"children":1233},{},[],{"type":41,"tag":42,"props":1235,"children":1237},{"id":1236},"authentication-options",[1238],{"type":47,"value":1239},"Authentication Options",{"type":41,"tag":50,"props":1241,"children":1242},{},[1243],{"type":47,"value":1244},"Two methods for verifying webhook payloads:",{"type":41,"tag":93,"props":1246,"children":1247},{},[1248,1264],{"type":41,"tag":97,"props":1249,"children":1250},{},[1251],{"type":41,"tag":101,"props":1252,"children":1253},{},[1254,1259],{"type":41,"tag":105,"props":1255,"children":1256},{},[1257],{"type":47,"value":1258},"Method",{"type":41,"tag":105,"props":1260,"children":1261},{},[1262],{"type":47,"value":1263},"How it works",{"type":41,"tag":116,"props":1265,"children":1266},{},[1267,1299],{"type":41,"tag":101,"props":1268,"children":1269},{},[1270,1278],{"type":41,"tag":123,"props":1271,"children":1272},{},[1273],{"type":41,"tag":68,"props":1274,"children":1275},{},[1276],{"type":47,"value":1277},"Signed Event Webhook (ECDSA P-256)",{"type":41,"tag":123,"props":1279,"children":1280},{},[1281,1283,1289,1291,1297],{"type":47,"value":1282},"Verify ",{"type":41,"tag":56,"props":1284,"children":1286},{"className":1285},[],[1287],{"type":47,"value":1288},"X-Twilio-Email-Event-Webhook-Signature",{"type":47,"value":1290}," and ",{"type":41,"tag":56,"props":1292,"children":1294},{"className":1293},[],[1295],{"type":47,"value":1296},"X-Twilio-Email-Event-Webhook-Timestamp",{"type":47,"value":1298}," headers using the verification key from Console",{"type":41,"tag":101,"props":1300,"children":1301},{},[1302,1310],{"type":41,"tag":123,"props":1303,"children":1304},{},[1305],{"type":41,"tag":68,"props":1306,"children":1307},{},[1308],{"type":47,"value":1309},"OAuth 2.0",{"type":41,"tag":123,"props":1311,"children":1312},{},[1313],{"type":47,"value":1314},"SendGrid obtains a token from your authorization server and includes it in webhook requests",{"type":41,"tag":50,"props":1316,"children":1317},{},[1318],{"type":47,"value":1319},"Neither is enabled by default. Enable in Console > Mail Settings > Event Webhooks.",{"type":41,"tag":76,"props":1321,"children":1322},{},[],{"type":41,"tag":42,"props":1324,"children":1326},{"id":1325},"retry-behavior",[1327],{"type":47,"value":1328},"Retry Behavior",{"type":41,"tag":50,"props":1330,"children":1331},{},[1332],{"type":47,"value":1333},"SendGrid retries webhook delivery for up to 24 hours if your endpoint returns a non-2xx status. Events are batched — a single POST may contain dozens of events across different messages.",{"type":41,"tag":50,"props":1335,"children":1336},{},[1337,1342,1344,1350],{"type":41,"tag":68,"props":1338,"children":1339},{},[1340],{"type":47,"value":1341},"Deduplication:",{"type":47,"value":1343}," Use ",{"type":41,"tag":56,"props":1345,"children":1347},{"className":1346},[],[1348],{"type":47,"value":1349},"sg_event_id",{"type":47,"value":1351}," as a unique key. It's stable across retries.",{"type":41,"tag":76,"props":1353,"children":1354},{},[],{"type":41,"tag":42,"props":1356,"children":1358},{"id":1357},"cannot",[1359],{"type":47,"value":1360},"CANNOT",{"type":41,"tag":1362,"props":1363,"children":1364},"ul",{},[1365,1384,1394,1404],{"type":41,"tag":1366,"props":1367,"children":1368},"li",{},[1369,1374,1376,1382],{"type":41,"tag":68,"props":1370,"children":1371},{},[1372],{"type":47,"value":1373},"Cannot receive real-time delivery confirmation synchronously",{"type":47,"value":1375}," — Mail Send returns ",{"type":41,"tag":56,"props":1377,"children":1379},{"className":1378},[],[1380],{"type":47,"value":1381},"202",{"type":47,"value":1383}," (queued). Delivery status is async via webhooks only.",{"type":41,"tag":1366,"props":1385,"children":1386},{},[1387,1392],{"type":41,"tag":68,"props":1388,"children":1389},{},[1390],{"type":47,"value":1391},"Cannot rely on webhook authentication by default",{"type":47,"value":1393}," — Both Signed Webhooks (ECDSA) and OAuth 2.0 must be explicitly enabled. Without either, anyone can POST to your endpoint.",{"type":41,"tag":1366,"props":1395,"children":1396},{},[1397,1402],{"type":41,"tag":68,"props":1398,"children":1399},{},[1400],{"type":47,"value":1401},"Cannot guarantee open tracking accuracy",{"type":47,"value":1403}," — Apple Mail Privacy Protection and prefetch inflate opens. Image-blocking clients produce zero opens. Do not use for business-critical logic.",{"type":41,"tag":1366,"props":1405,"children":1406},{},[1407,1412],{"type":41,"tag":68,"props":1408,"children":1409},{},[1410],{"type":47,"value":1411},"Non-human interactions inflate engagement metrics",{"type":47,"value":1413}," — Corporate security scanners and bots automatically click links and trigger unsubscribe events. Filter using User-Agent patterns and timing analysis.",{"type":41,"tag":360,"props":1415,"children":1416},{},[1417],{"type":41,"tag":50,"props":1418,"children":1419},{},[1420,1425,1427,1432],{"type":41,"tag":68,"props":1421,"children":1422},{},[1423],{"type":47,"value":1424},"Note:",{"type":47,"value":1426}," Event payload fields like ",{"type":41,"tag":56,"props":1428,"children":1430},{"className":1429},[],[1431],{"type":47,"value":926},{"type":47,"value":1433}," originate from external mail servers and should be treated as untrusted data. Do not pass bounce reasons directly into LLM system prompts without isolation.",{"type":41,"tag":76,"props":1435,"children":1436},{},[],{"type":41,"tag":42,"props":1438,"children":1440},{"id":1439},"next-steps",[1441],{"type":47,"value":1442},"Next Steps",{"type":41,"tag":1362,"props":1444,"children":1445},{},[1446,1462,1477],{"type":41,"tag":1366,"props":1447,"children":1448},{},[1449,1454,1456],{"type":41,"tag":68,"props":1450,"children":1451},{},[1452],{"type":47,"value":1453},"Send email:",{"type":47,"value":1455}," ",{"type":41,"tag":56,"props":1457,"children":1459},{"className":1458},[],[1460],{"type":47,"value":1461},"twilio-sendgrid-email-send",{"type":41,"tag":1366,"props":1463,"children":1464},{},[1465,1470,1471],{"type":41,"tag":68,"props":1466,"children":1467},{},[1468],{"type":47,"value":1469},"Manage bounces from webhook events:",{"type":47,"value":1455},{"type":41,"tag":56,"props":1472,"children":1474},{"className":1473},[],[1475],{"type":47,"value":1476},"twilio-sendgrid-suppressions",{"type":41,"tag":1366,"props":1478,"children":1479},{},[1480,1485,1486],{"type":41,"tag":68,"props":1481,"children":1482},{},[1483],{"type":47,"value":1484},"Receive inbound email:",{"type":47,"value":1455},{"type":41,"tag":56,"props":1487,"children":1489},{"className":1488},[],[1490],{"type":47,"value":1491},"twilio-sendgrid-inbound-parse",{"type":41,"tag":1493,"props":1494,"children":1495},"style",{},[1496],{"type":47,"value":1497},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1499,"total":1678},[1500,1516,1536,1547,1559,1574,1591,1607,1623,1636,1650,1666],{"slug":1501,"name":1501,"fn":1502,"description":1503,"org":1504,"tags":1505,"stars":25,"repoUrl":26,"updatedAt":1515},"twilio-account-setup","configure Twilio accounts and credentials","Create and configure a Twilio account from scratch. Covers free trial signup, trial limitations, getting credentials (Account SID and Auth Token), buying a phone number, verifying recipient numbers for trial use, SDK installation, first API call, subaccount management (creation, inheritance, credential isolation, limits), and enabling specific products (AI Assistants, Conversations, Verify, ConversationRelay, WhatsApp). Use this skill before any other Twilio skill if you do not yet have a Twilio account or need to enable a product. For Organization-level governance (SSO, SCIM, multi-team), see `twilio-organizations-setup`.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1506,1509,1512],{"name":1507,"slug":1508,"type":15},"API Development","api-development",{"name":1510,"slug":1511,"type":15},"Communications","communications",{"name":1513,"slug":1514,"type":15},"SMS","sms","2026-08-01T05:43:28.968968",{"slug":1517,"name":1517,"fn":1518,"description":1519,"org":1520,"tags":1521,"stars":25,"repoUrl":26,"updatedAt":1535},"twilio-agent-augmentation-architect","augment human agents with AI intelligence","Planning skill for augmenting human agents with real-time AI intelligence. Qualifies the developer's use case across coaching, compliance, QA, and routing to recommend the right Conversation Intelligence + Conversation Memory + TaskRouter architecture. Handles both \"I want to add AI coaching to my call center\" and \"configure Conversation Intelligence operators for script adherence.\"\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1522,1525,1528,1531,1534],{"name":1523,"slug":1524,"type":15},"Agents","agents",{"name":1526,"slug":1527,"type":15},"AI","ai",{"name":1529,"slug":1530,"type":15},"Coaching","coaching",{"name":1532,"slug":1533,"type":15},"QA","qa",{"name":9,"slug":8,"type":15},"2026-07-17T06:07:58.250609",{"slug":1537,"name":1537,"fn":1538,"description":1539,"org":1540,"tags":1541,"stars":25,"repoUrl":26,"updatedAt":1546},"twilio-agent-connect","connect AI agents to Twilio channels","Connect third-party AI agents (OpenAI, Bedrock, LangChain, Microsoft Foundry) to Twilio's communication channels using the Twilio Agent Connect SDK. Covers identity resolution, memory and context management via Conversation Memory, conversation orchestration via Conversation Orchestrator, multi-channel handling (Voice, SMS, RCS, WhatsApp, Chat), and AI-to-human escalation. Use this skill when integrating an existing LLM agent with Twilio services.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1542,1543,1544,1545],{"name":1523,"slug":1524,"type":15},{"name":1507,"slug":1508,"type":15},{"name":1510,"slug":1511,"type":15},{"name":9,"slug":8,"type":15},"2026-07-17T06:06:05.217098",{"slug":1548,"name":1548,"fn":1549,"description":1550,"org":1551,"tags":1552,"stars":25,"repoUrl":26,"updatedAt":1558},"twilio-ai-agent-architect","plan Twilio conversational AI agents","Planning skill for AI-powered conversational agents. Qualifies the developer's use case across outcome sophistication, entry point, and customer profile to recommend the right Twilio Conversations architecture and implementation skills. Handles both high-level requests (\"build me a voice AI assistant\") and specific ones (\"integrate ConversationRelay with my OpenAI backend\").\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1553,1554,1557],{"name":1523,"slug":1524,"type":15},{"name":1555,"slug":1556,"type":15},"Architecture","architecture",{"name":9,"slug":8,"type":15},"2026-07-17T06:07:48.883723",{"slug":1560,"name":1560,"fn":1561,"description":1562,"org":1563,"tags":1564,"stars":25,"repoUrl":26,"updatedAt":1573},"twilio-call-recordings","record and manage Twilio voice calls","Record Twilio voice calls correctly. Covers the critical distinction between Record verb (voicemail) and Dial record (call recording), dual-channel for QA, mid-call pause for PCI, Conference recording, and the ConversationRelay workaround. Use this skill whenever you need to capture call audio for compliance, QA, or analytics.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1565,1568,1571,1572],{"name":1566,"slug":1567,"type":15},"Audio","audio",{"name":1569,"slug":1570,"type":15},"Compliance","compliance",{"name":1532,"slug":1533,"type":15},{"name":9,"slug":8,"type":15},"2026-07-17T06:07:55.268412",{"slug":1575,"name":1575,"fn":1576,"description":1577,"org":1578,"tags":1579,"stars":25,"repoUrl":26,"updatedAt":1590},"twilio-cli-reference","manage Twilio resources via CLI","Twilio CLI reference for managing Twilio resources from the terminal. Covers installation, credential profiles, phone number provisioning, sending SMS and email, webhook configuration, local development with a tunneling service, debugging with watch and logs, serverless deployment, and plugin ecosystem. Use when the developer asks to \"just do it\", \"set this up\", \"run a command\", mentions \"CLI\", \"command line\", or \"terminal\", or when an AI agent can execute a task directly instead of writing application code.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1580,1583,1586,1589],{"name":1581,"slug":1582,"type":15},"CLI","cli",{"name":1584,"slug":1585,"type":15},"Local Development","local-development",{"name":1587,"slug":1588,"type":15},"Operations","operations",{"name":9,"slug":8,"type":15},"2026-07-17T06:07:54.925664",{"slug":1592,"name":1592,"fn":1593,"description":1594,"org":1595,"tags":1596,"stars":25,"repoUrl":26,"updatedAt":1606},"twilio-compliance-onboarding","manage Twilio messaging and voice compliance","Registrations required BEFORE Twilio traffic works. Covers messaging programs (A2P 10DLC, toll-free verification, WhatsApp WABA, RCS, short code, alphanumeric sender) and voice trust programs (STIR\u002FSHAKEN, Voice Integrity, Branded Calling, CNAM). Each number\u002Fsender type has its own program — registration blocks traffic until complete.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1597,1598,1601,1602,1603],{"name":1569,"slug":1570,"type":15},{"name":1599,"slug":1600,"type":15},"Messaging","messaging",{"name":1513,"slug":1514,"type":15},{"name":9,"slug":8,"type":15},{"name":1604,"slug":1605,"type":15},"WhatsApp","whatsapp","2026-07-17T06:05:47.897229",{"slug":1608,"name":1608,"fn":1609,"description":1610,"org":1611,"tags":1612,"stars":25,"repoUrl":26,"updatedAt":1622},"twilio-compliance-traffic","ensure compliance for Twilio messaging traffic","Rules you must follow for Twilio messaging and voice traffic. Covers TCPA (consent tiers, quiet hours, DNC), GDPR (EU consent, right to deletion), PCI DSS (payment recording, Pay verb), HIPAA (BAA, PHI), FDCPA (debt collection limits), CAN-SPAM, WhatsApp policies, SHAKEN\u002FSTIR, and consent management patterns. Use this skill proactively when developers have working traffic to ensure they follow the rules.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1613,1614,1615,1618,1621],{"name":1569,"slug":1570,"type":15},{"name":1599,"slug":1600,"type":15},{"name":1616,"slug":1617,"type":15},"Regulatory Compliance","regulatory-compliance",{"name":1619,"slug":1620,"type":15},"Security","security",{"name":9,"slug":8,"type":15},"2026-07-17T06:07:55.952779",{"slug":1624,"name":1624,"fn":1625,"description":1626,"org":1627,"tags":1628,"stars":25,"repoUrl":26,"updatedAt":1635},"twilio-conference-calls","build multi-party calls with Twilio Conference","Build multi-party calls using Twilio Conference. Covers warm transfer, cold transfer, coaching (whisper), hold vs mute, participant modes, and supervisor barge. Use this skill for any contact center, support line, or scenario requiring transfers, holds, or multi-party calls.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1629,1630,1631,1634],{"name":1566,"slug":1567,"type":15},{"name":1510,"slug":1511,"type":15},{"name":1632,"slug":1633,"type":15},"Meetings","meetings",{"name":9,"slug":8,"type":15},"2026-07-17T06:07:55.603708",{"slug":1637,"name":1637,"fn":1638,"description":1639,"org":1640,"tags":1641,"stars":25,"repoUrl":26,"updatedAt":1649},"twilio-content-template-builder","create and send message templates with Twilio","Create, manage, and send message templates using Twilio's Content API. Covers template creation for WhatsApp, SMS, RCS, and MMS; variable usage; WhatsApp Meta approval; and sending templates via ContentSid. Use this skill when building structured messages that require pre-approval or consistent formatting across channels.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1642,1643,1644,1645,1648],{"name":23,"slug":24,"type":15},{"name":1599,"slug":1600,"type":15},{"name":1513,"slug":1514,"type":15},{"name":1646,"slug":1647,"type":15},"Templates","templates",{"name":9,"slug":8,"type":15},"2026-07-17T06:04:26.637309",{"slug":1651,"name":1651,"fn":1652,"description":1653,"org":1654,"tags":1655,"stars":25,"repoUrl":26,"updatedAt":1665},"twilio-conversation-intelligence","build conversation intelligence pipelines","Twilio Conversation Intelligence development guide. Use when building real-time or post-call conversation analysis, language operator pipelines, sentiment analysis, agent assist, cross-channel analytics, or querying aggregated conversation insights (sentiment trends, escalation rates, dashboards).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1656,1657,1660,1661,1664],{"name":1523,"slug":1524,"type":15},{"name":1658,"slug":1659,"type":15},"Analytics","analytics",{"name":17,"slug":18,"type":15},{"name":1662,"slug":1663,"type":15},"NLP","nlp",{"name":9,"slug":8,"type":15},"2026-07-17T06:07:52.545387",{"slug":1667,"name":1667,"fn":1668,"description":1669,"org":1670,"tags":1671,"stars":25,"repoUrl":26,"updatedAt":1677},"twilio-conversation-memory","manage conversation memory with Twilio","Store and retrieve conversation context using Twilio Conversation Memory. Covers Memory Store provisioning, profile management, traits, observations, conversation summaries, and semantic Recall. Use this skill to give AI agents or human agents persistent memory of conversations across sessions and channels.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1672,1673,1676],{"name":1523,"slug":1524,"type":15},{"name":1674,"slug":1675,"type":15},"Memory","memory",{"name":9,"slug":8,"type":15},"2026-07-17T06:04:19.526724",57,{"items":1680,"total":1678},[1681,1687,1695,1702,1708,1715,1722],{"slug":1501,"name":1501,"fn":1502,"description":1503,"org":1682,"tags":1683,"stars":25,"repoUrl":26,"updatedAt":1515},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1684,1685,1686],{"name":1507,"slug":1508,"type":15},{"name":1510,"slug":1511,"type":15},{"name":1513,"slug":1514,"type":15},{"slug":1517,"name":1517,"fn":1518,"description":1519,"org":1688,"tags":1689,"stars":25,"repoUrl":26,"updatedAt":1535},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1690,1691,1692,1693,1694],{"name":1523,"slug":1524,"type":15},{"name":1526,"slug":1527,"type":15},{"name":1529,"slug":1530,"type":15},{"name":1532,"slug":1533,"type":15},{"name":9,"slug":8,"type":15},{"slug":1537,"name":1537,"fn":1538,"description":1539,"org":1696,"tags":1697,"stars":25,"repoUrl":26,"updatedAt":1546},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1698,1699,1700,1701],{"name":1523,"slug":1524,"type":15},{"name":1507,"slug":1508,"type":15},{"name":1510,"slug":1511,"type":15},{"name":9,"slug":8,"type":15},{"slug":1548,"name":1548,"fn":1549,"description":1550,"org":1703,"tags":1704,"stars":25,"repoUrl":26,"updatedAt":1558},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1705,1706,1707],{"name":1523,"slug":1524,"type":15},{"name":1555,"slug":1556,"type":15},{"name":9,"slug":8,"type":15},{"slug":1560,"name":1560,"fn":1561,"description":1562,"org":1709,"tags":1710,"stars":25,"repoUrl":26,"updatedAt":1573},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1711,1712,1713,1714],{"name":1566,"slug":1567,"type":15},{"name":1569,"slug":1570,"type":15},{"name":1532,"slug":1533,"type":15},{"name":9,"slug":8,"type":15},{"slug":1575,"name":1575,"fn":1576,"description":1577,"org":1716,"tags":1717,"stars":25,"repoUrl":26,"updatedAt":1590},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1718,1719,1720,1721],{"name":1581,"slug":1582,"type":15},{"name":1584,"slug":1585,"type":15},{"name":1587,"slug":1588,"type":15},{"name":9,"slug":8,"type":15},{"slug":1592,"name":1592,"fn":1593,"description":1594,"org":1723,"tags":1724,"stars":25,"repoUrl":26,"updatedAt":1606},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1725,1726,1727,1728,1729],{"name":1569,"slug":1570,"type":15},{"name":1599,"slug":1600,"type":15},{"name":1513,"slug":1514,"type":15},{"name":9,"slug":8,"type":15},{"name":1604,"slug":1605,"type":15}]