API reference
Connect your own shop or ERP to Rackrew with the REST API: how API keys work, signed webhooks and how to check their signatures.
Rackrew's public API is a first-class part of the product, not an afterthought — the same decorators that build the dashboard's own screens generate the OpenAPI spec, so the docs can never drift from what the API actually does.
Full interactive reference: api.rackrew.com/docs
Authentication
Create a key under Developers → API keys. Keys are shown once at creation (rk_live_...) and
carry explicit scopes (read, write) — only the hash is stored server-side.
Use a separate key per system that calls Rackrew, so revoking one never breaks the others. How many you can hold at once depends on your plan — one on Free, three on Farm, unlimited on Workshop — and revoking a key frees its slot straight away. See pricing.
curl https://api.rackrew.com/v1/printers \
-H "Authorization: Bearer rk_live_..."
Webhooks
Subscribe to job and printer events under Developers → Webhooks. Deliveries are HMAC-signed and retried on failure.
Endpoints have their own per-plan allowance, separate from API keys: one on Free, three on Farm, unlimited on Workshop. Deleting an endpoint frees its slot.
Events
| Event | Sent when |
|---|---|
job.started | a printer starts a job |
job.completed | a job finished printing |
job.failed | a job stopped with an error (always together with printer.needs_attention); problems lists the printer's own texts |
job.bad | copies of a finished print were reported bad, or the report was corrected; bad lists { modelId, copies } (see Quality) |
printer.needs_attention | a printer needs a person before it prints again, with the reason |
printer.offline | the bridge lost contact with a printer |
printer.paused | a printer paused a running print by itself (filament ran out, a clog, the door opened), with the printer's reasons; not sent for a pause you asked for |
printer.error | a printer reports a new error that is not a failed job, with the printer's own text |
bridge.offline | a bridge or Hub has been silent for 3 minutes, with how many printers sit behind it |
bridge.online | that bridge is back |
queue.exhausted | a queue entry has printed every copy you asked for, e.g. an order is ready to ship |
print_order.updated | copies of a print order moved: onto a plate, printing, printed, or back to waiting. The body is the order as GET /v1/print-orders/:id returns it |
filament.low | a spool is running low |
maintenance.due | a printer's service task is due or overdue |
Each delivery
A POST with a JSON body and these headers:
x-rackrew-event: the event namex-rackrew-delivery: a unique ID per delivery, use it to ignore duplicatesx-rackrew-timestamp: Unix seconds when it was signedx-rackrew-signature:sha256=+ the HMAC-SHA256 of<timestamp>.<raw body>with the endpoint's secret
Answer with any 2xx within 10 seconds. Anything else counts as a failure and is retried after
30 seconds, 2, 8 and 30 minutes; after the fifth failed attempt the delivery is marked failed.
import { createHmac, timingSafeEqual } from 'node:crypto';
function verify(secret, timestamp, rawBody, header) {
const expected = createHmac('sha256', secret).update(`${timestamp}.${rawBody}`).digest('hex');
const given = header.replace(/^sha256=/, '');
return given.length === expected.length &&
timingSafeEqual(Buffer.from(given, 'hex'), Buffer.from(expected, 'hex'));
}
Because the timestamp is part of what is signed, also reject deliveries whose timestamp is more than a few minutes old: a captured request can then not be replayed later.
Print orders: send parts, not plates
A shop or ERP usually knows "3 of this part for order 1042", not plates. Send that as a print order. Rackrew keeps the copies waiting with other parts of their kind and puts them on a plate shortly before a printer needs work, so parts that come in later share the plate. See Queue → Parts waiting.
curl https://api.rackrew.com/v1/print-orders \
-H "Authorization: Bearer rk_live_..." -H "Content-Type: application/json" \
-d '{"orders":[{"modelId":"cm…","copies":3,"colour":"#161616","ref":"order-1042/2","needBy":"2026-11-20T12:00:00Z"}]}'
| Field | Meaning |
|---|---|
modelId, copies | The model (under Files → Models) and how many. |
profileId | Which of its print profiles; the default one when left out. |
colour or colours | #RRGGBB of the spool, or one per colour of a multi-colour model. |
ref | Your own reference, returned unchanged. |
needBy | When the parts are needed. A small plate never waits past it. |
whenRoom | Room only: never starts a plate, fills the room left on plates that print anyway. For stock. |
rush | On the very next plate of its kind, no waiting. |
bedType | The build plate, as Bambu Studio names it. Only the same share a plate. |
GET /v1/print-orders/:id answers with how many copies are waiting, slicing, onPlate,
printing and printed, and the plates they are on. One order can be on several plates. A
status of done means every copy is printed. failed means it stopped and says why in error:
the part is too big for the bed, or three plates with it failed. POST /v1/print-orders/:id/retry
lets it wait again. PATCH changes copies, rush, needBy or whenRoom. DELETE removes the
copies still waiting. If some are on a plate that hasn't started, that plate is taken apart and its
other parts wait again. Copies already printing finish.
A failed print, or a part skipped on the printer, comes back as waiting copies of the same order,
not as a new one. So your stock is right when you count printed.
GET /v1/print-orders/:id/filament gives the filament the order's copies took, per spool: its
share of every plate it was on, by size, failed prints included. final is true once nothing of
it prints any more.
Common uses
- Push jobs into the queue from your own ERP or order system
- React to
job.completedto update inventory or notify a customer - Pull fleet status into an external dashboard