Skip to main content

Overview

The ReferralLoop API uses standard HTTP status codes to indicate success or failure. This guide explains common error codes and how to handle them.

Error Response Format

All error responses follow this format:
Some errors may include additional fields:

HTTP Status Codes

400 Bad Request

The request was malformed or contained invalid parameters. Common causes:
  • Missing required fields
  • Invalid data types
  • Invalid parameter values
Example:

401 Unauthorized

The API key is missing, invalid, or expired. Common causes:
  • Missing Authorization header
  • Invalid API key format
  • Expired or revoked API key
Example:

403 Forbidden

The request is valid, but the action is not allowed. Common causes:
  • Free plan attempting to use API (API access requires paid plan)
  • Insufficient permissions
Example:

404 Not Found

The requested resource doesn’t exist. Common causes:
  • Invalid waitlist ID
  • Invalid signup ID
  • Resource was deleted
Example:

409 Conflict

The request conflicts with the current state of the resource. Common causes:
  • Email already exists on waitlist
  • Duplicate resource creation
Example:

429 Too Many Requests

The rate limit has been exceeded. Example:
See Rate Limits for more information.

500 Internal Server Error

An unexpected error occurred on the server. What to do:
  • Retry the request after a short delay
  • If the problem persists, contact support
Example:

Error Handling Best Practices

  1. Always check the status code before processing the response
  2. Read the error message to understand what went wrong
  3. Implement retry logic for 5xx errors with exponential backoff
  4. Handle rate limits by checking the X-RateLimit-Remaining header
  5. Log errors for debugging and monitoring

Example Error Handling