Skip to main content

Documentation Index

Fetch the complete documentation index at: https://bobprince.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

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
id
string
required
The endpoint ID.
eId
string
required
The event ID.
Response
{
  "explanation": "A customer just completed a payment of ₦15,000 for order #1234. The payment was processed successfully via card ending in 4242."
}
explanation
string
required
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
id
string
required
The endpoint ID.
eId
string
required
The event ID.
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}"
}
schema
string
required
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
id
string
required
The endpoint ID.
eId
string
required
The event ID.
Request body
language
string
default:"typescript"
Target programming language. Supported values: typescript, javascript, python, go.
framework
string
default:"express"
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}"
}
handler
string
required
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
id
string
required
The endpoint ID.
eId
string
required
The event ID.
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."
}
diagnosis
string
required
An actionable explanation of why delivery failed and how to resolve the issue.