The AI API analyzes captured webhook events and generates code and explanations to help you integrate faster.
AI features require the Starter plan or above. Requests from free accounts return a 403 with "upgrade_required": true.
Explain payload
Returns a plain English explanation of what the webhook event means — what triggered it, what happened, and what the key fields represent.
curl https://hookdrop.dev/api/endpoints/ENDPOINT_ID/events/EVENT_ID/ai/explain \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Path parameters
Response
{
"explanation": "A customer just completed a payment of ₦15,000 for order #1234. The payment was processed successfully via card ending in 4242."
}
A 2–3 sentence plain English description of the webhook event.
Generate TypeScript interface
Generates a TypeScript interface that matches the structure of the event payload. Use this as a starting point for typing webhook payloads in your codebase.
curl https://hookdrop.dev/api/endpoints/ENDPOINT_ID/events/EVENT_ID/ai/schema \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Path parameters
Response
{
"schema": "interface PaymentIntentSucceeded {\n type: string;\n data: {\n object: {\n id: string;\n amount: number;\n currency: string;\n status: string;\n };\n };\n}"
}
A TypeScript interface as a raw string (no markdown fences).
Generate handler code
Generates a complete, ready-to-use webhook handler for your preferred language and framework. The handler includes HMAC signature verification and error handling based on the captured event.
curl -X POST https://hookdrop.dev/api/endpoints/ENDPOINT_ID/events/EVENT_ID/ai/handler \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"language": "typescript", "framework": "express"}'
Path parameters
Request body
language
string
default:"typescript"
Target programming language. Supported values: typescript, javascript, python, go.
Target web framework. Supported values: express, fastify, nextjs, fastapi, gin.
Response
{
"handler": "import { Request, Response } from 'express';\nimport crypto from 'crypto';\n\nexport function handleWebhook(req: Request, res: Response) {\n const signature = req.headers['x-stripe-signature'] as string;\n // ... HMAC verification and business logic\n}"
}
The generated handler code as a raw string (no markdown fences).
Diagnose failure
Analyzes a failed event and its delivery attempts to explain what went wrong and how to fix it.
curl https://hookdrop.dev/api/endpoints/ENDPOINT_ID/events/EVENT_ID/ai/diagnose \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Path parameters
Response
{
"diagnosis": "Your server returned a 401 Unauthorized on all 4 attempts, which indicates the HMAC signature check is failing. Verify that the secret configured in your Hookdrop destination matches the one your server uses to validate the signature. Check that you are reading the raw request body before parsing JSON, as body parsing can alter the bytes used in the signature."
}
An actionable explanation of why delivery failed and how to resolve the issue.