API Reference

Complete reference documentation for the Fayda Authentication API.

API Overview
The Fayda Authentication API provides a secure interface to authenticate Ethiopian users using their Fayda Card Numbers (FCN) through a simple REST API.

Base URL

https://fayda-auth.vercel.app
Authentication
All API requests require authentication using an API key.

Authorization Header

Authorization: Bearer YOUR_API_KEY

X-API-Key Header

X-API-Key: YOUR_API_KEY
Learn more about authentication
Available Endpoints
A summary of the available API endpoints.
EndpointMethodDescription
/api/fayda/healthGETCheck API health statusView Docs
/api/fayda/otp/initiatePOSTInitiate OTP verificationView Docs
/api/fayda/otp/verifyPOSTVerify OTP codeView Docs
/api/fayda/configGETGet API configurationView Docs
/api/fayda/configPATCHUpdate API configuration (Admin only)View Docs
Rate Limiting
API requests are subject to rate limiting. The default limit is 100 requests per hour per API key.
  • X-RateLimit-Limit- Maximum number of requests allowed in the window.
  • X-RateLimit-Remaining- Number of requests remaining in the current window.
  • X-RateLimit-Reset- ISO timestamp when the rate limit window resets.
  • Retry-After- Seconds to wait before retrying (only present when rate limited).
Learn more about rate limiting
Error Handling
All API endpoints return standardized error responses.
json
{
  "success": false,
  "error": "ERROR_CODE",
  "message": "Human-readable error message",
  "statusCode": 400,
  "details": { /* Additional error details */ },
  "timestamp": "2023-07-20T12:34:56.789Z"
}
View complete error reference