Print from a web app
Why a browser cannot reach a printer, and what an outbound agent does instead.
Send a print job from your app to your customer's printers with a simple HTTP POST call. Read from their shipping scales over HTTP in real-time. Works with all thermal shipping label and receipt printers.
Free plan, no card required. The virtual test printer is unlimited, forever.
curl https://api.printsocket.com/v1/jobs \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"printer_id": "prn_8f2k1",
"title": "Order #12345 label",
"content": { "format": "pdf", "base64": "JVBERi0xLjcKJcfsj6IKNSAwIG9iago8..." },
"copies": 2,
"options": { "paper": "A4", "color": false }
}'
base64 is the file's bytes, standard encoding. If the file already lives
somewhere we can reach, send url instead, or upload it once and reuse it by
document_id.
You get back a job with an id and a status. Watch it move with
GET /v1/jobs/{id}/events, or let a signed webhook tell you when it finishes.
One installer for Windows, macOS, or Linux, on the machine that already talks to your printers. It enrolls with a single-use token and connects outbound over a WebSocket.
The agent reports every queue it can see, with capabilities: paper sizes, duplex, color, DPI, trays. Attached scales report their readings too.
POST /v1/jobs with a PDF or raw ZPL/ESC-POS payload. The agent prints it and
reports every state transition back.
An sk_test_ key gets a virtual device and printer that simulates the whole job
lifecycle. Build and run your integration tests without touching hardware, free and
unlimited on every plan.
Signed, retried, and testable from the dashboard. Fire a test delivery at your endpoint before you write a line of handler code.
Send Idempotency-Key on any POST. A replay within 24 hours returns the stored
original response instead of a conflict you have to write recovery code for.
Flat resources, cursor pagination, prefixed opaque ids, one error object, RFC 3339
timestamps, and metadata on every mutable resource.
A job that cannot print says so, with a code you can branch on. Offline printers queue or reject: your choice, per job.
Store a document and reference it by id from as many jobs and printers as you like, instead of re-sending or re-hosting the same bytes.
Shipping desks and checkout counters are more than document printers. The same agent and the same API handle the other hardware on the bench.
Plug in a USB shipping scale and the agent finds it, no setup. It works with any scale that
speaks the standard USB HID scale protocol, which covers DYMO M and S series, Stamps.com,
and Fairbanks models. Read the weight at the moment you buy the label:
GET /v1/scales/{id} returns the latest reading with a stable flag,
so you know the scale had settled, and a timestamp, so you know how fresh it is.
Send a job with "format": "raw" and the bytes go to the queue untouched, so the
ESC/POS commands your receipt template produces reach the printer exactly as written, with no
driver reformatting them along the way. Label printers use the same path for ZPL.
Create an account, enroll a machine, and send your first job in a few minutes.
Four things people arrive here trying to do, and what the API gives each of them.
Why a browser cannot reach a printer, and what an outbound agent does instead.
Receipt printers take bytes, not PDFs. Raw content goes through unchanged.
Shipping labels, with idempotency so a retry cannot print one twice.
Grams, whether the scale had settled, and how old the reading is.