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
bash
curl -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
text
https://api.fairlx.com/v1

Common Endpoints

Here are some commonly used endpoints:

Workspaces

MethodEndpointDescription
GET/workspacesList all workspaces
POST/workspacesCreate a workspace
GET/workspaces/:idGet workspace details
PATCH/workspaces/:idUpdate a workspace
DELETE/workspaces/:idDelete a workspace

Projects

MethodEndpointDescription
GET/workspaces/:id/projectsList projects in workspace
POST/workspaces/:id/projectsCreate a project
GET/projects/:idGet project details

Error Handling

The API uses standard HTTP status codes to indicate success or failure:

  • 200 OK — Request succeeded
  • 201 Created — Resource created successfully
  • 400 Bad Request — Invalid request parameters
  • 401 Unauthorized — Missing or invalid API key
  • 403 Forbidden — Insufficient permissions
  • 404 Not Found — Resource not found
  • 429 Too Many Requests — Rate limit exceeded
  • 500 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"
    }
  }
}