Skip to main content
Complete reference of API error codes, their meanings, and how to resolve them.

HTTP Status Codes

Success Codes

Client Error Codes

Server Error Codes


API Error Response Format

All API errors follow this standardized flat format:
Field meanings:
  • status: HTTP status code (always matches response header)
  • code: Machine-readable error code for client-side branching
  • message: Human-readable message safe for UI display and developer debugging
  • details: Additional context (omitted if not needed), never raw error details

Authentication Errors

HTTP Status: 401Message: “Invalid or expired authentication token”Causes:
  • Token has expired (default: 1 hour)
  • Token was revoked
  • Token is malformed
Solutions:
  1. Refresh the token using Clerk SDK
  2. Sign out and sign back in
  3. Check token format is Bearer <token>
HTTP Status: 401Message: “Authentication token required”Causes:
  • Authorization header not included
  • Header format incorrect
Solutions:
  1. Add Authorization: Bearer <token> header
  2. Ensure token is not empty
  3. Check for typos in header name
HTTP Status: 401Message: “Authentication token has expired”Causes:
  • JWT token exceeded its lifetime (1 hour default)
Solutions:
  1. Call getToken() from Clerk to get fresh token
  2. Clerk SDK handles refresh automatically in most cases
  3. Check if user session is still valid
HTTP Status: 401Message: “Token signature verification failed”Causes:
  • Token was modified
  • Wrong Clerk instance (test vs production)
  • Clerk secret key mismatch
Solutions:
  1. Verify CLERK_SECRET_KEY matches Clerk Dashboard
  2. Ensure using correct environment (test/prod)
  3. Check token hasn’t been tampered with

Authorization Errors

HTTP Status: 403Message: “You don’t have permission to perform this action”Causes:
  • User lacks required role (Owner/Admin)
  • Resource belongs to different organization
  • Feature requires higher subscription tier
Solutions:
  1. Check user’s role in the organization
  2. Verify organization membership
  3. Check subscription tier for feature access
HTTP Status: 403Message: “User is not a member of this organization”Causes:
  • User trying to access organization they don’t belong to
  • User was removed from organization
Solutions:
  1. Verify user is member of the organization
  2. Check if membership was revoked
  3. Request invitation to organization
HTTP Status: 403Message: ” is available on and above”Causes:
  • The organization’s plan is below the tier the feature needs in entitlements/registry.json, and that entitlement is enforced
The body also carries entitlement (the registry key), required_tier, and current_tier, so a client can name the plan to upgrade to:
Solutions:
  1. Upgrade the plan under Settings → Billing & payments → Billing
  2. Check the org’s tier with GET /api/v1/organizations/{orgId}/entitlements
HTTP Status: 403Message: “This action requires Owner or Admin role”Causes:
  • User has Member role, needs Admin or Owner
  • Specific action restricted to organization owner
Solutions:
  1. Request role upgrade from organization owner
  2. Use account with appropriate permissions

Validation Errors

HTTP Status: 400Message: “Validation failed”Response includes details:
Solutions:
  1. Check the details.fields for specific errors
  2. Validate input before sending
  3. Ensure required fields are present
HTTP Status: 400Message: “Invalid JSON in request body”Causes:
  • Malformed JSON syntax
  • Missing Content-Type header
  • Empty request body when body expected
Solutions:
  1. Validate JSON syntax
  2. Add Content-Type: application/json header
  3. Ensure body is not empty
HTTP Status: 400Message: “Required field missing: ”Causes:
  • Required field not included in request
  • Field name typo (camelCase vs snake_case)
Solutions:
  1. Check API documentation for required fields
  2. Verify field naming convention (API uses snake_case)
HTTP Status: 400Message: “Invalid date format”Expected format: ISO 8601 (2024-06-15T19:00:00Z)Solutions:
  1. Use ISO 8601 format with timezone
  2. Ensure date is valid (not Feb 30)

Resource Errors

HTTP Status: 404Message: “Resource not found”Causes:
  • Resource doesn’t exist
  • Resource was deleted
  • Wrong ID format
  • No permission to view resource
Solutions:
  1. Verify the resource ID is correct
  2. Check if resource was deleted
  3. Ensure user has access to the resource
HTTP Status: 409Message: “Resource already exists”Causes:
  • Duplicate email address
  • Duplicate organization slug
  • Duplicate invitation for same user/event
Solutions:
  1. Use unique values for unique fields
  2. Check if resource already exists before creating
  3. Update existing resource instead
HTTP Status: 409Message: “Cannot delete resource that is in use”Causes:
  • Deleting position assigned to events
  • Deleting user with pending invitations
Solutions:
  1. Remove references before deleting
  2. Archive instead of delete

Webhook Errors

HTTP Status: 401Message: “Webhook signature verification failed”Causes:
  • Wrong webhook secret
  • Request body modified in transit
  • Replay attack (timestamp too old)
Solutions:
  1. Verify webhook secret matches service dashboard
  2. Ensure raw body is used for signature verification
  3. Check system clock is synchronized
HTTP Status: 500Message: “Failed to process webhook event”Causes:
  • Database error during processing
  • Required data missing in webhook payload
Solutions:
  1. Check API logs for detailed error
  2. Verify webhook payload format
  3. Most webhooks auto-retry on failure

Rate Limiting

HTTP Status: 429Message: “Too many requests”Response headers:
Solutions:
  1. Implement exponential backoff
  2. Cache responses where possible
  3. Batch requests when possible
  4. Wait until X-RateLimit-Reset timestamp

External Service Errors

HTTP Status: 502Message: “Payment service error”Causes:
  • Stripe API unavailable
  • Invalid Stripe API key
  • Card declined
Solutions:
  1. Check Stripe status page
  2. Verify Stripe API keys
  3. Check card details for decline reason
HTTP Status: 502Message: “SMS service error”Causes:
  • Twilio API unavailable
  • Invalid phone number
  • Insufficient Twilio balance
Solutions:
  1. Check Twilio status page
  2. Verify phone number format (E.164)
  3. Check Twilio account balance
HTTP Status: 502Message: “Authentication service error”Causes:
  • Clerk API unavailable
  • Invalid Clerk configuration
Solutions:
  1. Check Clerk status page
  2. Verify Clerk API keys
  3. Retry after brief delay

Debugging Tips

Enable Verbose Logging

Check API Logs

Validate Request


Getting Help

If you encounter an error not listed here:
  1. Check the API logs for detailed error messages
  2. Search the Troubleshooting guide
  3. Check GitHub Issues for known issues
  4. Ask in Slack #soundcheck-dev with:
    • Error code and message
    • Request details (endpoint, method, body)
    • Steps to reproduce