Skip to content
Navigation

Save a markdown document

Writes new bytes and bumps the SAME artifact to the next version — /documents/:id keeps its address — and puts one artifact entry on the timeline carrying summary. Send baseVersion — the version you edited — and a save that would overwrite a newer one answers 409 document_version_conflict instead. Without a summary the platform generates +N/−M lines from the diff. Authorization: the same gate as every session route — work_session:read (or comment to write) on the session, OR space:contribute on one of its linked spaces; a desk session only for its owner. Any denial is 404.

PUT
https://api.cloudraker.com/workspace/sessions/{sessionId}/artifacts/{artifactId}/content
Try it
Path parameters
Request body
Live API request

This request can change data or incur charges for the selected organization.

Authorization

  • bearerAuth
    HTTP
    required

Path parameters

  • sessionId
    string
    required
  • artifactId
    string
    required

Request body JSON required

  • markdown
    string
    required
    maxLength: 1000000
  • editorState
    optional

    Any of the following:

    • string
    • null
  • summary
    optional
    string
    maxLength: 1000
  • baseVersion
    optional
    integer
    maximum: 9007199254740991 · minimum: 0

Returns

200

The new version of the artifact.

JSON
  • data
    object
    required
    • id
      string
      required
    • sessionId
      string
      required
      maxLength: 128 · minLength: 1
    • fileId
      string
      required
    • version
      integer
      required
      maximum: 9007199254740991 · minimum: -9007199254740991
    • name
      string
      required
    • mime
      string
      required
    • state
      draft
      or
      committed
      required
    • producedByTurn
      string | null
      required
    • committedTo
      required

      Any of the following:

      • object
        • spaceId
          string
          required
        • fileId
          string
          required
        • at
          string
          required
          format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
        • by
          string
          required
      • null

400

validation_failed — a malformed body.
JSON
  • error
    string
    required

    The sentence a human reads.

  • error_code
    string
    required

    The stable snake_case branch key.

  • issues
    optional
    array of
    object

    Per-field detail, present only on a validation failure.

    • path
      string
      required
    • code
      string
      required
    • message
      string
      required

404

No such session or artifact, or the caller may not see it.
JSON
  • error
    string
    required

    The sentence a human reads.

  • error_code
    string
    required

    The stable snake_case branch key.

  • issues
    optional
    array of
    object

    Per-field detail, present only on a validation failure.

    • path
      string
      required
    • code
      string
      required
    • message
      string
      required

409

artifact_not_ready — the bytes are not stored or parsed yet (retryable); document_version_conflict — a save whose baseVersion is behind the current version.
JSON
  • error
    string
    required

    The sentence a human reads.

  • error_code
    string
    required

    The stable snake_case branch key.

  • issues
    optional
    array of
    object

    Per-field detail, present only on a validation failure.

    • path
      string
      required
    • code
      string
      required
    • message
      string
      required

422

artifact_not_markdown — the artifact is not a document.
JSON
  • error
    string
    required

    The sentence a human reads.

  • error_code
    string
    required

    The stable snake_case branch key.

  • issues
    optional
    array of
    object

    Per-field detail, present only on a validation failure.

    • path
      string
      required
    • code
      string
      required
    • message
      string
      required

Type to search…

↑↓ navigate↵ selectEsc close