Skip to content

totask Board API Documentation

Board Routes

All board-related endpoints are prefixed with /b.

Create Board

Endpoint: POST /b/create

Description: Creates a new board.

Request Body:

json
{
  "name": "Board Name",
  "description": "Board Description",
  "backgroundColor": "#ffffff",
  "workspace": "workspace_id"
}

Response:

  • 201 Created
    json
    {
      "_id": "board_id",
      "name": "Board Name",
      "description": "Board Description",
      "backgroundColor": "#ffffff",
      ...
    }

Delete Board

Endpoint: DELETE /b/:boardId

Description: Deletes a board by ID.

Response:

  • 204 No Content

Get b by Workspace

Endpoint: GET /b/of/:workspaceId

Description: Retrieves b by workspace ID.

Query Parameters:

  • isClosed: Boolean flag to filter closed b
  • name: Search term for board name

Response:

  • 200 OK
    json
    {
      "results": [ ... ],
      "page": 1,
      "limit": 10,
      "totalPages": 1,
      "totalResults": 1
    }

Update Board

Endpoint: PUT /b/:boardId

Description: Updates a board by ID.

Request Body:

json
{
  "name": "New Board Name",
  "description": "New Board Description",
  "backgroundColor": "#ffffff",
  "workspace": "workspace_id",
  "isPrivate": true,
  "members": ["user_id1", "user_id2"]
}

Response:

  • 200 OK
    json
    {
      "_id": "board_id",
      "name": "New Board Name",
      "description": "New Board Description",
      ...
    }

Get Board

Endpoint: GET /b/:boardId

Description: Retrieves a board by ID.

Response:

  • 200 OK
    json
    {
      "_id": "board_id",
      "name": "Board Name",
      "description": "Board Description",
      ...
    }

Add Member to Board

Endpoint: POST /b/addMember

Description: Adds a member to a board.

Request Body:

json
{
  "boardId": "board_id",
  "memberId": "user_id"
}

Response:

  • 200 OK
    json
    {
      "_id": "board_id",
      "name": "Board Name",
      ...
    }

Remove Member from Board

Endpoint: PUT /b/removeMember

Description: Removes a member from a board.

Request Body:

json
{
  "boardId": "board_id",
  "memberId": "user_id"
}

Response:

  • 200 OK
    json
    {
      "_id": "board_id",
      "name": "Board Name",
      ...
    }

Check If User Is Admin

Endpoint: GET /b/isUserAdmin/:boardId

Description: Checks if the current user is an admin of a board.

Response:

  • 200 OK
    json
    true

Get All Members

Endpoint: GET /b/membersOf/:boardId

Description: Retrieves all members of a board.

Response:

  • 200 OK
    json
    {
      "results": [ ... ]
    }

Get Workspace Members by Board ID

Endpoint: GET /b/workspaceMembersOf/:boardId

Description: Retrieves all members of the workspace associated with a board.

Response:

  • 200 OK
    json
    {
      "results": [ ... ]
    }