Skip to content

REST API Overview

The PrintStudio REST API is a Hono application running on Bun. It exposes 100+ endpoints for every domain operation: orders, jobs, printers, SKUs, inventory, analytics, and system management.

EnvironmentURL
Local devhttp://localhost:8787
ProductionYour deployed API URL

The API includes a full OpenAPI 3.1 spec and an interactive explorer powered by Scalar:

  • OpenAPI JSON: http://localhost:8787/openapi.json
  • Scalar UI: http://localhost:8787/docs

Open http://localhost:8787/docs in your browser to explore and test every endpoint without writing any code.

The API is currently unversioned (no /v1/ prefix). Breaking changes will introduce versioning at that point. All endpoints are under /api/* except:

PathPurpose
/Health check
/openapi.jsonOpenAPI spec
/docsScalar interactive docs
/webhooks/*Inbound webhooks (Stripe, OpenClaw)
/api/*All application endpoints

All endpoints accept and return application/json. File uploads use multipart/form-data.

All errors follow a consistent shape:

{
"error": "Not found",
"code": "JOB_NOT_FOUND",
"details": {
"jobId": "job-abc-123"
}
}

HTTP status codes follow REST conventions: 200 success, 201 created, 400 validation error, 401 unauthenticated, 403 forbidden, 404 not found, 409 conflict, 500 server error.

Default rate limits (configurable via env):

TierLimit
Unauthenticated20 req/min
API Key (standard)300 req/min
API Key (admin)1000 req/min

Rate limit headers are included on every response:

X-RateLimit-Limit: 300
X-RateLimit-Remaining: 247
X-RateLimit-Reset: 1700000060
GroupPrefixDescription
Authentication/api/authLogin, logout, API key management
Orders/api/ordersOrder CRUD + state management
Jobs/api/jobsJob management + state transitions
Printers/api/printersFleet management
SKUs/api/skusProduct catalog
Inventory/api/inventoryMaterial stock
Customers/api/customersCustomer records
Analytics/api/analyticsMetrics and reports
Orchestrator/api/orchestratorAutoPilot control
Setup/api/setupFirst-run configuration
Webhooks/webhooksInbound webhook receivers
Terminal window
# Health check (no auth required)
curl http://localhost:8787/
# List all SKUs (auth required)
curl http://localhost:8787/api/skus \
-H "X-API-Key: your-api-key"