Update List
Endpoint
URL: /:projectId/lists/:listId
Method: PATCH
Authentication Required: Yes
Description
Updates the name of an existing non-root list belonging to the authenticated user.
Request
Headers
Header | Type | Required | Description |
---|---|---|---|
Authorization | string | Yes | Bearer token for authentication. |
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
listId | string | Yes | The ID of the list to update. |
Body Parameters
Field | Type | Required | Description |
---|---|---|---|
update | object | Yes | Object containing fields to update. Must include name . |
Example Request
{
"update": {
"name": "Updated List Name"
}
}
Response
Success Response (200 OK)
{
"id": "list_abc",
"projectId": "proj1234",
"userId": "user_xyz",
"name": "Updated List Name",
"parentId": "list_parent",
"entityIds": [],
"subLists": [],
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-03T00:00:00.000Z"
}
Error Responses
Missing Data (400 Bad Request)
{
"error": "Missing list ID or update data",
"code": "list/missing-data"
}
Blank Name (400 Bad Request)
{
"error": "Cannot set the name to blank",
"code": "list/blank-name"
}
List Not Found (404 Not Found)
{
"error": "List not found",
"code": "list/not-found"
}
Server Error (500 Internal Server Error)
{
"error": "Server error",
"code": "list/server-error",
"details": "<Error message>"
}
Notes
- Only sub-lists (lists with a
parentId
) can be renamed via this endpoint. - The response includes the updated and populated list.