Folders

Organize your links into folders. When a folder is deleted, its links become uncategorized.

GET/api/v1/folders

List all folders with their link counts.

curl "https://u2l.ai/api/v1/folders" \
  -H "Authorization: Bearer u2l_live_your_api_key"
200 OK
{
  "folders": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "Marketing",
      "linksCount": 42,
      "createdAt": "2026-01-15T10:00:00.000Z"
    },
    {
      "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "name": "Product Launch",
      "linksCount": 18,
      "createdAt": "2026-02-01T14:30:00.000Z"
    }
  ]
}
POST/api/v1/folders

Create a new folder.

Request Body

NameTypeRequiredDescription
namestringRequiredName of the folder
curl -X POST "https://u2l.ai/api/v1/folders" \
  -H "Authorization: Bearer u2l_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"name": "Marketing Campaign Q1"}'
201 Created
{
  "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
  "name": "Marketing Campaign Q1",
  "linksCount": 0,
  "createdAt": "2026-02-11T10:00:00.000Z"
}
PATCH/api/v1/folders/{folderId}

Rename an existing folder.

Path Parameters

NameTypeRequiredDescription
folderIdstringRequiredThe folder's UUID

Request Body

NameTypeRequiredDescription
namestringRequiredNew name for the folder
curl -X PATCH "https://u2l.ai/api/v1/folders/c3d4e5f6-a7b8-9012-cdef-123456789012" \
  -H "Authorization: Bearer u2l_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"name": "Q1 Marketing"}'
200 OK
{
  "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
  "name": "Q1 Marketing",
  "message": "Folder renamed successfully"
}
DELETE/api/v1/folders/{folderId}

Delete a folder. Links inside the folder become uncategorized — they are not deleted.

Path Parameters

NameTypeRequiredDescription
folderIdstringRequiredThe folder's UUID
curl -X DELETE "https://u2l.ai/api/v1/folders/c3d4e5f6-a7b8-9012-cdef-123456789012" \
  -H "Authorization: Bearer u2l_live_your_api_key"
200 OK
{
  "message": "Folder deleted successfully"
}