REST API Overview
Integrate Fairlx with your existing tools and workflows using our RESTful API.
Introduction
The Fairlx REST API allows you to programmatically access and manage your workspaces, projects, work items, and more. The API follows RESTful conventions and returns JSON responses.
Note
The API is currently in beta. While we strive for stability, some endpoints may change as we continue development.
Authentication
All API requests require authentication using an API key. You can generate API keys from your account settings or organization admin panel.
Include your API key in the request header:
API Key Header
bashcurl -X GET "https://api.fairlx.com/v1/workspaces" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Warning
Keep your API keys secure. Never expose them in client-side code or public repositories. Use environment variables for storage.
Base URL
All API requests should be made to:
Base URL
texthttps://api.fairlx.com/v1Common Endpoints
Here are some commonly used endpoints:
Workspaces
| Method | Endpoint | Description |
|---|---|---|
GET | /workspaces | List all workspaces |
POST | /workspaces | Create a workspace |
GET | /workspaces/:id | Get workspace details |
PATCH | /workspaces/:id | Update a workspace |
DELETE | /workspaces/:id | Delete a workspace |
Projects
| Method | Endpoint | Description |
|---|---|---|
GET | /workspaces/:id/projects | List projects in workspace |
POST | /workspaces/:id/projects | Create a project |
GET | /projects/:id | Get project details |
Error Handling
The API uses standard HTTP status codes to indicate success or failure:
200 OK— Request succeeded201 Created— Resource created successfully400 Bad Request— Invalid request parameters401 Unauthorized— Missing or invalid API key403 Forbidden— Insufficient permissions404 Not Found— Resource not found429 Too Many Requests— Rate limit exceeded500 Internal Server Error— Server error
Error responses include a JSON body with details:
Error Response
json{
"error": {
"code": "INVALID_REQUEST",
"message": "The 'name' field is required",
"details": {
"field": "name",
"reason": "required"
}
}
}