Skip to content
Navigation

Render a template’s example

Renders the template with one of its saved examples and returns the PDF bytes — the editor's preview button.

example names the example to use; without it the first one is rendered. A template with no examples at all still previews — it renders with empty data {}, which is what a fresh template's static content needs.

A template with no files or no main answers 422 config_incomplete; a name that matches no saved example answers 404 example_not_found.

Learn more: Compose

POST
https://api.cloudraker.com/v1/compose/configs/{idOrSlug}/preview
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

  • idOrSlug
    string
    required
    minLength: 1

Request body JSON required

  • example
    optional
    string
    minLength: 1

Returns

200

The rendered PDF.

400

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

404

Unknown template, or no example by that name (example_not_found).

422

The template has no files or no main (config_incomplete), or it failed to 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