docs/versioned_docs/version-v0.31.0/api/create-list.api.mdx
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; import ParamsDetails from "@theme/ParamsDetails"; import RequestSchema from "@theme/RequestSchema"; import StatusCodes from "@theme/StatusCodes"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; import Heading from "@theme/Heading";
<Heading as={"h1"} className={"openapi__heading"} children={"Create a new list"}
</Heading>
<MethodEndpoint method={"post"} path={"/lists"} context={"endpoint"}
</MethodEndpoint>
Create a new bookmark list. Lists can be manual (bookmarks are added explicitly) or smart (bookmarks are matched automatically by a search query).
<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}
</Heading>
<ParamsDetails parameters={undefined}
</ParamsDetails>
<RequestSchema
title={"Body"}
body={{"description":"The list to create. For smart lists, a query field is required. For manual lists, query must not be set.","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","minLength":0,"maxLength":500},"icon":{"type":"string"},"type":{"type":"string","enum":["manual","smart"],"default":"manual"},"query":{"type":"string","minLength":1},"parentId":{"type":"string","nullable":true}},"required":["name","icon"]}}}}}
</RequestSchema>
<StatusCodes id={undefined} label={undefined} responses={{"201":{"description":"The created list.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"icon":{"type":"string"},"parentId":{"type":"string","nullable":true},"type":{"type":"string","enum":["manual","smart"],"default":"manual"},"query":{"type":"string","nullable":true},"public":{"type":"boolean"},"hasCollaborators":{"type":"boolean"},"userRole":{"type":"string","enum":["owner","editor","viewer","public"]}},"required":["id","name","icon","parentId","public","hasCollaborators","userRole"],"title":"List"}}}},"400":{"description":"Bad request — invalid input data (e.g., smart list missing query, or manual list with a query).","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"A machine-readable error code."},"message":{"type":"string","description":"A human-readable error message."}},"required":["code","message"],"title":"Error"}}}},"401":{"description":"Unauthorized — the Bearer token is missing, invalid, or expired.","content":{"text/plain":{"schema":{"type":"string","example":"Unauthorized"}}}}}}
</StatusCodes>