Skip to content
Navigation

Compose a markdown artifact into a PDF

Renders a text/markdown artifact into a PDF and files the PDF back onto the session as a new artifact, on the timeline, beside the markdown it came from.

Pass configId to render through one of your /v1/compose templates — the markdown arrives in the bundle as body.typ, which your template includes. Pass styleProfileId to render through one of your organization's style profiles instead — including the one marked default, which this route never applies on its own. With neither, the platform's own plain layout is used. Naming both answers 422 compose_target_ambiguous.

The source must be text/markdown; anything else answers 422 artifact_not_markdown.

Two rendering changes shipped with style profiles and apply to every call: CriticMarkup review comments and rejected suggestions ({>> … <<}, {-- --}) are stripped instead of printed, and GFM pipe tables render as tables instead of literal pipes.

Learn more: Work sessions

POST
https://api.cloudraker.com/v1/work-sessions/{id}/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

  • id
    string
    required
    maxLength: 128 · minLength: 1
  • artifactId
    string
    required
    maxLength: 256 · minLength: 1

Request body JSON required

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

Returns

201

The composed PDF artifact.

400

Validation Error
JSON
  • success
    false
    required
  • error
    array of
    unknown
    required
  • data
    unknown
    required

401

Missing or invalid credential.

403

The credential may not use the /v1 API.

404

Unknown session, artifact, compose config or style profile.

422

artifact_not_markdown — the source artifact is not markdown; compose_target_ambiguous — both targets were named; template_render_failed — the template did not compile.

429

Rate limited. The /v1 API allows at least 67 requests per minute per organization (about 1,000 requests per 15 minutes) — a guaranteed floor, enforced per edge location, so a geographically spread caller may get more. Wait for the Retry-After interval and retry — the error is retryable.
JSON
  • code
    rate_limited
    required
  • message
    string
    required
  • retryable
    true
    required
  • requestId
    string
    required
  • docUrl
    optional
    string

Type to search…

↑↓ navigate↵ selectEsc close