GET/whoami
Your account, plan and this month’s usage.
{
"id": "shop_abc",
"email": "[email protected]",
"plan": "pro",
"plan_label": "Pro",
"prints_used": 152,
"prints_limit": 10000,
"max_computers": 3,
"can_choose_printer": true
}
The Auto Print API lets your software send documents to any printer connected to a The Auto Print account — a simple REST API over HTTPS with JSON responses.
curl -u YOUR_API_KEY: -X POST \
https://theautoprint.com/wp-json/theautoprint/v1/printjobs \
-H "Content-Type: application/json" \
-d '{"title":"Hello","content_type":"html","content":"<h1>Hello printer!</h1>"}'
Every request needs your API key. Three interchangeable ways:
HTTP Basic RECOMMENDED
API key as username, empty password.
curl -u YOUR_API_KEY: ...
Bearer token
Standard Authorization header.
Authorization: Bearer YOUR_API_KEY
Query param
Quick tests only — avoid in production.
?api_key=YOUR_API_KEY
Your account, plan and this month’s usage.
{
"id": "shop_abc",
"email": "[email protected]",
"plan": "pro",
"plan_label": "Pro",
"prints_used": 152,
"prints_limit": 10000,
"max_computers": 3,
"can_choose_printer": true
}
Computers running the desktop app on this account.
[ { "id": "POS-COUNTER", "name": "POS-COUNTER", "state": "connected" } ]
All printers on the account with live state. Use id as printer_id when printing, or "default" for the computer’s selected printers.
[
{
"id": "shop_abc::POS-COUNTER::EPSON TM-T82",
"name": "EPSON TM-T82",
"computer": "POS-COUNTER",
"state": "online"
}
]
Create a print job.
| Field | Required | Description |
|---|---|---|
| printer_id | no | Printer id from /printers, or "default" (default) |
| title | no | Shown in print history |
| content_type | yes | pdf_base64 · pdf_uri · image_base64 · image_uri · doc_base64 · docx_base64 · html · txt |
| content | yes | Base64 string, URL, or HTML/plain text |
Response 201 — state is sent (device online) or queued (offline, Pro+ — prints when it reconnects). HTML and DOC are converted to PDF server-side.
{ "id": "8b1f6c1e-...", "state": "sent" }
Recent jobs, newest first (max 100). state: pending → success | error.
One job’s live state — poll this to confirm delivery.
{
"id": "8b1f6c1e-...",
"title": "Invoice 1042",
"printer": "default",
"state": "success",
"message": "Job 'Invoice 1042' printed successfully",
"created_at": "2026-07-12 09:14:03"
}
A complete integration — list printers, print a PDF, poll until done.
# 1. List printers
curl -u YOUR_API_KEY: \
https://theautoprint.com/wp-json/theautoprint/v1/printers
# 2. Print a PDF (base64)
curl -u YOUR_API_KEY: -X POST \
https://theautoprint.com/wp-json/theautoprint/v1/printjobs \
-H "Content-Type: application/json" \
-d "{
\"printer_id\": \"default\",
\"title\": \"Invoice 1042\",
\"content_type\": \"pdf_base64\",
\"content\": \"$(base64 -i invoice.pdf)\"
}"
# 3. Check the job (use the id from step 2)
curl -u YOUR_API_KEY: \
https://theautoprint.com/wp-json/theautoprint/v1/printjobs/JOB_ID
| HTTP | Meaning |
|---|---|
| 401 | Missing or invalid API key |
| 400 | Bad request (missing content, unsupported content_type) |
| 409 | No printer connected / printer offline |
| 429 | Monthly print limit reached — upgrade your plan |
| 404 | Print job not found |
| Plan | Computers | Pick printer | Offline queue |
|---|---|---|---|
| Free | 1 | default only | — |
| Pro | more | ✓ | ✓ |
| Ultra | unlimited | ✓ | ✓ |
Errors are JSON: {"error": "message"}. All error messages are human-readable — safe to show to your users.