Contents

Save a person's paragraph edits as their own tracked changes (Suggesting mode)

The review pane sends each paragraph the person changed: its visible text as they saw it and as they left it. The API names the change from the acting user's record (the Settings display name, or the email when that is empty or equal to it) and never from the request body; a name that starts with "Scaffold Assistant" is refused. The engine writes the word-level difference as w:del/w:ins under that name, withdraws and re-applies the person's own pending changes in the paragraph, and refuses a paragraph holding anyone else's pending change. The document is saved in place (same id and version), guarded by expected_content_sha256. At most 20 changes and 20,000 characters per text.

POST /documents/{documentId}/suggestions

Path parameters

  • documentId string Required

Headers

  • Authorization string Required

    Bearer <session token>: the signed-in user’s Scaffold session token.

  • x-org-id string Required

Body

  • expected_content_sha256 string Required
  • changes object[] Required
    Show 5 fields
    • kind string Required

      One of replace insert_after delete

    • block_index integer Required

      Every w:p in body order, table-cell paragraphs included and text-box paragraphs excluded. Changes apply in order; an insert_after shifts later indexes by one.

    • before_text string Required
    • after_text string

      Required for replace and insert_after.

    • justification string

      Optional: why the person made this change. Trimmed, with runs of whitespace collapsed to one space; empty after that means none, and more than 280 characters after that is DOCUMENT_SUGGESTION_INVALID. Every tracked change this item writes carries it, and it comes back as the revision's and the Track entry's justification. Re-editing your own suggestion without one keeps the reason it had. Shown as plain text.