Projects API

Projects are represented as Boards in the API.

Projects are represented as Boards in the API. When creating or managing a project, use the Board endpoints.

Note: In the API, Projects are referred to as Boards.

TL;DR: Board = Project

List Boards

Retrieve all boards accessible to the authenticated user.

Endpoint: GET /boards

Parameters:

  • None

Response Example:

{
  "status": true,
  "boards": [
    {
      "id": 1,
      "name": "My Design Project",
      "folders_count": 5,
      "media_count": 23
    }
  ]
}

Curl Example:

curl -X GET https://api.luw.ai/v2/boards \
-H "Authorization: Bearer LUW_API_TOKEN" 

Create Board

Create a new board for organizing your design assets.

Endpoint: POST /boards

Parameters:

  • name (string, Required) - Name of the board

Response Example:

{
  "status": true,
  "board": {
    "id": 1,
    "name": "My New Project",
    "folders_count": 0,
    "media_count": 0
  }
}

Curl Example:

curl -X POST https://api.luw.ai/v2/boards \
-H "Authorization: Bearer LUW_API_TOKEN" \
-d "name=My New Project"

Get Board

Retrieve a specific board with its folders and media.

Endpoint: GET /boards/:id

Parameters:

  • id (integer, Required) - Board ID in URL path

Response Example:

{
  "status": true,
  "board": {
    "id": 1,
    "name": "My Design Project",
    "folders": [
      {
        "id": 1,
        "name": "Living Room",
        "parent_id": null
      }
    ],
    "media": [
      {
        "id": 1,
        "url": "https://example.com/image.jpg",
        "folder_id": 1
      }
    ]
  }
}

Curl Example:

curl -X GET https://api.luw.ai/v2/boards/1 \
-H "Authorization: Bearer LUW_API_TOKEN"

Update Board

Update board information (requires admin/owner permissions).

Endpoint: PUT /boards/:id

Parameters:

  • id (integer, Required) - Board ID in URL path

  • name (string, Optional) - New name for the board

Response Example:

{
  "status": true
}

Curl Example:

curl -X PUT https://api.luw.ai/v2/boards/1 \
-H "Authorization: Bearer LUW_API_TOKEN" \
-d "name=Updated Board Name"

Delete Board

Delete a board and all its contents (requires admin/owner permissions).

Endpoint: DELETE /boards/:id

Parameters:

  • id (integer, Required) - Board ID in URL path

Response Example:

{
  "status": true
}

Curl Example:

curl -X DELETE https://api.luw.ai/v2/boards/1 \
-H "Authorization: Bearer LUW_API_TOKEN"

Board Folders

List Folders

Retrieve all folders within a specific board with their media.

Endpoint: GET /boards/:board_id/folders

Parameters:

  • board_id (integer, Required) - Board ID in URL path

Response Example:

{
  "status": true,
  "folders": [
    {
      "id": 1,
      "name": "Living Room",
      "parent_id": null,
      "media": [
        {
          "id": 1,
          "url": "https://example.com/image.jpg",
          "extras": null
        }
      ]
    }
  ]
}

Curl Example:

curl -X GET https://api.luw.ai/v2/boards/1/folders \
-H "Authorization: Bearer LUW_API_TOKEN"

Create Folder

Create a new folder within a board.

Endpoint: POST /boards/:board_id/folders

Parameters:

  • board_id (integer, Required) - Board ID in URL path

  • name (string, Required) - Folder name

  • parent_id (integer, Optional) - Parent folder ID for nested folders

Response Example:

{
  "status": true,
  "folder": {
    "id": 1,
    "name": "Living Room",
    "parent_id": null
  }
}

Curl Example:

curl -X POST https://api.luw.ai/v2/boards/1/folders \
-H "Authorization: Bearer LUW_API_TOKEN" \
-d "name=Living Room"

Update Folder

Update folder information.

Endpoint: PUT /boards/:board_id/folders/:id

Parameters:

  • board_id (integer, Required) - Board ID in URL path

  • id (integer, Required) - Folder ID in URL path

  • name (string, Optional) - New folder name

  • parent_id (integer, Optional) - New parent folder ID

Response Example:

{
  "status": true,
  "folder": {
    "id": 1,
    "name": "Updated Folder Name",
    "parent_id": null
  }
}

Curl Example:

curl -X PUT https://api.luw.ai/v2/boards/1/folders/1 \
-H "Authorization: Bearer LUW_API_TOKEN" \
-d "name=Updated Folder Name"

Delete Folder

Delete a folder and all its contents.

Endpoint: DELETE /boards/:board_id/folders/:id

Parameters:

  • board_id (integer, Required) - Board ID in URL path

  • id (integer, Required) - Folder ID in URL path

Response Example:

{
  "status": true
}

Curl Example:

curl -X DELETE https://api.luw.ai/v2/boards/1/folders/1 \
-H "Authorization: Bearer LUW_API_TOKEN"

Board Media

Create Media

Add media (images, files) to a board or folder. Images will be processed in the background.

Endpoint: POST /boards/:board_id/media

Parameters:

  • board_id (integer, Required) - Board ID in URL path

  • url (string, Optional) - Primary media URL

  • control_image (string, Optional) - Secondary/reference image URL

  • folder_id (integer, Optional) - Folder ID to organize media

  • extras (string, Optional) - Additional metadata as JSON string

Response Example:

{
  "status": true,
  "media": {
    "id": 1,
    "url": null,
    "control_image": null,
    "folder_id": 1,
    "extras": "{\"description\":\"Living room design\"}"
  }
}

Note: The url and control_image fields will be populated after background processing completes.

Curl Example:

curl -X POST https://api.luw.ai/v2/boards/1/media \
-H "Authorization: Bearer LUW_API_TOKEN" \
-d "url=https://example.com/image.jpg" \
-d "control_image=https://example.com/reference.jpg" \
-d "folder_id=1" \
-d "extras={\"description\":\"Living room design\"}"

Delete Media

Remove media from a board.

Endpoint: DELETE /boards/:board_id/media/:id

Parameters:

  • board_id (integer, Required) - Board ID in URL path

  • id (integer, Required) - Media ID in URL path

Response Example:

{
  "status": true
}

Curl Example:

curl -X DELETE https://api.luw.ai/v2/boards/1/media/1 \
-H "Authorization: Bearer LUW_API_TOKEN"

Move Media

Move media between folders within the same board.

Endpoint: PUT /boards/:board_id/media/:id/move

Parameters:

  • board_id (integer, Required) - Board ID in URL path

  • id (integer, Required) - Media ID in URL path

  • folder_id (integer, Optional) - Target folder ID (null to move to board root)

Response Example:

{
  "status": true
}

Curl Example:

curl -X PUT https://api.luw.ai/v2/boards/1/media/1/move \
-H "Authorization: Bearer LUW_API_TOKEN" \
-d "folder_id=2"

Last updated