Skip to main content

POST /utils/

Create new item.

Creates a new item associated with the currently authenticated user and persists it to the database.

Endpoint

POST /utils/

Parameters

NameTypeDescription
sessionSessionDepThe database session dependency used to perform persistence operations.
current_userCurrentUserThe currently authenticated user who will be assigned as the owner of the new item.
item_inItemCreateThe schema containing the initial data required to create the new item.

Request Body

FieldTypeDescription
titlestringThe title or name of the item being created.
descriptionstringA detailed description of the item's purpose or content.

Response

StatusDescription
200The item was successfully created and returned. Returns ItemPublic.
401The request is unauthorized because the user is not authenticated. Returns null.
422The request body contains validation errors or missing required fields. Returns null.