Members API

Manage workspace membership and roles.

Overview

Members represent users who have access to a workspace. Each member has a role that determines their permissions within the workspace.

Member Roles

RoleDescription
OWNERFull control including workspace deletion
ADMINManage settings, members, and all content
MEMBERCreate and manage work items

List Members

Retrieve all members in a workspace with their user details.

Request
bash
GET /api/members?workspaceId=ws_abc123

curl -X GET "https://api.fairlx.com/v1/members?workspaceId=ws_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
json
{
  "data": {
    "documents": [
      {
        "$id": "member_001",
        "userId": "user_abc",
        "workspaceId": "ws_abc123",
        "role": "ADMIN",
        "name": "John Doe",
        "email": "john@example.com",
        "profileImageUrl": "https://..."
      }
    ],
    "total": 1
  }
}

Get Current Member

Get the current authenticated user's membership and permissions for a workspace.

Request
bash
GET /api/members/current?workspaceId=ws_abc123

curl -X GET "https://api.fairlx.com/v1/members/current?workspaceId=ws_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
json
{
  "data": {
    "$id": "member_001",
    "userId": "user_abc",
    "workspaceId": "ws_abc123",
    "role": "ADMIN",
    "permissions": [
      "sprint.create",
      "sprint.start",
      "sprint.complete",
      "workitem.create",
      "workitem.edit",
      "workitem.delete"
    ]
  }
}
Tip
Use this endpoint to check what actions the current user can perform before making API calls.

Update Member Role

Change a member's role. Requires Admin role.

Request
bash
PATCH /api/members/:memberId
Content-Type: application/json

curl -X PATCH "https://api.fairlx.com/v1/members/member_001" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "role": "ADMIN"
  }'
Warning
Cannot downgrade the only member of a workspace.

Remove Member

Remove a member from a workspace. Admins can remove other members, and any member can remove themselves.

Request
bash
DELETE /api/members/:memberId

curl -X DELETE "https://api.fairlx.com/v1/members/member_001" \
  -H "Authorization: Bearer YOUR_API_KEY"

Restrictions

  • Cannot remove the last member of a workspace
  • Owners cannot leave without transferring ownership first
  • Non-admins can only remove themselves
  • Cannot remove the workspace owner
Note
To invite new members, use the workspace invite code via POST /workspaces/:id/join.