Get Started
Get Started
This guide gets you from zero to your first successful print job.
1. Base URL
Use your production domain:
https://api.printbase.cloud2. Register and Login (Web users)
Register:
curl -X POST https://api.printbase.cloud/v1/auth/register \
-H "Content-Type: application/json" \
-d '{
"email":"admin@example.com",
"password":"Passw0rd!",
"name":"Admin",
"organization_id":"org_default"
}'Login:
curl -X POST https://api.printbase.cloud/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"admin@example.com","password":"Passw0rd!"}'Save the returned token and use it in Authorization: Bearer <TOKEN>.
3. Create an API key for server-to-server calls
curl -X POST https://api.printbase.cloud/v1/api-keys \
-H "Authorization: Bearer <USER_JWT>" \
-H "Content-Type: application/json" \
-d '{"name":"backend-service"}'4. Connect an Agent
Run an agent binary on a local machine:
PRINTBASE_API_KEY=pb_live_xxx ./agent-darwin-arm64You can also sign in with email and password so the agent can fetch a user token:
PRINTBASE_EMAIL=admin@example.com \
PRINTBASE_PASSWORD='Passw0rd!' \
./agent-darwin-arm64The desktop agent-client supports the same flow from Setup: choose Account, enter the email and password, then save and start.
The agent registers the computer, reports printers, and opens a WebSocket.
5. Create your first print job
curl -X POST https://api.printbase.cloud/v1/print-jobs \
-H "Authorization: Bearer pb_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"printer_id":"printer_123",
"content_type":"pdf",
"content":"JVBERi0xLjQK...",
"copies":1,
"options":{"duplex":false}
}'You can also replace content with content_url when the PDF or raw file is already available through a public HTTP/HTTPS URL:
{
"printer_id": "printer_123",
"content_type": "pdf",
"content_url": "https://example.com/label.pdf",
"copies": 1
}Expected response:
{ "id": "job_xxx", "status": "queued" }