---
title: "Render a sample PDF in this style profile"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.cloudraker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Render a sample PDF in this style profile

Path: CloudRaker Workspace API › Style profiles

`POST /style-profiles/{profileId}/sample`

Composes a fixed sample document — heading, prose, a list, a table and a quote — through the profile’s typst template and answers the PDF bytes (`application/pdf`). It is what the Brand page previews. Authorization: any member.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

- `profileId` (`renderStyleProfileSample.path.profileId`; string, required)
  - minLength 1; maxLength 128

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.cloudraker.com/style-profiles/<profileId>/sample' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/style-profiles/<profileId>/sample';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/style-profiles/<profileId>/sample"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.text)
```

## Responses

### 200

The sample PDF.

### 400

Validation Error

#### Example

```json
{
  "success": false,
  "error": [
    null
  ],
  "data": null
}
```

- `success` (`renderStyleProfileSample.response.400.success`; boolean, required)
  - one of `false`
- `error` (`renderStyleProfileSample.response.400.error`; array<unknown>, required)
- `data` (`renderStyleProfileSample.response.400.data`; unknown, required)

### 404

`not_found` — no such style profile in this organization.

#### Example

```json
{
  "error": "string",
  "error_code": "string",
  "issues": [
    {
      "path": "string",
      "code": "string",
      "message": "string"
    }
  ]
}
```

- `error` (`renderStyleProfileSample.response.404.error`; string, required) — The sentence a human reads.
- `error_code` (`renderStyleProfileSample.response.404.error_code`; string, required) — The stable snake_case branch key.
- `issues` (`renderStyleProfileSample.response.404.issues`; array<object>, optional) — Per-field detail, present only on a validation failure.
  - `path` (`renderStyleProfileSample.response.404.issues.path`; string, required)
  - `code` (`renderStyleProfileSample.response.404.issues.code`; string, required)
  - `message` (`renderStyleProfileSample.response.404.issues.message`; string, required)

### 422

`unknown_font_family` — the family is not one the renderer carries (the sentence lists the legal ones); `logo_too_large` / `logo_unavailable` — the logo file is over 2 MiB or has no stored bytes; `template_render_failed` — the profile does not compile, with the typst diagnostic.

#### Example

```json
{
  "error": "string",
  "error_code": "string",
  "issues": [
    {
      "path": "string",
      "code": "string",
      "message": "string"
    }
  ]
}
```

- `error` (`renderStyleProfileSample.response.422.error`; string, required) — The sentence a human reads.
- `error_code` (`renderStyleProfileSample.response.422.error_code`; string, required) — The stable snake_case branch key.
- `issues` (`renderStyleProfileSample.response.422.issues`; array<object>, optional) — Per-field detail, present only on a validation failure.
  - `path` (`renderStyleProfileSample.response.422.issues.path`; string, required)
  - `code` (`renderStyleProfileSample.response.422.issues.code`; string, required)
  - `message` (`renderStyleProfileSample.response.422.issues.message`; string, required)


Source: https://docs.cloudraker.com/workspace/api/style-profiles/render-style-profile-sample/index.md
