What problem does it solve?
Convex apps need reliable, secure HTTP endpoints to receive webhooks, integrate with external services, and expose custom routes. This Skill provides a structured approach to implement HTTP actions, including routing, request handling, authentication, CORS, and webhook verification.
Core Features & Use Cases
- HTTP endpoint routing: Define paths and methods to handle GET/POST requests.
- Webhook handling: Validate signatures and process incoming events from services like Stripe, GitHub, Clerk, or others.
- Authentication & Security: Enforce API keys or Bearer tokens to protect endpoints.
- Examples: Build a /webhooks/ endpoint for Stripe to verify signatures, or a /api/items route to create and list resources.
Quick Start
- Create an HTTP router using convex/http.ts, define routes with httpRouter().route({ path, method, handler: httpAction(async (ctx, request) => { ... }) }).
- Implement route handlers to parse JSON or form data, access headers, and respond with JSON.
- Add webhook verification and storage interactions via internal actions, and test with sample payloads.