Lair API
v1REST API Documentation
Authentication
All API requests require a valid API key sent via the Authorization header. API keys can be created from the admin dashboard under Settings → API Keys.
curl -H "Authorization: Bearer lair_a1b2c3d4e5f6..." \
https://your-hotel.com/api/v1/rooms⚠️ Keep your API key secret. The full key is shown only once at creation time. Store it securely — it cannot be retrieved later. If compromised, revoke it immediately and create a new one.
Rooms
Reservations
Guests
Availability
Rates
Rate Limits
API requests are limited to 100 requests per minute per API key. When the limit is exceeded, requests return 429 Too Many Requests with a Retry-After header.
HTTP/1.1 429 Too Many Requests
Retry-After: 42
{
"success": false,
"error": "Rate limit exceeded"
}Errors
All errors follow a consistent format. The success field is always false on error.
{
"success": false,
"error": "Human-readable error message"
}| Code | Meaning | Description |
|---|---|---|
| 401 | Unauthorized | Missing or invalid API key |
| 403 | Forbidden | API key lacks the required permission |
| 404 | Not Found | Resource does not exist |
| 422 | Unprocessable Entity | Validation error — check required fields |
| 429 | Too Many Requests | Rate limit exceeded (100 req/min per key) |
| 500 | Internal Server Error | Something went wrong on our end |