InkRelay
v0.1.1Print PDFs, ZPL labels and ESC/POS receipts on your printers and follow print jobs via InkRelay
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
whoami Identify the API key
Returns the organization, plan, mode (test or live) and current usage behind INKRELAY_API_KEY. Call it first.
list_computers List computers
Lists the computers running the InkRelay agent, with their state (online, offline, disabled), OS and agent version.
| Parameter | Type | Description |
|---|---|---|
limit | integer |
list_printers List printers
Lists printers with id, name, computer, online state, whether they are live (accept jobs) and their default options. Use get_printer for paper sizes, trays and other capabilities.
| Parameter | Type | Description |
|---|---|---|
computerId | string | Only printers of this computer |
liveOnly | boolean | Only printers that accept jobs |
get_printer Get a printer
Returns one printer with its capabilities (papers in tenths of a millimetre, bins, dpis, duplex, color, nup), default options and custom paper sizes.
| Parameter | Type | Description |
|---|---|---|
printerId * | string |
update_printer Update printer settings
Sets a printer's display name, live switch (enabled), default options, custom paper sizes (tenths of a millimetre; replaces the whole list) or remarks. Needs a key with the admin scope.
| Parameter | Type | Description |
|---|---|---|
printerId * | string | |
customPapers | array | |
defaultOptions | object | PDF options. Omitted options use the printer's defaults; unsupported ones are ignored and listed in stateMessage. |
displayName | string | null | |
enabled | boolean | The live switch: only enabled printers accept jobs |
remarks | string | null |
print_pdf Print a PDF
Prints a PDF on a printer. Pass exactly one of url (public or signed http(s) URL, fetched once), base64, or filePath (a local file, read by this server). Up to 25 MB. With an ir_live_ key this prints on paper and counts toward the plan; with ir_test_ it runs on a virtual printer.
| Parameter | Type | Description |
|---|---|---|
printerId * | string | Printer id from list_printers |
title * | string | Shown in the dashboard and the OS print queue |
base64 | string | |
expireAfter | integer | |
filePath | string | A file inside the folder this server runs in (or INKRELAY_FILE_ROOT) |
idempotencyKey | string | Same key and body returns the first job instead of printing twice. Generated if omitted. |
options | object | PDF options. Omitted options use the printer's defaults; unsupported ones are ignored and listed in stateMessage. |
qty | integer | How many times to print the document |
timeoutSeconds | integer | |
url | string | |
wait | boolean | Wait until the job is done, error, cancelled or expired, then return it |
print_raw Print raw bytes (ZPL, ESC/POS)
Sends printer language bytes unchanged to a label or receipt printer, e.g. ZPL (^XA...^XZ) or ESC/POS. Pass exactly one of text (each character U+0000 to U+00FF becomes one byte, so \u001b is ESC), base64, url or filePath. Options do not apply. The OS queue must accept raw data (CUPS raw queue, or the printer's own or Generic / Text Only driver on Windows).
| Parameter | Type | Description |
|---|---|---|
printerId * | string | Printer id from list_printers |
title * | string | Shown in the dashboard and the OS print queue |
base64 | string | |
expireAfter | integer | |
filePath | string | A file inside the folder this server runs in (or INKRELAY_FILE_ROOT) |
idempotencyKey | string | Same key and body returns the first job instead of printing twice. Generated if omitted. |
qty | integer | How many times to print the document |
text | string | |
timeoutSeconds | integer | |
url | string | |
wait | boolean | Wait until the job is done, error, cancelled or expired, then return it |
get_print_job Get a print job
Returns a print job with its state, stateMessage and the time of each state change, plus its full event history.
| Parameter | Type | Description |
|---|---|---|
jobId * | string | |
includeEvents | boolean |
wait_for_print_job Wait for a print job
Polls a print job until it is done, error, cancelled or expired (or the timeout passes) and returns it.
| Parameter | Type | Description |
|---|---|---|
jobId * | string | |
timeoutSeconds | integer |
list_print_jobs List print jobs
Lists recent print jobs, newest first, optionally filtered by printer, computer or state.
| Parameter | Type | Description |
|---|---|---|
computerId | string | |
limit | integer | |
printerId | string | |
state | string |
cancel_print_job Cancel a print job
Cancels a job that is still queued or sent. Once the agent has received it, the API answers 409 not_cancellable.
| Parameter | Type | Description |
|---|---|---|
jobId * | string |
reprint_print_job Reprint a job
Prints the stored file of an earlier job again (files are kept 7 days), on the same printer or another one of the same mode.
| Parameter | Type | Description |
|---|---|---|
jobId * | string | |
printerId | string | Defaults to the original printer |
timeoutSeconds | integer | |
title | string | |
wait | boolean | Wait until the job is done, error, cancelled or expired, then return it |
get_usage Get print usage
Returns the plan, the live prints used and included this billing period, and earlier periods.
list_events List events
Reads the event feed (the same events webhooks deliver). For new events use dir asc with after set to the last nextCursor.
| Parameter | Type | Description |
|---|---|---|
after | string | |
dir | string | |
limit | integer |
list_webhooks List webhook endpoints
Lists the webhook endpoints of this key's mode.
create_webhook Create a webhook endpoint
Creates an endpoint that receives signed events (Standard Webhooks HMAC). Returns the whsec_ signing secret once: tell the user to store it as INKRELAY_WEBHOOK_SECRET. Live endpoints need https. Needs the admin scope.
| Parameter | Type | Description |
|---|---|---|
events * | array | |
url * | string | |
description | string |
ping_webhook Send a test webhook
Queues a signed test delivery with type ping to an endpoint. Needs the admin scope.
| Parameter | Type | Description |
|---|---|---|
webhookId * | string |