Documentation Index
Fetch the complete documentation index at: https://mintlify.com/devxtra-community/hayon/llms.txt
Use this file to discover all available pages before exploring further.
Base URL
All API requests are made to the following base URL:The default port is
5000 (configurable via the PORT environment variable). In production, replace http://localhost:5000 with your deployed backend hostname. All routes are prefixed with /api.API versioning
Hayon’s API is currently unversioned. Breaking changes will be communicated through the changelog before they are deployed.Authentication
Most endpoints require a valid JWT access token. Pass the token in theAuthorization header as a Bearer token:
httpOnly cookie (refreshToken) on successful login or signup.
See Authentication for the full token lifecycle.
Request format
All request bodies must be JSON. Set theContent-Type header accordingly:
Response format
All responses return JSON. Successful responses follow this structure:data field is present only when the endpoint returns a payload. Some endpoints return only success and message.
Error responses
Errors follow a consistent structure:| Status | Meaning |
|---|---|
400 | Bad request — invalid or missing input |
401 | Unauthorized — missing or invalid token |
403 | Forbidden — action not permitted |
404 | Not found |
429 | Too many requests — rate limit exceeded |
500 | Internal server error |
Rate limiting
Certain endpoints enforce per-identifier rate limits backed by Redis. When a limit is exceeded the API responds with429 Too Many Requests.
Rate limit metadata is returned in response headers:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests allowed in the current window |
X-RateLimit-Remaining | Requests remaining in the current window |
X-RateLimit-Reset | Unix timestamp when the window resets |
Retry-After | Seconds until the rate limit resets (only on 429 responses) |
Health check
A health check endpoint is available without authentication:CORS
The API enforces strict CORS. Requests are accepted only from:- The configured
FRONTEND_URLenvironment variable (typicallyhttp://localhost:3000in development, your production domain otherwise) http://localhost:3001(hardcoded secondary local development origin)
Retry-After header is included in the list of exposed headers, so clients can read it after a 429 response.
Cookies are supported cross-origin — requests from allowed origins may include credentials (credentials: 'include' in fetch, or withCredentials: true in Axios).