---
title: "Kick a draft-dashboard PDF export"
method: POST
path: "/dashboards/{dashboard_id}/pdf"
tags: ["Dashboard v3"]
---

# Kick a draft-dashboard PDF export

`POST /dashboards/{dashboard_id}/pdf`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/dashboards/{dashboard_id}/pdf`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-KEY` and API key in header `X-API-SECRET` and API key in header `X-WORKSPACE-ID`

Start an on-demand async export of the editor's current (DRAFT) canvas to a PDF via dash-render. Returns a job_id; poll /jobs/{id} for {stage, progress} then the resolved {bytes, filename, sequence}, and GET /{id}/pdf/{job_id} for the bytes. The canvas version is pinned at submit and the client-hydrated `data` map is stashed server-side (kept off the Celery args — it can be MBs). Async because a synchronous Chromium print can outlive the proxy / client timeouts held on the request. Auth mirrors /data (author or viewer).

## Path parameters

- `dashboard_id` integer, required

## Request body

- PdfExportSpec: PDF export parameters
  - `params` PdfExportParams, required
    - `data` object: The client-hydrated DashboardData (dash-engine's buildDocumentData / buildDashboardData shape). Supplied by the client because the mvc bake persists query descriptors, not hydrated data, and the results→DashboardData hydration is a JS-only dash-engine function — the FE already holds this exact map for the live view and the PDF prints it verbatim (RLS-scoped when fetched).
    - `paper` string, nullable: Paper size: 'a4', 'letter' or 'card_4x5'. Defaults to the canvas' paper_size, then 'a4'. Ignored when `carousel` is set — a carousel owns its own 1080x1350 sheet.
    - `carousel` boolean: Render the board's NARRATIVE as a 1080x1350 card set (one claim per card) instead of printing its layout. A different artifact from the same version record, not a different page size — so it needs no hydrated `data` map: the cards are drawn from the bake's own facts.
    - `compare` object, nullable: The viewer's ephemeral comparison ({dim, subjects}) at export time. Applied as a render-copy override of the active page's compare default so the PDF prints exactly what the viewer sees (WYSIWYG); nothing persists. Omit to print the authored default.

## Response `201`

Document created, URL follows

- ObjectJobSchema
  - `status_code` integer, nullable
  - `job_id` integer, nullable: Created job id
  - `failure_reason` string, nullable: Failure reason if status is failure

## Other responses

- `202`: Successfully Submitted
- `400`: Bad request syntax or unsupported method
- `403`: Request forbidden -- authorization will not help

---

[API](https://skmtc.dev/mammoth/apis/mammoth-analytics.md) · [All operations](https://skmtc.dev/mammoth/apis/mammoth-analytics/llms.txt) · [OpenAPI document](https://skmtc.dev/mammoth/apis/mammoth-analytics/revisions/fe078afe239b?raw)
