---
title: "Edit Journal"
method: PATCH
path: "/v1/journals/editor/edit"
---

# Edit Journal

`PATCH /v1/journals/editor/edit`

## Request body

- EditJournalRequest
  - `journal_id` string, required
  - `operations` union[], required
    - union
      - CreateNodeOperation
        - `type` 'create_node', required
        - `nodeType` string, required
        - `params` unknown[], required
          - unknown
        - `referenceId` string, nullable
        - `position` 'before' | 'after', nullable
      - UpdateNodeOperation
        - `type` 'update_node', required
        - `nodeId` string, required
        - `node` BlockNodeInput, required
          - `type` string, required
          - `attrs` BlockAttrs
            - `id` string, nullable
            - `level` integer, nullable
          - `content` BlockNodeInput[], nullable
          - `marks` Mark[], nullable
            - `type` string, required
            - `attrs` BlockAttrs
              - …
          - `text` string, nullable
      - DeleteNodeOperation
        - `type` 'delete_node', required
        - `nodeId` string, required
  - `sync_realtime_state` boolean — Whether to directly update the state of the journal to all connected users. WARNING: Operations through synced states CANNOT be undone, and will remove Ctrl+Z functionality for all users for the changes

## Response `200`

Successful Response

- EditJournalResponse
  - `success` boolean, required
  - `message` string, nullable
  - `journal_id` string, required
  - `results` EditResults[], required
    - `operation` 'create_node' | 'update_node' | 'delete_node', required
    - `success` boolean, required
    - `error` string, nullable
    - `data` OperationResultData
      - `created` boolean, nullable
      - `nodeId` string, nullable
      - `updated` string, nullable
      - `deleted` string, nullable
  - `timestamp` string

## Other responses

- `401` — Invalid API key or unauthorized access
- `422` — Validation Error
- `429` — Rate limit exceeded
- `500` — Internal server error

---

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