---
title: "Run a saved workflow"
method: POST
path: "/workflows/{id}/run"
---

# Run a saved workflow

`POST /workflows/{id}/run`

## Request

- Base URL: `https://marqpdf.com/v1`
- URL: `https://marqpdf.com/v1/workflows/{id}/run`
- Auth: HTTP bearer

One job; output holds the last step's results and output.steps what each step did. Each step that succeeds counts as one operation.

## Request body

- object
  - `file` string
  - `files` string[]
  - `wait` integer
  - `webhook_url` string, uri

## Response `200`

Finished

- Job
  - `object` 'job', required
  - `id` string, required
  - `operation` string, required
  - `status` 'queued' | 'running' | 'succeeded' | 'failed', required
  - `created_at` string, date-time, required
  - `started_at` string, nullable
  - `finished_at` string, nullable
  - `input` object
    - `files` string[]
    - `options` object
  - `output` object, nullable
    - `files` File[]
      - `object` 'file', required
      - `id` string, required
      - `name` string, required
      - `size` integer, required
      - `content_type` string, required
      - `pages` integer
      - `created_at` string, date-time, required
      - `expires_at` string, date-time, required
      - `source` 'upload' | 'url' | 'job', required
      - `job` string
      - `download_url` string, uri, required: Works without a key for an hour.
    - `text` string
    - `text_truncated` boolean
    - `note` string
    - `data` object: extract: the data
    - `model` string: AI operations: the model that answered
    - `steps` object[]: Workflows and the agent: each step
  - `error` object, nullable
    - `code` string
    - `message` string
  - `webhook_url` string, nullable
  - `webhook` object, nullable

## Other responses

- `202`: Still running
- `400`: Invalid request
- `401`: Missing or invalid API key
- `402`: Free plan's monthly operations used
- `404`: Unknown file or operation
- `410`: File expired (kept 24 hours)
- `429`: Rate limit or job queue full (see Retry-After)

---

[API](https://skmtc.dev/marqpdf/apis/marqpdf-api.md) · [All operations](https://skmtc.dev/marqpdf/apis/marqpdf-api/llms.txt) · [OpenAPI document](https://skmtc.dev/marqpdf/apis/marqpdf-api/revisions/9f614f17df46?raw)
