Skip to content
Notice This app is in Beta Testing We are still testing Record Sender, so features may change.
Sign in

Docs Emailer devices — API reference

Called by scanners, POS / thermal printers and the print agent with their own device token (`Authorization: Bearer rsd_…`). A token reaches only its device's jobs and files into its device's inbox.

← All groups
POST /api/v1/gateway/agent/heartbeat

Print agent heartbeat

Any valid credential · gateway_device.heartbeat

Request body application/json
agent string Agent name
printer any The printer's state
version string
Responses 200 · 401 · 429

200 Success

device GatewayDevice
fields

GatewayDevice

id * string (uuid)
kind "scanner" | "mfp" | "printer" | "thermal"
last_seen_at string | null
manufacturer string | null
model string | null
name string
network_identity string | null
online boolean
permissions [string]
personal boolean
protocol string
status string
token_prefix string
workspace_id string | null
ok * boolean

401 Problem details (401)

429 Problem details (429)

POST /api/v1/gateway/agent/jobs/claim

Claim the next print job

Answers 204 (no body) when no job is waiting. The job carries the document's details and the path to download it.

Any valid credential · gateway_device.claim

Responses 200 · 401 · 429

200 Success

job * object
fields
attempts integer
claimed_at string | null
content_type string | null
copies integer
created_at string (date-time)
device_id string (uuid)
document_id string (uuid)
download string Path of `GET /api/v1/gateway/agent/jobs/{id}/document`
error string | null
filename string
finished_at string | null
id * string (uuid)
options object
sha256 string
size integer
status string

401 Problem details (401)

429 Problem details (429)

GET /api/v1/gateway/agent/jobs/{id}/document

Download a claimed job's document

Any valid credential · gateway_device.document

ParameterInTypeDescription
id *pathstring (uuid)
Responses 200 · 401 · 404 · 429 · 502

200 Success

string

401 Problem details (401)

404 Problem details (404)

429 Problem details (429)

502 Storage unavailable

Problem

code * string Stable machine-readable code (snake_case)
detail string A sentence an app can show
error object | string Legacy member kept for existing clients (deprecated)
errors object Field → messages, for validation errors
instance string The request path
message string Legacy member of the mobile sign-in errors (deprecated)
request_id string
status * integer
title * string
type string (uri) A URI identifying the problem type (https://recordsender.com/problems/<code>)
POST /api/v1/gateway/agent/jobs/{id}/status

Report a print job's progress

Any valid credential · gateway_device.status

ParameterInTypeDescription
id *pathstring (uuid)
Request body application/json
error string Why it failed
status * "printing" | "done" | "failed"
Responses 200 · 401 · 404 · 409 · 429

200 Success

print_job * GatewayJob
fields

GatewayJob

attempts integer
claimed_at string | null
copies integer
created_at string (date-time)
device_id string (uuid)
document_id string (uuid)
error string | null
finished_at string | null
id * string (uuid)
options object
status string queued, claimed, printing, done, failed, cancelled

401 Problem details (401)

404 Problem details (404)

409 Bad status, or the job isn't claimed

Problem

code * string Stable machine-readable code (snake_case)
detail string A sentence an app can show
error object | string Legacy member kept for existing clients (deprecated)
errors object Field → messages, for validation errors
instance string The request path
message string Legacy member of the mobile sign-in errors (deprecated)
request_id string
status * integer
title * string
type string (uri) A URI identifying the problem type (https://recordsender.com/problems/<code>)

429 Problem details (429)

POST /api/v1/gateway/device/receipt

File a POS receipt

ESC/POS bytes as `raw_base64` (or the raw body), or a structured `receipt`; `email` also emails it.

Any valid credential · gateway_device.receipt

Request body application/json
email string (email) Email the receipt here
raw_base64 string ESC/POS bytes, base64
receipt object A structured receipt (merchant, items, totals …)
Responses 201 · 401 · 429

201 Success

document * GatewayDocument
fields

GatewayDocument

channel string
classification string | null
content_type string | null
created_at string (date-time)
doc_type string | null
filename string
from string | null
id * string (uuid)
note string | null
private boolean
processing object
fields
classification any
detected any
duplicate_of string | null
extraction any
malware any
ocr any
pages integer | null
processed_at string | null
rules any
transcription any
processing_status string | null
sha256 string
size integer
source string
status string
tags [string]
title string | null
emailed boolean

401 Problem details (401)

429 Problem details (429)

POST /api/v1/gateway/device/upload

Upload a scan

Multipart `file`, JSON `{filename, content_type, data_base64}`, or the raw body (up to 100 MB) with an `X-Filename` header.

Any valid credential · gateway_device.upload

ParameterInTypeDescription
X-FilenameheaderstringRaw-body uploads: the file name (URL-encoded)
Request body multipart/form-data
content_type string JSON uploads
data_base64 string JSON uploads: the content, base64
file string The scan (multipart)
filename string JSON uploads
Responses 201 · 401 · 413 · 429 · 507

201 Success

document * GatewayDocument
fields

GatewayDocument

channel string
classification string | null
content_type string | null
created_at string (date-time)
doc_type string | null
filename string
from string | null
id * string (uuid)
note string | null
private boolean
processing object
fields
classification any
detected any
duplicate_of string | null
extraction any
malware any
ocr any
pages integer | null
processed_at string | null
rules any
transcription any
processing_status string | null
sha256 string
size integer
source string
status string
tags [string]
title string | null

401 Problem details (401)

413 Too large

Problem

code * string Stable machine-readable code (snake_case)
detail string A sentence an app can show
error object | string Legacy member kept for existing clients (deprecated)
errors object Field → messages, for validation errors
instance string The request path
message string Legacy member of the mobile sign-in errors (deprecated)
request_id string
status * integer
title * string
type string (uri) A URI identifying the problem type (https://recordsender.com/problems/<code>)

429 Problem details (429)

507 Storage full

Problem

code * string Stable machine-readable code (snake_case)
detail string A sentence an app can show
error object | string Legacy member kept for existing clients (deprecated)
errors object Field → messages, for validation errors
instance string The request path
message string Legacy member of the mobile sign-in errors (deprecated)
request_id string
status * integer
title * string
type string (uri) A URI identifying the problem type (https://recordsender.com/problems/<code>)