convex-http-actions

Build HTTP endpoints in Convex for webhooks, API routes, and external integrations.

1|Updated Oct 10, 2025
One-click install
npx skills add https://github.com/Rocktown-Labs/rivercitymd --skill convex-http-actions-rocktown-labs
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: convex-http-actions
Source: https://github.com/Rocktown-Labs/rivercitymd/tree/main/.cursor/skills/convex-http-actions
Command: npx skills add https://github.com/Rocktown-Labs/rivercitymd --skill convex-http-actions-rocktown-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires stripe, svix.

What problem does it solve? Convex functions are not directly reachable over HTTP, so receiving Stripe webhooks, Clerk user-sync events, or third-party API calls requires a dedicated routing layer. This Skill provides the patterns to define HTTP endpoints, parse requests, verify webhook signatures, and bridge external traffic into Convex mutations and queries. ## Core Features & Use Cases - HTTP Router Setup: Define GET/POST routes and path-prefix matching with httpRouter and httpAction in convex/http.ts. - Webhook Handling: Verify Stripe and Clerk (Svix) signatures in Node.js actions before dispatching internal mutations. - Request Processing: Parse JSON bodies, form data, raw bytes, query parameters, and headers, with CORS preflight handling and structured error responses. - Use Case: Add a /webhooks/stripe endpoint that verifies the stripe-signature header, then runs an internal mutation to mark a customer's checkout session as paid. ## Quick Start Create a Convex HTTP endpoint at /webhooks/stripe that verifies the webhook signature and processes the checkout.session.completed event.

Frequently Asked Questions about convex-http-actions

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

FAQPage Schema
How do I create an HTTP endpoint in Convex?▼

Define routes in convex/http.ts using httpRouter and httpAction, specifying a path, method, and handler that returns a Response object. Export the router as the default export, and Convex serves it at your deployment's HTTP URL.

How to verify Stripe webhook signatures in Convex?▼

Read the raw body with request.text() and the stripe-signature header in the HTTP action, then pass both to a Node.js internal action that calls stripe.webhooks.constructEvent with your webhook secret. Never process the event before verification succeeds.

Can Convex HTTP actions call database mutations?▼

Yes, HTTP actions use ctx.runMutation and ctx.runQuery to invoke internal or public Convex functions. Use internal functions for sensitive operations so they are not exposed as public client-facing API.

How do I handle CORS for Convex HTTP endpoints?▼

Add an OPTIONS route for the same path that returns a 204 response with Access-Control-Allow-Origin, Methods, and Headers. Include the same CORS headers on the actual endpoint response so browsers accept it.

Why does my Convex webhook return a signature verification error?▼

Verification fails when the body is parsed as JSON before verification, since signatures are computed over the raw payload. Always use request.text() for the body and confirm the webhook secret environment variable matches the provider's value.