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
Available Endpoints
A summary of the available API endpoints.
Endpoint | Method | Description | |
---|---|---|---|
/api/fayda/health | GET | Check API health status | View Docs |
/api/fayda/otp/initiate | POST | Initiate OTP verification | View Docs |
/api/fayda/otp/verify | POST | Verify OTP code | View Docs |
/api/fayda/config | GET | Get API configuration | View Docs |
/api/fayda/config | PATCH | Update 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).
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"
}