---
title: "Create diary entry"
method: POST
path: "/api/diary"
tags: ["diary"]
---

# Create diary entry

`POST /api/diary`

Create a diary entry with optional attachments.

## Response `201`

Successful Response

- DiaryCreateResponse — Response returned after creating a diary entry.
  - `title` string — Success title
  - `message` string, required — Success message
  - `entry` DiaryEntryResponse, required — Single diary entry with attachments.
    - `id` string, required — Diary entry UUID
    - `patient_id` string, required — Patient UUID
    - `entry_date` string, date, required — Diary page date
    - `title` string, nullable — Optional diary title
    - `content` string, required — Diary content
    - `files` DiaryFileResponse[] — Diary attachments
      - `id` string, required — Diary file UUID
      - `file_name` string, required — Stored file name
      - `file_path` string, required — Full storage path
      - `content_type` string, nullable — MIME type
      - `sort_order` integer, required — Display order within the diary entry
      - `created_at` string, date-time, required — When the file was uploaded
    - `previous_entry` DiaryAdjacentEntryResponse — Minimal adjacent diary page info for previous/next navigation.
      - `id` string, required — Diary entry UUID
      - `entry_date` string, date, required — Diary page date
      - `title` string, nullable — Optional diary title
    - `next_entry` DiaryAdjacentEntryResponse — Minimal adjacent diary page info for previous/next navigation.
      - `id` string, required — Diary entry UUID
      - `entry_date` string, date, required — Diary page date
      - `title` string, nullable — Optional diary title
    - `created_at` string, date-time, required — Creation datetime
    - `updated_at` string, date-time, required — Last update datetime

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/corabea/apis/corabea-api.md) · [All operations](https://skmtc.dev/corabea/apis/corabea-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/corabea/corabea-api/revisions/13c1bce1bdc4/schema)
