---
title: "Create or update nightly inventory for a date"
method: POST
path: "/api/diary/inventory"
tags: ["Diary"]
---

# Create or update nightly inventory for a date

`POST /api/diary/inventory`

## Request

- Base URL: `https://api.rewritelifestyle.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.rewritelifestyle.ai/api/diary/inventory`
- Auth: HTTP bearer

## Request body

- CreateInventoryDto
  - `date` string, required
  - `responses` InventoryResponseDto[], required: One response per active question — must match all active question IDs exactly
    - `questionId` number, required: ID from GET /diary/inventory/questions
    - `boolAnswer` object, nullable: null for text-only questions (input_type = "text")
    - `note` object, nullable

## Response `201`

---

[API](https://skmtc.dev/rewritelifestyle/apis/rewrite-lifestyle-api.md) - [All operations](https://skmtc.dev/rewritelifestyle/apis/rewrite-lifestyle-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rewritelifestyle/apis/rewrite-lifestyle-api/revisions/28695827f27a?raw)
