> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sublay.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List

## List Object Documentation

The **List** object represents a structured, optionally nested collection of entities in Sublay. It supports custom names, hierarchical grouping, and user-defined organization of items.

### Properties

| **Property** | **Type** | **Description** |
| - | - | - |
| `id` | `string` | Unique identifier for the list (UUID). |
| `projectId` | `string` | Identifier of the associated project (UUID). |
| `userId` | `string` | Identifier of the user who created or owns the list (UUID). |
| `parentId` | `string \| null` | Optional parent list ID (UUID) if this is a nested list. |
| `name` | `string` | Human-readable name of the list. |
| `entityIds` | `string[]` | Array of entity IDs (UUIDs). Each ID must be unique within the list. |
| `entities` | `Partial<Entity>[]` | Array of partial entity objects corresponding to entityIds. |
| `createdAt` | `Date` | Timestamp when the list was created. |
| `updatedAt` | `Date` | Timestamp when the list was last updated. |

***

### Constraints

* The combination of `projectId`, `parentId`, and `name` must be unique.
* The `entityIds` array must not contain duplicate values.
* The `entities` array corresponds to the `entityIds` and contains partial entity data for display purposes.

***

### Example Usage

#### Basic List

```json theme={null}
{
  "id": "list-123456",
  "projectId": "project-xyz",
  "userId": "user-789",
  "name": "Favorite Articles",
  "entityIds": ["entity-111", "entity-222"],
  "entities": [
    { "id": "entity-111", "title": "Article 1" },
    { "id": "entity-222", "title": "Article 2" }
  ],
  "createdAt": "2024-02-14T12:34:56Z",
  "updatedAt": "2024-02-15T14:20:00Z"
}
```

#### Nested List

```json theme={null}
{
  "id": "list-7891011",
  "projectId": "project-abc",
  "userId": "user-222",
  "parentId": "list-123456",
  "name": "Advanced Topics",
  "entityIds": ["entity-333"],
  "entities": [
    { "id": "entity-333", "title": "Advanced Topic Article" }
  ],
  "createdAt": "2024-02-14T13:45:00Z",
  "updatedAt": "2024-02-16T09:10:30Z"
}
```

***

### Integration Notes

* Lists are hierarchical: a list can contain sub-lists via `parentId`.
* Used for favorites, collections, user-curated content, or tagging functionality.
* The `entities` array provides denormalized entity data for efficient display without additional API calls.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.