> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opennote.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Edit Journal



## OpenAPI

````yaml openapis/journals.json patch /journals/editor/edit
openapi: 3.1.0
info:
  title: Journals Routes
  version: 0.0.1
servers: []
security: []
paths:
  /journals/editor/edit:
    patch:
      summary: Edit Journal
      operationId: edit_journal_journals_editor_edit_patch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditJournalRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EditJournalResponse'
        '401':
          description: Invalid API key or unauthorized access
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: string
                type: object
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying
              schema:
                type: integer
        '500':
          description: Internal server error
      security:
        - HTTPBearer: []
components:
  schemas:
    EditJournalRequest:
      properties:
        journal_id:
          type: string
          title: Journal Id
        operations:
          items:
            anyOf:
              - $ref: '#/components/schemas/CreateNodeOperation'
              - $ref: '#/components/schemas/UpdateNodeOperation'
              - $ref: '#/components/schemas/DeleteNodeOperation'
          type: array
          title: Operations
        sync_realtime_state:
          type: boolean
          title: Sync Realtime State
          description: >-
            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
          default: true
      additionalProperties: true
      type: object
      required:
        - journal_id
        - operations
      title: EditJournalRequest
    EditJournalResponse:
      properties:
        success:
          type: boolean
          title: Success
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
        journal_id:
          type: string
          title: Journal Id
        results:
          items:
            $ref: '#/components/schemas/EditResults'
          type: array
          title: Results
        timestamp:
          type: string
          title: Timestamp
      type: object
      required:
        - success
        - journal_id
        - results
      title: EditJournalResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CreateNodeOperation:
      properties:
        type:
          type: string
          const: create_node
          title: Type
        nodeType:
          type: string
          title: Nodetype
        params:
          items: {}
          type: array
          title: Params
        referenceId:
          anyOf:
            - type: string
            - type: 'null'
          title: Referenceid
        position:
          anyOf:
            - type: string
              enum:
                - before
                - after
            - type: 'null'
          title: Position
      type: object
      required:
        - type
        - nodeType
        - params
      title: CreateNodeOperation
    UpdateNodeOperation:
      properties:
        type:
          type: string
          const: update_node
          title: Type
        nodeId:
          type: string
          title: Nodeid
        node:
          $ref: '#/components/schemas/BlockNode-Input'
      type: object
      required:
        - type
        - nodeId
        - node
      title: UpdateNodeOperation
    DeleteNodeOperation:
      properties:
        type:
          type: string
          const: delete_node
          title: Type
        nodeId:
          type: string
          title: Nodeid
      type: object
      required:
        - type
        - nodeId
      title: DeleteNodeOperation
    EditResults:
      properties:
        operation:
          type: string
          enum:
            - create_node
            - update_node
            - delete_node
          title: Operation
        success:
          type: boolean
          title: Success
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        data:
          anyOf:
            - $ref: '#/components/schemas/OperationResultData'
            - type: 'null'
      type: object
      required:
        - operation
        - success
      title: EditResults
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    BlockNode-Input:
      properties:
        type:
          type: string
          title: Type
        attrs:
          anyOf:
            - $ref: '#/components/schemas/BlockAttrs'
            - type: 'null'
        content:
          anyOf:
            - items:
                $ref: '#/components/schemas/BlockNode-Input'
              type: array
            - type: 'null'
          title: Content
        marks:
          anyOf:
            - items:
                $ref: '#/components/schemas/Mark'
              type: array
            - type: 'null'
          title: Marks
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
      additionalProperties: true
      type: object
      required:
        - type
      title: BlockNode
    OperationResultData:
      properties:
        created:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Created
        nodeId:
          anyOf:
            - type: string
            - type: 'null'
          title: Nodeid
        updated:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated
        deleted:
          anyOf:
            - type: string
            - type: 'null'
          title: Deleted
      type: object
      title: OperationResultData
    BlockAttrs:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        level:
          anyOf:
            - type: integer
            - type: 'null'
          title: Level
      additionalProperties: true
      type: object
      title: BlockAttrs
    Mark:
      properties:
        type:
          type: string
          title: Type
        attrs:
          anyOf:
            - $ref: '#/components/schemas/BlockAttrs'
            - type: 'null'
      additionalProperties: true
      type: object
      required:
        - type
      title: Mark
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````