Forms API

Capture subscribers through public form endpoints.

Capture subscribers through public form endpoints.

Endpoint

MethodPath
POST/forms/:formId

Supported content types

  • application/json
  • application/x-www-form-urlencoded
  • multipart/form-data

Behavior

  • Form endpoint must be active
  • Honeypot field is checked to block spam
  • Field requirements are validated from form config
  • Rate limiting is applied by IP
  • Optional redirect is supported after submission

Example request

curl -X POST "https://<deployment>.convex.site/forms/<formId>" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "lead@example.com",
    "firstName": "Avery",
    "company": "Acme"
  }'

Typical responses

Success:

{ "success": true, "message": "Form submitted successfully" }

Validation failure:

{
  "error": {
    "message": "Email is required",
    "code": "validation_error",
    "details": ["Email is required"]
  }
}