Folders

Folders

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

List Folders

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"
const response = await fetch("https://u2l.ai/api/v1/folders", {
  headers: {
    "Authorization": "Bearer u2l_live_your_api_key",
  },
});

const { folders } = await response.json();
import requests

response = requests.get(
    "https://u2l.ai/api/v1/folders",
    headers={"Authorization": "Bearer u2l_live_your_api_key"},
)

folders = response.json()["folders"]
{
  "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"
    }
  ]
}

Create Folder

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"}'
const response = await fetch("https://u2l.ai/api/v1/folders", {
  method: "POST",
  headers: {
    "Authorization": "Bearer u2l_live_your_api_key",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ name: "Marketing Campaign Q1" }),
});

const folder = await response.json();
import requests

response = requests.post(
    "https://u2l.ai/api/v1/folders",
    headers={
        "Authorization": "Bearer u2l_live_your_api_key",
        "Content-Type": "application/json",
    },
    json={"name": "Marketing Campaign Q1"},
)

folder = response.json()
{
  "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
  "name": "Marketing Campaign Q1",
  "linksCount": 0,
  "createdAt": "2026-02-11T10:00:00.000Z"
}

Rename Folder

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"}'
const folderId = "c3d4e5f6-a7b8-9012-cdef-123456789012";

const response = await fetch(`https://u2l.ai/api/v1/folders/${folderId}`, {
  method: "PATCH",
  headers: {
    "Authorization": "Bearer u2l_live_your_api_key",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ name: "Q1 Marketing" }),
});

const result = await response.json();
import requests

folder_id = "c3d4e5f6-a7b8-9012-cdef-123456789012"

response = requests.patch(
    f"https://u2l.ai/api/v1/folders/{folder_id}",
    headers={
        "Authorization": "Bearer u2l_live_your_api_key",
        "Content-Type": "application/json",
    },
    json={"name": "Q1 Marketing"},
)

result = response.json()
{
  "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
  "name": "Q1 Marketing",
  "message": "Folder renamed successfully"
}

Delete Folder

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"
const folderId = "c3d4e5f6-a7b8-9012-cdef-123456789012";

const response = await fetch(`https://u2l.ai/api/v1/folders/${folderId}`, {
  method: "DELETE",
  headers: {
    "Authorization": "Bearer u2l_live_your_api_key",
  },
});

const result = await response.json();
// { "message": "Folder deleted successfully" }
import requests

folder_id = "c3d4e5f6-a7b8-9012-cdef-123456789012"

response = requests.delete(
    f"https://u2l.ai/api/v1/folders/{folder_id}",
    headers={"Authorization": "Bearer u2l_live_your_api_key"},
)

result = response.json()
# {"message": "Folder deleted successfully"}
{
  "message": "Folder deleted successfully"
}