Rate Limiting

Understanding and handling rate limits in the Fayda Authentication API.

Overview
To ensure fair usage and system stability, the Fayda Authentication API implements rate limiting. When a rate limit is exceeded, the API will return a 429 Too Many Requests error.
Rate Limit Types
Limits are applied based on your API key's plan and on a per-FCN basis to prevent abuse.

API Key Rate Limits

These limits apply to the total number of requests made with a specific API key.

PlanLimitWindow
Free100 requestsPer hour
Standard1,000 requestsPer hour
Professional5,000 requestsPer hour
EnterpriseCustomCustom

FCN-Specific Rate Limits

To prevent abuse against a single user, additional limits are applied to OTP initiation requests for each FCN.

EndpointLimitWindow
/api/fayda/otp/initiate5 requestsPer 15 minutes
Rate Limit Headers
The API provides the following headers in the response to help you track your current rate limit status.
HeaderDescription
X-RateLimit-LimitThe maximum number of requests allowed in the current time window.
X-RateLimit-RemainingThe number of requests remaining in the current window.
X-RateLimit-ResetThe time at which the current window resets, in UTC epoch seconds.
Retry-AfterThe number of seconds to wait before making a new request. This header is only sent when you have been rate-limited.
Handling Rate Limits
When you are rate-limited, the API returns an error response.

Error Response (429 Too Many Requests)

json
{
  "success": false,
  "error": "RATE_LIMIT_EXCEEDED",
  "message": "You have exceeded the number of allowed requests.",
  "statusCode": 429,
  "details": {
    "retryAfter": 60 
  },
  "timestamp": "2023-07-20T12:34:56.789Z"
}