---
title: "API reference"
description: "REST endpoints for printers, print jobs, queues, history, materials, sites, and user provisioning, with authentication and request examples."
url: https://pluraprint.com/docs/reference/api
---
# API reference

REST endpoints for printers, print jobs, queues, history, materials, sites, and user provisioning, with authentication and request examples.

Use the REST API to build reporting dashboards and provision users. All paths below are relative to your deployment’s **`/api/rest`** base URL, for example `https://print.example.com/api/rest`. Send and receive JSON; requests with a body need `Content-Type: application/json`. JSON request bodies are limited to **1 MiB**; file uploads use the separate slicer interface.

Jump to Printers, Jobs, Queue and history, Materials, Sites, Users and roles, or Automations and deliveries. Recent response changes are listed under API changes.

| Endpoint | Required capability |
| --- | --- |
| `GET /` | Any valid key |
| `GET /printers` | `printers:read` |
| `GET /printers/:id` | `printers:read` |
| `GET /jobs` | `jobs:read` |
| `GET /jobs/:id` | `jobs:read` |
| `GET /jobs/:id/events` | `jobs:read` |
| `GET /queue/jobs` | `jobs:read` |
| `GET /history` | `jobs:read` |
| `GET /queue/estimation` | `queue:read` |
| `GET /queue/estimation/summary` | `queue:read` |
| `GET /materials` | `materials:read` |
| `GET /materials/:id` | `materials:read` |
| `GET /materials/types` | `materials:read` |
| `GET /materials/brands` | `materials:read` |
| `GET /materials/colors` | `materials:read` |
| `GET /sites` | `sites:read` |
| `GET /sites/:id` | `sites:read` |
| `GET /users` | `users:read` |
| `GET /users/:id` | `users:read` |
| `POST /users` | `users:write`\* |
| `PUT /users/:id` | `users:write`\* |
| `POST /users/bulk` | `users:write`\* |
| `PUT /users/bulk` | `users:write`\* |
| `POST /users/:id/roles` | `users:write`, `roles:write` |
| `DELETE /users/:id/roles` | `users:write`, `roles:write` |
| `POST /users/bulk/roles` | `users:write`, `roles:write` |
| `PUT /users/:id/id-number` | `users:write` |
| `GET /workflows` | `workflows:read` |
| `GET /workflows/:id` | `workflows:read` |
| `GET /workflows/:id/runs` | `workflows:read` |
| `GET /workflow-runs/:id` | `workflows:read` |
| `GET /workflows/explain` | `workflows:read` |
| `GET /workflows/export` | `workflows:read` |
| `POST /workflows/:id/validate` | `workflows:read` |
| `POST /workflows` | `workflows:write` |
| `PUT /workflows/:id/draft` | `workflows:write` |
| `POST /workflows/import` | `workflows:write` |
| `POST /workflows/:id/runs` | `workflows:run` |
| `GET /deliveries` | `deliveries:read` |
| `GET /deliveries/:id` | `deliveries:read` |

\*Including `roles` in a user create/update request also requires `roles:write`, even for an empty array or one item in a bulk request.

## Authentication and access

Create a key in **Admin → API keys** with the access your integration needs. See [API Keys](https://pluraprint.com/docs/account/api-keys) for profiles, expiration, and rotation. Every endpoint on this page requires a valid key. Send it over HTTPS in either header:

```http
Authorization: Bearer <key>
```

```http
X-API-Key: <key>
```

The examples use `PLURAPRINT_API_KEY` supplied by your secrets store or shell environment. Replace the example hostname with your deployment’s hostname:

```bash
curl --fail-with-body \
  --header "Authorization: Bearer $PLURAPRINT_API_KEY" \
  'https://print.example.com/api/rest/printers?limit=25&isEnabled=true'
```

A key’s capabilities apply across the deployment. `siteId` filters results by physical location; it does not limit what the key is authorized to read. Job access includes job names and owner IDs. Responses omit printer connection secrets, storage URLs, and raw telemetry. REST responses use `Cache-Control: no-store`.

| Capability | Allows |
| --- | --- |
| `printers:read` | Printer lists and details, including loaded materials |
| `jobs:read` | Job lists, details, lifecycle events, queue contents, and history |
| `queue:read` | Queue completion estimates |
| `materials:read` | Material variants, types, brands, and colors |
| `sites:read` | Site lists and details |
| `users:read` | User lists and details |
| `users:write` | Create/update users and assign or clear an ID number |
| `roles:write` | Role changes, together with `users:write` |
| `workflows:read` | Automations, versions, runs with traces, send explanations and exports |
| `workflows:write` | Create and edit automation drafts and import automations as drafts; never publishes |
| `workflows:run` | Start manual automations |
| `deliveries:read` | The delivery log, with recipients redacted |

The **Fleet reporting** profile includes all five reporting capabilities. **Queue reporting** includes estimates only; use **Read jobs and history** for queue contents.

### Discover endpoints

**`GET /`** · Any valid API key

Returns `name`, `version`, `status`, the `endpoints` directory, and `authentication`. The directory lists available routes, including routes the key may not have permission to call. Use the capability requirement documented for each endpoint.

## Request and response conventions

Resource IDs for printers, jobs, materials, and sites are decimal integers from **1 to 2,147,483,647**. User IDs are UUIDs. Response timestamps use ISO 8601. Nullable fields return `null` when the value is unavailable or unassigned.

### Pagination and search

Printer, job, event, material, and site lists accept these pagination parameters:

| Parameter | Default | Accepted value |
| --- | --- | --- |
| `limit` | `50` | Integer from `1` to `100` |
| `offset` | `0` | Integer from `0` to `1000000` |
| `search` | Omitted | Up to `100` characters after trimming; unavailable on job events |

Numeric values must be decimal integers. Boolean filters accept only `true` or `false`. Unknown query parameters and invalid values return **400**. A list responds with its named collection, matching `total`, and pagination metadata. For example, an empty printer list:

```json
{
  "printers": [],
  "total": 0,
  "limit": 50,
  "offset": 0,
  "hasMore": false
}
```

For the next page, increase `offset` by `limit`. Stop when `hasMore` is `false`. Each request reads the current data; jobs entering or leaving the queue can change later pages. User lists retain their separate pagination defaults and response shape.

### Errors and retries

| HTTP status | Meaning | Action |
| --- | --- | --- |
| `400` | Invalid parameters, malformed body, or unknown role name | Correct the request |
| `401` | Missing, invalid, expired, revoked, or legacy key | Replace the key or fix the header |
| `403` | Missing capability, or ID number identification unavailable | Check key access and deployment configuration |
| `404` | Resource does not exist | Check the ID |
| `409` | Username, email, or ID number already assigned | Resolve the conflict |
| `413` | JSON request body exceeds 1 MiB | Reduce the request size |
| `415` | Unsupported request content type | Send `Content-Type: application/json` |
| `429` | Rate limit exceeded | Wait for `Retry-After`, then retry with backoff |
| `500` | Server could not complete the request | Retry reads with bounded backoff; investigate repeated failures |

Errors include an `error` string; authentication and capability errors also include a `message`. For example, an invalid reporting query returns:

```json
{ "error": "Invalid query parameters" }
```

The API’s shared rate limit is **300 requests per minute per IP address**. Integrations behind the same network address share that budget. After an uncertain write result, read the affected user before retrying. Bulk endpoints can return **207** with successful and failed items; check every result as described under Bulk results.

## Printers

Both endpoints require **`printers:read`**.

### List printers

**`GET /printers`**

Accepts pagination and search, plus:

| Parameter | Filter |
| --- | --- |
| `siteId` | Exact site ID |
| `status` | `offline`, `idle`, `ready`, `dispatching`, `printing`, `paused`, or `done` |
| `model` | Exact catalog model identifier, such as `BAMBU_LAB_P1S`; unknown identifiers return **400** |
| `isEnabled` | `true` or `false` |

Search matches printer names and model identifiers without case sensitivity. Results sort by printer `index`, then ID. Returns `{printers, total, limit, offset, hasMore}`.

### Get a printer

**`GET /printers/:id`**

Returns a printer object, or **404** if it does not exist. No query parameters.

#### Printer object

List and detail responses use the same fields:

| Field | Type and meaning |
| --- | --- |
| `id`, `index`, `name` | Resource ID, display-order integer, and printer name |
| `notes` | String or `null` |
| `model`, `status`, `siteId` | Model identifier, printer status, and site ID |
| `isEnabled` | Whether the printer is enabled |
| `isDown` | Whether a current downtime record exists, including pending downtime |
| `currentPrintJobId` | Current job ID, or `null` |
| `progress` | Current job percentage (`0`–`100`), or `null` without a current job |
| `timeRemaining` | Current job’s remaining seconds, or `null` without a current job |
| `lastSeenAt` | Last report timestamp, or `null` |
| `materials` | Materials loaded in the printer’s equipment, ordered by extruder and slot |
| `createdAt`, `updatedAt` | Record timestamps |

Each loaded material has `extruder`, `slot`, `material`, `externalKeys`, and `identifiers`. `extruder` is the printer’s tool, numbered from 0. `slot` numbers the places that feed that tool from 0: a resin tank comes first, then each attached unit’s positions in order, such as an AMS’s four slots. A Bambu Lab external spool is listed only when no AMS feeds that tool.

`material` is a reference to the material variant: `id`, `name`, `type: {id, name}`, `brand: {id, name}`, nullable `color: {id, name, value}`, and `product: {id, name, displayName, traits}`. `externalKeys` lists the printer vendor’s material codes for that material at the printer’s site, such as a Formlabs resin code; it is empty when no such [material identifier](https://pluraprint.com/docs/materials/identifiers) exists. `identifiers` lists every identifier of the variant and its product visible at the printer’s site, as `{namespace, value}` pairs. Loaded materials may be set by hand or synchronized from the printer; they describe the recorded equipment, not a guarantee of what is physically installed.

`connection` is how Pluraprint reaches the printer: `bambu_lan` (Bambu Lab LAN mode), `prusalink`, `formlabs` (a site’s Formlabs connection), or `simulated` for a printer of that model played by the agent’s simulator. More connections may be added; treat unknown values as opaque. `transport` is the older form of the same fact: `simulated` for a simulated printer, otherwise `device`.

For example, `GET /printers/1` for a printer with one AMS slot loaded might return:

```json
{
  "id": 1,
  "index": 0,
  "name": "Workshop P1S",
  "notes": null,
  "model": "BAMBU_LAB_P1S",
  "connection": "bambu_lan",
  "transport": "device",
  "status": "idle",
  "siteId": 1,
  "isEnabled": true,
  "isDown": false,
  "progress": null,
  "timeRemaining": null,
  "currentPrintJobId": null,
  "lastSeenAt": "2026-10-14T12:00:00.000Z",
  "materials": [
    {
      "slot": 0,
      "extruder": 0,
      "material": {
        "id": 12,
        "name": "Bambu Lab PLA Basic Jade White",
        "type": { "id": 1, "name": "PLA" },
        "brand": { "id": 1, "name": "Bambu Lab" },
        "color": { "id": 5, "name": "Jade White", "value": "#FFFFFF" },
        "product": {
          "id": 3,
          "name": "PLA Basic",
          "displayName": "Bambu Lab PLA Basic",
          "traits": []
        }
      },
      "externalKeys": [],
      "identifiers": [
        { "namespace": "bambu.filament_id", "value": "GFA00" },
        { "namespace": "ofd.material", "value": "7aaea8e5-c6c2-4858-87b3-7d2c64aa9bdd" },
        { "namespace": "ofd.variant", "value": "f8a4db8c-1541-49ae-a3e3-b7ca44f94f3e" },
        { "namespace": "openprinttag.material", "value": "2159462c-cd53-57c1-91c0-e71d7ff37f79" },
        { "namespace": "spoolmandb.filament", "value": "bambulab_pla_jadewhite_1000_175_n" }
      ]
    }
  ],
  "createdAt": "2026-10-01T12:00:00.000Z",
  "updatedAt": "2026-10-14T12:00:00.000Z"
}
```

## Jobs

All three endpoints require **`jobs:read`**.

### List jobs

**`GET /jobs`**

Lists jobs across all lifecycle states, newest creation first. Accepts pagination and search, plus the filters below. Search matches job names, without case sensitivity.

| Parameter | Filter |
| --- | --- |
| `siteId` | Exact job site ID; excludes jobs without an assigned site |
| `printerId` | Recorded printer assignment, current printer, or printer with an unresolved dispatch attempt |
| `userId` | Job owner UUID |
| `status` | One job status |
| `printerModel` | Catalog model identifier, such as `BAMBU_LAB_P1S`; matches jobs prepared for that model. Unknown identifiers return **400** |
| `runsOn` | Catalog model identifier; matches jobs that can run on that model, whether prepared for it or holding a file for it that may run now (see `alsoRunsOn`). Unknown identifiers return **400** |
| `createdAfter` | Job created at or after this ISO 8601 timestamp |
| `createdBefore` | Job created before this ISO 8601 timestamp |

Timestamps must include `Z` or a timezone offset. The lower bound is inclusive and the upper bound is exclusive. `createdBefore` must be later than `createdAfter` when both are supplied; equal or reversed bounds return **400**. These filters describe job creation time, including when used on history; they do not filter completion time.

```bash
curl --fail-with-body --get \
  --header "Authorization: Bearer $PLURAPRINT_API_KEY" \
  --data-urlencode 'createdAfter=2026-10-01T00:00:00Z' \
  --data-urlencode 'createdBefore=2026-11-01T00:00:00Z' \
  --data-urlencode 'siteId=1' \
  'https://print.example.com/api/rest/jobs'
```

Returns `{jobs, total, limit, offset, hasMore}`. Creation time ties are resolved by job ID.

### Get a job

**`GET /jobs/:id`**

Returns a job object, or **404** if it does not exist. No query parameters.

#### Job object

Job lists, details, queue contents, and history use the same fields:

| Field | Type and meaning |
| --- | --- |
| `id`, `name`, `status` | Job ID, name, and lifecycle status |
| `siteId`, `userId` | Site ID and owner UUID; each may be `null` |
| `printerModel` | The one printer model the job is prepared for, or `null` when none is chosen yet or the job accepts several models |
| `printerId`, `currentPrinterId` | Recorded printer assignment and current printer ID; each may be `null` |
| `dispatchAttemptPrinterId`, `hasUnresolvedDispatch` | Printer ID for an unresolved dispatch attempt (`null` if none), and whether such an attempt exists |
| `progress`, `timeRemaining` | Stored progress percentage (`0`–`100`) and remaining seconds |
| `priority`, `deadline` | Integer priority and optional deadline timestamp (`null` when unset) |
| `isReprint` | Whether this job was created as a reprint |
| `approvedAt` | Approval timestamp, or `null` |
| `estimatedDurationSeconds` | Prepared file’s estimated print duration, or `null` when unknown |
| `quantities` | Prepared file’s material estimates with explicit units, or `null` when unknown |
| `slices` | The job’s files per printer model when it has more than one, the prepared file first; an empty array otherwise (see below) |
| `alsoRunsOn` | Other printer models the job may run on now, as catalog identifiers; empty when none |
| `ranOn` | `{printerModel, fileConfirmed}` for the printer model that ran the job, or `null` before it starts. `fileConfirmed` is `false` when a start was seen but which file ran is not known |
| `materialRequirements` | Array of required materials, ordered by extruder and material index |
| `createdAt`, `updatedAt` | Record timestamps |

Stored progress and remaining time may be zero before printing; use `status` to determine the job’s lifecycle state. When `hasUnresolvedDispatch` is `true`, printing may already have started without confirmation. Do not infer failure or submit a duplicate job from missing confirmation.

Each material requirement is one material the file uses, once its type is known; materials still waiting for a type are omitted. A requirement contains `index`, `extruder` (the tool it prints from), `type: {id, name}`, and these nullable fields:

| Field | Requires |
| --- | --- |
| `brand` | `{id, name}`: a material from this brand |
| `product` | `{id, name}`: this one product, such as a specific resin |
| `color` | `{id, name, value}`: this exact color |
| `colorFamily` | Any color in this family, such as `black` (see colors) |

`null` leaves that attribute open. Other requirements, such as material traits or the filament settings the file was sliced with, are not listed here but still decide which printers can run the job.

For [interchangeable models](https://pluraprint.com/docs/printers/interchangeable-models), `printerModel` stays the prepared model. Each `slices` entry has `printerModel`, `role` (`primary` for the prepared file, `alternate` for another model’s), `status`, `reasonCode` and `reason` (a sentence; `null` when there is none), `stationReason` and `stationDetail` (why Pluraprint Desktop didn’t prepare the file, when it says), `estimatedDurationSeconds` and `estimatedGrams`. Only alternates with status `eligible` may run, and they are listed in `alsoRunsOn`; `ready` and `held` files can run only after approval or a confirm.

`quantities` contains `version: 1`, `total`, and `perMaterial`. Quantity objects can contain `massG` (grams), `volumeMl` (milliliters), and `lengthMm` (millimeters). Missing values mean unknown, not zero. `perMaterial` also includes each material’s `index`. Optional `derived` arrays name quantities calculated from another unit. For example:

```json
{
  "version": 1,
  "total": { "massG": 24.5 },
  "perMaterial": [{ "index": 0, "massG": 24.5 }]
}
```

A job response can look like this; IDs and names here are illustrative:

```json
{
  "id": 42,
  "name": "Mounting bracket",
  "status": "printing",
  "siteId": 1,
  "userId": "550e8400-e29b-41d4-a716-446655440000",
  "printerModel": "BAMBU_LAB_P1S",
  "printerId": 1,
  "currentPrinterId": 1,
  "dispatchAttemptPrinterId": null,
  "hasUnresolvedDispatch": false,
  "progress": 40,
  "timeRemaining": 900,
  "priority": 0,
  "deadline": null,
  "isReprint": false,
  "approvedAt": "2026-10-14T11:40:00.000Z",
  "estimatedDurationSeconds": 1500,
  "quantities": {
    "version": 1,
    "total": { "massG": 24.5 },
    "perMaterial": [{ "index": 0, "massG": 24.5 }]
  },
  "slices": [],
  "alsoRunsOn": [],
  "ranOn": null,
  "materialRequirements": [
    {
      "index": 0,
      "extruder": 0,
      "type": { "id": 1, "name": "PLA" },
      "brand": null,
      "product": null,
      "color": null,
      "colorFamily": "black"
    }
  ],
  "createdAt": "2026-10-14T11:30:00.000Z",
  "updatedAt": "2026-10-14T12:00:00.000Z"
}
```

### Get job events

**`GET /jobs/:id/events`**

Returns the job’s lifecycle event records as `{events, total, limit, offset, hasMore}`. Accepts `limit` and `offset`; no search or job filters. Events sort oldest first, then by ID. A missing job returns **404**; an existing job with no events returns an empty list. Each event contains `id`, `printJobId`, `type`, nullable `userId`, and `createdAt`. Raw event details and user profiles are excluded.

Event types are `uploaded`, `processing`, `awaiting_approval`, `approved`, `rejected`, `queued`, `dispatching`, `started`, `progress`, `completed`, `failed`, `cancelled`, `reprinted`, `prioritized`, `deprioritized`, and `revision_requested`. Event types and job statuses describe different things; for example, the `started` event accompanies printing.

### Job statuses

| Group | Status values |
| --- | --- |
| Intake and preparation | `uploaded`, `draft`, `pending_file`, `processing`, `pending_definition`, `awaiting_approval` |
| Waiting and active | `queued`, `dispatching`, `printing`, `paused` |
| Terminal | `completed`, `failed`, `rejected`, `cancelled`, `expired` |

`uploaded` is a legacy intake state. See [Submitting a print job](https://pluraprint.com/docs/print-jobs/submitting-a-print-job) for the preparation and approval process.

## Queue and history

### List queue jobs

**`GET /queue/jobs`** · **`jobs:read`**

Lists every nonterminal job, including intake and preparation. Accepts the same pagination and job filters as `/jobs`, but `status` must be nonterminal; a terminal status returns **400**. Returns `{jobs, total, limit, offset, hasMore}` with the same job shape as `/jobs`.

Results place active jobs first, then queued jobs by priority and first-in-first-out order, then intake and preparation jobs. This is a listing order; it does not promise dispatch order or a per-job start time. Printer compatibility and policies still determine dispatch. Any wait estimate is best-effort and changes as jobs are added, prioritized, or fail.

### List history

**`GET /history`** · **`jobs:read`**

Lists `completed`, `failed`, `rejected`, `cancelled`, and `expired` jobs, newest creation first. Accepts the same pagination and job filters as `/jobs`, but `status` must be terminal; a nonterminal status returns **400**. Returns `{jobs, total, limit, offset, hasMore}`. Each row is a job, rather than an individual print attempt or event.

### Estimate queue completion

**`GET /queue/estimation`** · **`queue:read`**

Returns the estimated time to finish queued and active work across the deployment. The only query parameter is `refresh`, a boolean retained for compatibility. Every read validates the database revision; identical readers share a calculation for at most five seconds. `true` does not bypass that sharing. Other values return **400**.

| Response field | Meaning |
| --- | --- |
| `totalSeconds`, `formattedTime` | Estimated remaining completion horizon, in seconds and a display string |
| `hasAssumptions` | Recovery, setup, prepared capacity, or typical job durations were assumed |
| `hasUnknownWait` | Deprecated; always `false`, because completion forecasts always provide a horizon |
| `queuedJobCount`, `activeJobCount`, `totalJobCount` | Queued, active, and combined counts |
| `activePrinterCount` | Enabled, in-service printers currently reachable |
| `calculatedAt` | Calculation timestamp |
| `breakdown` | Per-model estimates and counts |
| `printingJobCount` | Deprecated alias for `activeJobCount` |

Each `breakdown` row includes `printerModel`, `totalSeconds`, `formattedTime`, `hasAssumptions`, `hasUnknownWait`, `queuedJobCount`, `activeJobCount`, `totalJobCount`, `printerCount`, and `averageTimePerJob` (rounded seconds). `jobCount` is a deprecated alias for `totalJobCount`. Active work includes dispatching, printing, and paused jobs. Estimates are best-effort: they depend on compatible printers, availability, materials, and policy, and change as jobs are added, prioritized, or fail. They are not guaranteed finish times. Each wait for an operator to clear a printer is learned from the site’s last eight weeks of history for the UTC hour of the week the print finishes, so work finishing outside staffed hours waits accordingly. See [How wait estimates work](https://pluraprint.com/docs/print-jobs/approvals#how-wait-estimates-work). Offline or held printers are assumed to recover after a typical operator visit. Unplaced work assumes setup or reservation release; if no matching capacity exists, the forecast assumes one prepared printer per site and model. Unknown durations use the queue median, or one hour without known durations. Work without a selected model remains in the total but has no model breakdown row. These assumptions do not authorize dispatch or clear a printer’s operational hold.

### Get an estimate summary

**`GET /queue/estimation/summary`** · **`queue:read`**

Returns `totalSeconds`, `formattedTime`, `hasAssumptions`, and the deprecated `hasUnknownWait`, using the shared completion forecast. No query parameters. For an empty queue with no uncertain work:

```json
{ "totalSeconds": 0, "formattedTime": "0m", "hasAssumptions": false, "hasUnknownWait": false }
```

## Materials

All five endpoints require **`materials:read`**. Materials are the configured catalog of filaments and resins. These endpoints do not report remaining spool mass or resin volume. Name searches are case-insensitive; matching tags and alternate names uses exact values.

### List material variants

**`GET /materials`**

Accepts pagination and search, plus optional `form=filament` or `form=resin`. A variant is one color of a brand’s product, so it combines a type, brand, product, and optional color. Search matches product, type, brand, and color names, vendor color names, type alternate names, and the tags of the variant, type, brand, and color. Each field is matched separately, so search for `PLA Basic` or `Jade White` rather than a whole variant name. Results sort by brand name, product name, vendor color name, and color name, then ID. Archived variants are not listed but can still be fetched by ID. Returns `{materials, total, limit, offset, hasMore}`.

### Get a material variant

**`GET /materials/:id`**

Returns a material variant object, or **404** if it does not exist. No query parameters.

#### Material variant object

| Field | Contents |
| --- | --- |
| `id`, `tags` | Variant ID and tags |
| `name` | Display name: brand, product, and color, such as `Bambu Lab PLA Basic Jade White` |
| `type` | The product’s material type, with all its fields |
| `brand` | `id`, `name` |
| `color` | `id`, `name`, `value` (hex), and `family` of the palette color, or `null` |
| `product` | `id`, `name`, `displayName`, and `traits` of the brand’s product |
| `vendorColorName` | The vendor’s own color name, or `null` |
| `identifiers` | Deployment-wide identifiers of the variant and its product, as `{namespace, value}` pairs sorted by namespace |
| `createdAt`, `updatedAt` | Record timestamps |

`name` uses the vendor color name when there is one, else the palette color’s name. A product sold in a single color, such as a Formlabs resin, is named without a color. `product.name` is the name within the brand (`PLA Basic`); `displayName` adds the brand. `traits` are the product’s material traits, such as `finish.matte` or `fill.carbon_fiber`. Site-specific identifiers are listed on each printer’s loaded materials instead.

An example `GET /materials/12` response:

```json
{
  "id": 12,
  "name": "Bambu Lab PLA Basic Jade White",
  "tags": [],
  "type": {
    "id": 1,
    "name": "PLA",
    "form": "filament",
    "alternateNames": ["Polylactic acid", "PLA+", "PLA Plus"],
    "tags": [],
    "key": "pla",
    "process": "material_extrusion",
    "createdAt": "2026-10-01T12:00:00.000Z",
    "updatedAt": "2026-10-01T12:00:00.000Z"
  },
  "brand": { "id": 1, "name": "Bambu Lab" },
  "color": { "id": 5, "name": "Jade White", "value": "#FFFFFF", "family": "white" },
  "product": {
    "id": 3,
    "name": "PLA Basic",
    "displayName": "Bambu Lab PLA Basic",
    "traits": []
  },
  "vendorColorName": "Jade White",
  "identifiers": [
    { "namespace": "bambu.filament_id", "value": "GFA00" },
    { "namespace": "ofd.material", "value": "7aaea8e5-c6c2-4858-87b3-7d2c64aa9bdd" },
    { "namespace": "ofd.variant", "value": "f8a4db8c-1541-49ae-a3e3-b7ca44f94f3e" },
    { "namespace": "openprinttag.material", "value": "2159462c-cd53-57c1-91c0-e71d7ff37f79" },
    { "namespace": "spoolmandb.filament", "value": "bambulab_pla_jadewhite_1000_175_n" }
  ],
  "createdAt": "2026-10-01T12:00:00.000Z",
  "updatedAt": "2026-10-01T12:00:00.000Z"
}
```

### List material types

**`GET /materials/types`**

Accepts pagination and search, plus optional `form=filament` or `form=resin`. Search covers names, alternate names, and tags. Results sort by name, then ID. Returns `{types, total, limit, offset, hasMore}`. Each type contains `id`, `name`, `form`, `alternateNames`, `tags`, `key`, `process`, `createdAt`, and `updatedAt`.

`key` is a stable identifier, such as `pla` or `standard`, that does not change when a type is renamed. `process` is `material_extrusion` or `vat_photopolymerization`. `form` is `filament` for material extrusion and `resin` for vat photopolymerization; it is kept for existing integrations. A resin’s type is its resin class, such as `Standard` or `Tough`; the resin itself is the variant’s `product`.

### List material brands

**`GET /materials/brands`**

Accepts pagination and search; search covers names and tags. Results sort by name, then ID. Returns `{brands, total, limit, offset, hasMore}`. Each brand contains `id`, `name`, `tags`, `createdAt`, and `updatedAt`.

### List material colors

**`GET /materials/colors`**

Accepts pagination and search; search covers names and tags. Results sort by name, then ID. Returns `{colors, total, limit, offset, hasMore}`. Each color contains `id`, `name`, `value` (hex, such as `#FFFFFF`), `family`, `tags`, `createdAt`, and `updatedAt`. `family` is one of `white`, `black`, `grey`, `silver`, `gold`, `red`, `orange`, `yellow`, `green`, `blue`, `purple`, `pink`, `brown`, `beige`, `natural`, `clear`, `multicolor`, or `other`.

## Sites

Both endpoints require **`sites:read`**. Sites group printers and agents by location or network; access remains deployment-wide.

### List sites

**`GET /sites`**

Accepts pagination and search; search matches site names without case sensitivity. Results sort by name, then ID. Returns `{sites, total, limit, offset, hasMore}`.

### Get a site

**`GET /sites/:id`**

Returns a site object, or **404** if it does not exist. No query parameters. Site objects contain `id`, `name`, `description`, nullable `disabledAt`, `createdAt`, and `updatedAt`. Disabled sites remain in the list. An example site response:

```json
{
  "id": 1,
  "name": "Main lab",
  "description": "Printers in the main lab",
  "disabledAt": null,
  "createdAt": "2026-10-01T12:00:00.000Z",
  "updatedAt": "2026-10-01T12:00:00.000Z"
}
```

## Users and roles

User responses contain `id`, `username`, `displayName`, nullable `email`, `roles` (role names), `createdAt`, and `updatedAt`. User IDs are UUIDs; role inputs use existing role names, including capitalization. Unknown role names return **400**.

Usernames, display names, and role names must be nonblank strings of at most **255** characters. Email inputs must be valid email strings of at most **255** characters. Each role array accepts at most **100** names. Invalid IDs, wrong field types, null bodies, and unknown body or query fields return **400** before any user changes. REST user updates accept only the fields listed below; `status` is not a REST update field.

### List users

**`GET /users`** · **`users:read`**

Accepts integer `limit` from **1–1000** (default **100**), integer `offset` from **0–1,000,000** (default **0**), and optional `search` of at most **100** characters. Malformed pagination returns **400**. Search matches display names, usernames, and email addresses without case sensitivity. Results sort by display name. Returns `{users, total, limit, offset}`. This endpoint does not include `hasMore`; compare `offset + users.length` with `total`.

### Get a user

**`GET /users/:id`** · **`users:read`**

Returns a user object, or **404** if it does not exist.

### Create a user

**`POST /users`** · **`users:write`**, plus **`roles:write`** when `roles` is present

Required body fields: `username`, `displayName`, `email`. Optional: `roles` (array of existing role names). Returns **201** with the created user. An existing username or email returns **409**. Creating a user does not set a password.

```json
{
  "username": "alex",
  "displayName": "Alex Morgan",
  "email": "alex@example.com"
}
```

### Update a user

**`PUT /users/:id`** · **`users:write`**, plus **`roles:write`** when `roles` is present

The body accepts `username`, `displayName`, `email`, and `roles`; all fields are optional. Omitted fields retain their values. `roles` replaces all role assignments; `[]` removes all roles. Returns **200** with the updated user, **404** for a missing user, or **409** for a username or email conflict.

```json
{ "displayName": "Alex Rivera" }
```

### Create users in bulk

**`POST /users/bulk`** · **`users:write`**, plus **`roles:write`** if any item includes `roles`

Body: `{ "users": [...] }`, with **1–100** user objects using the same fields as Create a user. Every object’s fields and role names are checked before any users are created. Returns **201** if every creation succeeds, otherwise **207** with bulk results.

### Update users in bulk

**`PUT /users/bulk`** · **`users:write`**, plus **`roles:write`** if any item includes `roles`

Body: `{ "users": [...] }`, with **1–100** objects. Each requires `id` and accepts the optional fields from Update a user. Every object’s fields and role names are checked before updates begin. Returns **200** if every update succeeds, otherwise **207** with bulk results.

```json
{
  "users": [
    { "id": "550e8400-e29b-41d4-a716-446655440000", "displayName": "Alex Rivera" }
  ]
}
```

### Assign roles

**`POST /users/:id/roles`** · **`users:write`** and **`roles:write`**

Body: `{ "roles": ["Member"] }`. Adds the named roles, preserving existing assignments and avoiding duplicates. Returns **200** with the updated user; a missing user returns **404**. Use a role name configured in your deployment.

### Remove roles

**`DELETE /users/:id/roles`** · **`users:write`** and **`roles:write`**

Send a JSON body: `{ "roles": ["Member"] }`. Removes only those roles, preserving other assignments. Returns **200** with the updated user; a missing user returns **404**.

### Assign roles in bulk

**`POST /users/bulk/roles`** · **`users:write`** and **`roles:write`**

Body: `{ "assignments": [...] }`, with **1–100** objects containing `userId` and a `roles` array. Adds roles as in Assign roles. Role names are checked before assignments begin. Returns **200** if all succeed, otherwise **207** with bulk results.

```json
{
  "assignments": [
    { "userId": "550e8400-e29b-41d4-a716-446655440000", "roles": ["Member"] }
  ]
}
```

### Assign or clear an ID number

**`PUT /users/:id/id-number`** · **`users:write`**

Requires ID number identification to be enabled and configured. Body: `idNumber` as a string of **1–32 digits**, or `null` to clear it. Leading zeros are preserved. Returns `{ "success": true }`; it does not return the number. A number assigned to another user returns **409** and leaves the current assignment intact. An unavailable identification method returns **403**.

```json
{ "idNumber": "00123456" }
```

```json
{ "idNumber": null }
```

### Bulk results

Bulk writes are processed item by item after initial validation. Successful changes remain applied when another item fails. The response contains `results` and a `summary` with `total`, `succeeded`, and `failed`. `index` is the zero-based position in the request array. Treat **207** as a signal to inspect every result, including when all items failed.

| Operation | Successful result | Failed result |
| --- | --- | --- |
| Create users | `success`, `index`, `user` | `success: false`, `index`, `error` |
| Update users | `success`, `index`, `id`, `user` | `success: false`, `index`, `id`, `error` |
| Assign roles | `success`, `index`, `userId`, `roles` | `success: false`, `index`, `userId`, `error` |

Bulk `user` objects contain `id`, `username`, `displayName`, nullable `email`, and `roles`; they omit timestamps. Retry only failed items after resolving their errors. Replaying an entire create batch would conflict with users already created.

## Automations and deliveries

Automation endpoints act as the person who created the key. Besides the key’s capability, that person must still hold the matching permission: view automations for reads (or view notifications for explain), manage automations for drafts and imports, run automations for manual runs, and view connections for deliveries. Without it the request fails with `403`. Refusals from the automation service return its message, such as `{ "error": "That automation does not exist." }` with `404`.

Nothing here publishes, resumes or turns an automation on. Drafts and imports wait for a person to review and publish them in Pluraprint.

### List automations

**`GET /workflows`** · **`workflows:read`**

Query parameters: `kind` (`automation` or `notification`), `status` (comma-separated: `draft`, `active`, `testing`, `paused`, `archived`), `includeArchived` (`true`), `search`. Returns `{ "workflows": [...] }`, each with its id, key, name, status, trigger and the last day’s run counts.

### Get an automation

**`GET /workflows/:id`** · **`workflows:read`**

Returns the automation with its published definition, draft and versions.

### List runs

**`GET /workflows/:id/runs`** · **`workflows:read`**

Query parameters: `status` (comma-separated run statuses), `subjectKey` (such as `print_job:42`), `limit` (1–100, default 50) and `cursor` (the previous page’s `nextCursor`).

### Get a run

**`GET /workflow-runs/:id`** · **`workflows:read`**

Returns the run with every step, its resolved input, output, condition trace and deliveries. Personal values are redacted from traces.

### Explain a send

**`GET /workflows/explain?subjectKey=print_job:42`** · **`workflows:read`**

Why messages about a subject were or were not sent: the events recorded about it, every run (including runs that did not start, with the reason), who each message step planned, sent and skipped, delivery results, and automations listening to those events that never started. Add `userId` to see only what concerns one person, or `workflowId` for one automation. An automation run’s own error text needs view automations permission, and who a print restriction’s messages went to needs view print restrictions permission; without them the response says only that a run failed, and shows recipients as “Someone”.

### Export automations

**`GET /workflows/export`** · **`workflows:read`**

Returns the [export bundle](https://pluraprint.com/docs/automations/import-export). `includeArchived=true` adds archived automations; `includeNotifications=false` or `includeConnections=false` leave those parts out. Notifications need the issuer to view notifications, and connections to view connections. The bundle never contains a secret.

### Validate a draft

**`POST /workflows/:id/validate`** · **`workflows:read`**

Checks the draft as publishing would. Returns `ok`, `issues` (path, code, message, severity), the steps’ `authorPermissions`, and `missingAuthorPermissions` the issuer lacks.

### Create a draft

**`POST /workflows`** · **`workflows:write`**

```json
{
  "name": "Remind owners to collect",
  "description": "Optional",
  "siteId": null,
  "draft": { "schemaVersion": 1, "trigger": { "kind": "event", "key": "pickup.assigned" }, "steps": [] }
}
```

Returns `201` with the new automation, as a draft.

### Save a draft

**`PUT /workflows/:id/draft`** · **`workflows:write`**

Body: any of `name`, `description`, `siteId`, `draft`. The published version, and whether the automation is on, stay as they are.

### Import automations

**`POST /workflows/import`** · **`workflows:write`**

```json
{ "bundle": { "format": "pluraprint.automations", "version": 1, "...": "..." }, "onConflict": "skip", "dryRun": true }
```

`dryRun` defaults to `true` and returns the check without writing anything. Send `"dryRun": false` to apply: everything is written in one transaction, or nothing if the check found a problem (`applied: false`). `onConflict` is `skip` (default) or `copy`. Through the API an import brings in automations as drafts only: it never publishes a version, creates a connection, changes a shipped notification or changes a setting, and reports those items as skipped (`api_limited`). Import the file in Pluraprint to bring them in. See [Export and import](https://pluraprint.com/docs/automations/import-export) for what each item becomes.

### Start a manual run

**`POST /workflows/:id/runs`** · **`workflows:run`**

Body: `{ "subjectId": 42 }`, the id of the subject the automation runs on. Returns `202` with `runId` and `status`. Sensitive steps still wait for a person to approve them. Runs started through the API count toward the automation’s hourly run limit; the run that would exceed it is refused and the automation is paused, as it is for any runaway automation.

### List deliveries

**`GET /deliveries`** · **`deliveries:read`**

Query parameters: `connectionId`, `status` and `channel` (comma-separated), `limit` (1–100, default 50), `offset`. Returns `{ "deliveries": [...], "total", "limit", "offset" }`. Recipients are labels with addresses redacted.

### Get a delivery

**`GET /deliveries/:id`** · **`deliveries:read`**

Returns the delivery and its attempts, with redacted request and response summaries.

## MCP job review

The [MCP connection](https://pluraprint.com/docs/account/ai-connections) uses its own job shapes:

| Tool or field | Meaning |
| --- | --- |
| `get_print_job` | Returns `job`, `slices`, `reviewedSlices`, `running`, `ranOn`, `metadata`, `materialRequirements` and `requirements`. `job.printerModel` and `metadata` describe the prepared file. |
| `slices` | Each entry has `ref`, `printerModel`, `role`, `status`, `reasonCode`, `reason`, `durationSeconds`, `grams`, `selected` and `executed`. |
| `running` | Active file: `{fileConfirmed, ref, printerModel, durationSeconds}`, or `null`. A claim doesn’t mean printing has started; also check `job.status`. |
| `ranOn` | Model that ran: `{fileConfirmed, ref, printerModel}`, or `null`. When `fileConfirmed` is `false`, `ref` is `null`. |
| `reviewedSlices` | `{revision, refs}` identifying what was reviewed; `null` for a job without other models. |
| `list_print_jobs_awaiting_approval` | Summaries include `slices` and `reviewedSlices` for other models, and can carry `running` and `ranOn` when known. |
| `approve_print_job` | Accepts `jobId` and optional `reviewedSlices`. Send the returned `reviewedSlices` unchanged after reviewing each model. |

Without `reviewedSlices`, only the prepared file is approved. If review is stale, fetch and review the job again. Use the web or station screens to confirm or remove models.

## Slicer uploads

Slicer uploads use the separate OctoPrint-compatible interface at `/api/ingest/octoprint`, with `/api/ingest/orca-3mf` retained for slicers already set up with it. API keys need **`files:upload`**, and the issuing person must still have upload permission. This capability does not grant access to the reporting or user endpoints above.

**`GET /api/ingest/octoprint/api/version`** tests the connection. **`POST /api/ingest/octoprint/api/files/local`** accepts one multipart `file`, up to **1 GB**. Uploads create work for preparation and approval; `print=true` does not start printing. See [Submitting a print job](https://pluraprint.com/docs/print-jobs/submitting-a-print-job#uploading-from-orcaslicer).

## API changes

### Automations

Automation and delivery endpoints were added with the `workflows:read`, `workflows:write`, `workflows:run` and `deliveries:read` capabilities. Existing endpoints are unchanged.

### Printers and materials redesign

Materials now belong to a brand’s product, such as Bambu Lab PLA Basic, and printers record what is loaded through their equipment. Existing fields keep their meaning, with these changes:

- **Variant names.** A material variant’s `name` is always its brand, product, and color. Variants recorded before the redesign used to keep their stored name.
- **Resin types.** A resin variant’s `type` is its resin class, such as `Standard` or `Tough`, and the resin itself is in `product`. Before the redesign each resin had its own type.
- **Variant order.** `GET /materials` sorts by brand, product, and color names.
- **New fields.** Variants gained `product`, `vendorColorName`, `identifiers`, and `color.family`; types gained `key` and `process`; colors gained `family`; loaded printer materials gained `product` and `identifiers`; job material requirements gained `product` and `colorFamily`.
