Print STA
DevelopersAPI v1 · English
PRINT STA DEVELOPERS

Your first print in under 15 minutes.

Install the Windows Agent, create a test API key, discover a printer, submit an idempotent job and track it until the Windows spooler completes it.

API endpoint and environments

ACTIVE DURING DOMAIN CUTOVERhttps://bryzmdvfbowtljycefbs.supabase.co/functions/v1
CANONICAL DOMAIN PREPAREDhttps://api.print-sta.com.br/v1DNS/ALIAS PENDING

pst_test_... keys are isolated from pst_live_.... The canonical domain is already represented in the project gateway configuration but must not become the default client URL until DNS, Netlify domain alias and HTTPS are validated.

Quickstart

  1. Install the Windows Agent and connect the computer to test.
  2. Create a pst_test_... key with computers:read, printers:read, jobs:create, jobs:read.
  3. Validate the key with GET /print-sta-api-account.
  4. List online computers and printers.
  5. Create a TEXT job with a unique Idempotency-Key.
  6. Read GET /print-sta-api-print-jobs/{job_id} or consume Webhooks.
cURL
export PRINT_STA_API_KEY="pst_test_YOUR_KEY"
BASE="https://bryzmdvfbowtljycefbs.supabase.co/functions/v1"
AUTH="Authorization: Bearer $PRINT_STA_API_KEY"

COMPUTER_ID=$(curl -sS "$BASE/print-sta-api-computers?status=online" -H "$AUTH" | jq -r '.data.items[0].computer_id')
PRINTER_ID=$(curl -sS "$BASE/print-sta-api-printers?computer_id=$COMPUTER_ID&status=online" -H "$AUTH" | jq -r '.data.items[0].printer_id')
JOB=$(curl -sS -X POST "$BASE/print-sta-api-print-jobs" -H "$AUTH" -H "Content-Type: application/json" -H "Idempotency-Key: first-print-$(date +%s)" -d "{"printer_id":"$PRINTER_ID","content":{"type":"text","encoding":"utf8","data":"PRINT STA\nFirst print\n"},"copies":1}")
echo "$JOB" | jq

Print formats

TEXT

UTF-8 text

type=text, encoding=utf8.

PDF

PDF document

type=pdf, encoding=base64. Max public content: 10 MiB.

RAW

RAW / ESC-POS

type=raw, encoding=base64, compatible printers only.

Job lifecycle

queued → leased → accepted_by_agent → sent_to_spooler → spooler_completed
             ↘ failed / manual_review
queued/leased → cancelled
queued → expired

spooler_completed means the Windows spooler completed processing; it is not a physical-paper confirmation.

Idempotency

Job creation and retry use Idempotency-Key (8–128 safe characters). Same key + same payload replays the original result. Same key + different payload returns HTTP 409 PRINT_STA_JOB_IDEMPOTENCY_CONFLICT. Keys are retained for at least 24 hours and at least until job expiration.

Webhooks and HMAC

Signatures use lowercase hex HMAC-SHA256. Preserve the raw request body and build:

<timestamp>.<event_id>.<product_version>.<api_contract_version>.<event_schema_version>.<raw_body>

Read X-Print-STA-Timestamp, X-Print-STA-Event-Id, X-Print-STA-Version, X-Print-STA-API-Version, X-Print-STA-Event-Schema-Version and X-Print-STA-Signature. Return any HTTP 2xx on success. Deduplicate by event_id.

Limits and errors

120/minreads
60/minjob mutations
20/minprinter tests
10 MiBjob content
100max page size

Error responses include code, message, status, retryable, request_id and correlation_id.

Windows Agent troubleshooting

Computer online but zero printers
Force status synchronization from the tray app, refresh printers in the panel and verify printer-sync policy.
PDF handler unavailable
Upgrade to Agent 2.0.25+, which uses internal PDFium rendering instead of an external PDF reader.
Agent UI opens at every Windows login
Agent 2.0.25+ starts its companion with --background; manual shortcut opens Status.
HTTP 401 after revocation
Reconnect the same installation to issue a new credential. Do not delete the installation ID.

SDKs

Official SDK packages are planned. Today, generate clients from the typed OpenAPI contract.

SDK roadmap and generation