convex-http-actions

Build secure Convex HTTP endpoints with routing, authentication, and CORS handling.

Updated May 4, 2024
One-click install
npx skills add https://github.com/kcrlee/dots --skill convex-http-actions-kcrlee
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-http-actions
Source: https://github.com/kcrlee/dots/tree/main/claude/.claude/skills/convex-http-actions
Command: npx skills add https://github.com/kcrlee/dots --skill convex-http-actions-kcrlee

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It removes the complexity of building secure HTTP endpoints in Convex for webhooks, external APIs, custom routes, and file-download flows.

Core Features & Use Cases

  • Webhook Handling: Receive, verify, and process events from services like Stripe, GitHub, and Clerk.
  • HTTP API Design: Build GET, POST, OPTIONS, and path-prefix routes with JSON, form-data, and raw-body request handling.
  • Security and Reliability: Add authentication, CORS headers, signature validation, error handling, and internal query or mutation calls.
  • Use Case: A product team can expose a public webhook endpoint that validates signatures, records the event, updates database state, and returns the correct HTTP response without leaking internal logic.

Quick Start

Ask the skill to design a secure Convex HTTP action router for a webhook or API endpoint with authentication, CORS, and signature verification.

Frequently Asked Questions about convex-http-actions

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

FAQPage Schema
How do I build secure Convex HTTP endpoints for webhooks?

Secure Convex HTTP endpoints are built using HTTP actions that handle request parsing, signature validation, and internal mutation orchestration. This approach verifies incoming webhook events from services like Stripe or GitHub before updating database state.

How does webhook signature validation work in Convex HTTP actions?

Webhook signature validation in Convex HTTP actions verifies incoming request payloads against a secret signature before processing. This mechanism prevents unauthorized requests from triggering internal queries or mutating database state.

Can I handle CORS and authentication in Convex API routes?

Yes, Convex API routes support CORS header configuration and authentication within HTTP actions. You can shape responses and validate credentials for GET, POST, and OPTIONS requests across JSON and raw-body payloads.

What's the best way to process raw-body requests and file downloads in Convex?

Processing raw-body requests and file downloads in Convex relies on HTTP actions designed for payload parsing and response shaping. This method handles form-data and custom route logic without exposing internal backend operations.

Does Convex support path-prefix routing for external API integration?

Convex supports path-prefix routing for external API integration through custom HTTP actions. This allows you to define specific GET and POST endpoints that parse JSON requests and orchestrate internal queries securely.

Why are my Convex HTTP actions leaking internal logic during error handling?

Convex HTTP actions leak internal logic when error handling patterns are not properly configured. Production-ready implementations require structured response shaping and secure error boundaries to prevent exposing internal query and mutation details.