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

# Replace Note Document Section Content

> Replace one complete section in Markdown using expectedRevision from the section read. Requires note edit permission.

Required scope: `note_document:write`.




## OpenAPI

````yaml /openapi.yaml put /v1/external/notes/{noteGuid}/documents/{documentId}/sections/{sectionId}/user-content
openapi: 3.1.0
info:
  title: Tiro API
  description: AI-powered note-taking and voice file processing API
  version: 1.0.0
  contact:
    name: Tiro Support
    email: support@tiro.ooo
    url: https://tiro.ooo
servers:
  - url: https://api.tiro.ooo
    description: Production server
security:
  - BearerAuth: []
tags:
  - name: Workspace
    description: >
      List the workspaces an API key can reach. Workspace-scoped endpoints take
      a

      `{workspaceGuid}` path segment; get it from `GET /v1/external/workspaces`.
  - name: Note
    description: Operations for managing notes and their paragraphs
  - name: Note Share Link
    description: Manage share links for notes
  - name: Note Summary
    description: Operations for retrieving note summaries
  - name: Note Document
    description: Template-based document generation from notes
  - name: Note Document Template
    description: Operations for managing note document templates
  - name: Folder
    description: Operations for retrieving folders
  - name: Voice File
    description: Operations for voice file processing
  - name: Realtime Transcription
    description: >
      Create, get, list, and end realtime transcription sessions. Audio and
      results flow over the

      WebSocket at `wsUrl`, documented in [WebSocket
      protocol](/en/developers/realtime-transcription/protocol).

      Available to Enterprise plan customers on request.
  - name: Word Memory
    description: >
      Manage word memories to improve voice transcription accuracy. Register
      important terms like company names, people's names, and product names so
      Tiro recognizes them precisely during recording. Each term has an `entry`
      and an optional `subEntry` (an alternate spelling or notation). Personal
      (User), workspace-shared (Workspace), and organization-shared
      (Organization) word memories are managed separately, and each scope
      supports bulk create/update/delete (up to 1000 items per request).
  - name: Wiki
    description: |
      Access workspace wikis — unified knowledge graphs built from notes.
      Requires a workspace with wiki plan and activation enabled.
  - name: Organization
    description: >
      Endpoints for organization API keys. An organization key is issued by an

      organization admin, carries fixed scopes chosen at issuance, and can reach

      the notes in every workspace that belongs to the organization. Built for

      server-to-server integrations such as CRM sync — receive `note.ended`
      webhook

      events, generate documents for notes, and reconcile with the organization

      notes list.
  - name: Organization Management
    description: Operations for the authenticated user's organization.
paths:
  /v1/external/notes/{noteGuid}/documents/{documentId}/sections/{sectionId}/user-content:
    put:
      tags:
        - Note Document
      summary: Replace Note Document Section Content
      description: >
        Replace one complete section in Markdown using expectedRevision from the
        section read. Requires note edit permission.


        Required scope: `note_document:write`.
      operationId: replaceNoteDocumentSectionContent
      parameters:
        - $ref: '#/components/parameters/NoteGuid'
        - $ref: '#/components/parameters/DocumentId'
        - $ref: '#/components/parameters/DocumentSectionId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContentUpdateRequest'
      responses:
        '200':
          description: Updated edit status and revision
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentEditState'
        '400':
          $ref: '#/components/responses/ContentBadRequest'
        '401':
          $ref: '#/components/responses/ContentUnauthorized'
        '403':
          $ref: '#/components/responses/ContentForbidden'
        '404':
          $ref: '#/components/responses/ContentNotFound'
        '409':
          $ref: '#/components/responses/ContentWriteConflict'
        '413':
          $ref: '#/components/responses/ContentSizeLimit'
components:
  parameters:
    NoteGuid:
      name: noteGuid
      in: path
      required: true
      description: Note GUID from the notes list.
      schema:
        type: string
      example: note-example-7
    DocumentId:
      name: documentId
      in: path
      required: true
      description: Document ID from the document list.
      schema:
        type: integer
        format: int64
      example: 34
    DocumentSectionId:
      name: sectionId
      in: path
      required: true
      description: Section ID from sections[].id in the document detail response.
      schema:
        type: integer
        format: int64
      example: 56
  schemas:
    ContentUpdateRequest:
      type: object
      required:
        - expectedRevision
        - content
      properties:
        expectedRevision:
          $ref: '#/components/schemas/ContentRevision'
        content:
          type: string
          minLength: 1
          description: >-
            Full nonblank replacement in Markdown. Raw HTML, images and embeds
            are unsupported.
          example: Send the draft on Tuesday.
    ContentEditState:
      type: object
      required:
        - edited
        - revision
      properties:
        edited:
          type: boolean
          description: Whether this content has a user edit.
          example: true
        revision:
          $ref: '#/components/schemas/ContentRevision'
    ContentRevision:
      type: string
      description: >-
        Opaque revision of the content being replaced. Copy it unchanged into
        expectedRevision.
      example: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - errorType
            - message
          properties:
            code:
              type: integer
              description: >
                6-digit error code in `AAABBB` form: first 3 digits match the
                HTTP status,

                last 3 digits are a per-status serial (e.g. `404018`). Use only
                when you need

                to distinguish specific error cases within the same HTTP status
                — values may be

                added or renumbered across releases. For general client
                branching, prefer `errorType`.
              example: 404018
            errorType:
              type: string
              description: >
                Stable, coarse-grained error category. Recommended default for
                client-side

                branching: the value-to-status mapping is part of the API
                contract and will not

                change without a breaking-change notice. Typical use:
                  - `unauthorized` → trigger re-authentication
                  - `forbidden` → surface a permission error to the user
                  - `not_found` → treat as missing resource
                  - `too_many_requests` → back off and retry
                  - `internal_error` → retry with exponential backoff
              enum:
                - bad_request
                - unauthorized
                - forbidden
                - not_found
                - not_acceptable
                - conflict
                - payload_too_large
                - unprocessable_entity
                - too_many_requests
                - internal_error
              example: not_found
            message:
              type: string
              description: >-
                Human-readable error message. Not stable; do not use for
                branching.
              example: 'No team found for user #217'
            detail:
              description: >-
                Additional error details. Authorization failures may include a
                reason and required scopes.
              oneOf:
                - type: string
                  nullable: true
                - type: object
                  additionalProperties: true
                  properties:
                    reason:
                      type: string
                      example: insufficient_scope
                    required:
                      type: array
                      items:
                        type: string
                      example:
                        - folder:read
              example: null
  responses:
    ContentBadRequest:
      description: >
        Invalid input (400000). Check the field, identifiers and required
        request parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ContentUnauthorized:
      description: >
        Authentication failed. For a missing key (401001), send the full API key
        as a Bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ContentForbidden:
      description: >
        Insufficient scope (403013) or note permission (403001). Check the
        required scope and access to the note.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ContentNotFound:
      description: >
        The note (404002) or the requested item is unavailable to this key.
        Check the identifiers and the workspace or folder accessible to the key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ContentWriteConflict:
      description: >
        CONTENT_CONFLICT (409035) means the observed state changed. Read the
        current content, show it to the user and confirm before submitting
        again. Never retry automatically with a new token.

        CONTENT_NOT_EDITABLE (409036) means the action is unavailable, for
        example on a locked paragraph, during generation, or when there is no
        edit to undo. Check the target and recovery availability before
        proceeding.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ContentSizeLimit:
      description: >
        The input or its storage representation exceeds the content size limit
        (413001). Shorten the replacement text.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >
        API key in format `{id}.{secret}`.


        The notes an endpoint returns depend on the key type. A **user key**
        reaches the

        notes that user can see in the app, including notes in their own private
        folders.

        A **system key** (workspace or organization, no user identity) reaches
        only notes

        that sit in a folder shared with all workspace members. Notes in a
        private folder,

        in a folder shared with only some members, or in no folder at all fall
        outside a

        system key's read scope, and scopes do not widen that boundary.


        List and search endpoints drop out-of-scope notes from the response
        without an

        error. Single-note reads and their sub-resources return `404`, the same
        response

        as a deleted note. See [What notes a system key
        reads](https://docs.tiro.ooo/en/developers/fundamentals/system-key-note-scope).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.