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
| Name | Type | Description |
|---|---|---|
| session | SessionDep | The database session dependency used to perform persistence operations. |
| current_user | CurrentUser | The currently authenticated user who will be assigned as the owner of the new item. |
| item_in | ItemCreate | The schema containing the initial data required to create the new item. |
Request Body
| Field | Type | Description |
|---|---|---|
| title | string | The title or name of the item being created. |
| description | string | A detailed description of the item's purpose or content. |
Response
| Status | Description |
|---|---|
| 200 | The item was successfully created and returned. Returns ItemPublic. |
| 401 | The request is unauthorized because the user is not authenticated. Returns null. |
| 422 | The request body contains validation errors or missing required fields. Returns null. |