Skip to content
Navigation

Compose a document into a branded PDF

Renders the markdown through a style profile and files the PDF back onto the session as its own artifact, beside the markdown it came from. styleProfileId picks a Brand profile, configId a /v1 compose template; with neither, the org default profile is used, or the platform's plain layout when the org has none. 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.

POST
https://api.cloudraker.com/workspace/sessions/{sessionId}/artifacts/{artifactId}/compose
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

  • styleProfileId
    optional
    string
    maxLength: 128 · minLength: 1
  • configId
    optional
    string
    maxLength: 128 · minLength: 1

Returns

201

The composed PDF 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 Error
JSON
  • success
    false
    required
  • error
    array of
    unknown
    required
  • data
    unknown
    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

compose_target_ambiguous — configId and styleProfileId together; 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