API Reference
Complete REST API documentation for UsePrintr. Send messages, manage printers, and build extensions.
Base URL
https://api.useprintr.comAuthentication
Include your API key in the Authorization header: Bearer your_api_key
POST
/messagesOptional
Send Message
Send a message to any Printr device using its code
Request Body
{
  "printerCode": "ABC123",
  "senderName": "John Doe",
  "senderEmail": "john@example.com", 
  "message": "Hello from the API! đź‘‹"
}Response
{
  "success": true,
  "message": "Message sent successfully",
  "data": {
    "id": "msg_abc123",
    "status": "pending",
    "createdAt": "2024-01-15T10:30:00Z"
  }
}GET
/printersRequired
List User Printers
Get all printers registered by the authenticated user
Response
{
  "data": [
    {
      "id": "printer_123",
      "code": "HOME01", 
      "name": "Kitchen Printer",
      "location": "Home Kitchen",
      "isOnline": true,
      "autoApprove": false,
      "maxMessageLength": 500,
      "createdAt": "2024-01-10T08:00:00Z"
    }
  ]
}POST
/printersRequired
Register Printer
Register a new Printr device
Request Body
{
  "name": "Coffee Shop Printer",
  "location": "Downtown Café",
  "autoApprove": true,
  "maxMessageLength": 300
}Response
{
  "success": true,
  "data": {
    "id": "printer_456",
    "code": "CAFE42",
    "name": "Coffee Shop Printer",
    "location": "Downtown Café", 
    "isOnline": false,
    "autoApprove": true,
    "maxMessageLength": 300
  }
}GET
/printers/{code}Optional
Get Printer Info
Get public information about a printer by its code
Response
{
  "id": "printer_123",
  "code": "CAFE42",
  "name": "Downtown Café", 
  "location": "123 Main St",
  "isOnline": true,
  "acceptingMessages": true,
  "stats": {
    "totalMessages": 1247,
    "todayMessages": 23
  }
}POST
/extensionsRequired
Create Extension
Create a new automated extension for a printer
Request Body
{
  "printerId": "printer_123",
  "type": "weather",
  "name": "Daily Weather",
  "schedule": "0 8 * * *",
  "settings": {
    "city": "San Francisco",
    "units": "metric"
  }
}Response
{
  "success": true,
  "data": {
    "id": "ext_789",
    "type": "weather",
    "name": "Daily Weather",
    "isEnabled": true,
    "nextRun": "2024-01-16T08:00:00Z"
  }
}GET
/extensions/typesOptional
List Extension Types
Get all available extension types and their schemas
Response
{
  "types": [
    {
      "type": "weather",
      "name": "Weather Reports",
      "description": "Daily weather forecasts",
      "schema": {
        "city": "string",
        "units": "metric|imperial"
      }
    },
    {
      "type": "rss", 
      "name": "RSS Feed",
      "description": "News and blog updates",
      "schema": {
        "feedUrl": "string",
        "maxItems": "number"
      }
    }
  ]
}Error Codes
Client Errors (4xx)
400Bad Request - Invalid parameters401Unauthorized - Invalid API key404Not Found - Printer not found429Rate Limited - Too many requestsServer Errors (5xx)
500Internal Server Error503Service Unavailable - MaintenanceRate Limits
1000
requests per hour
Free tier
10,000
requests per hour
Pro tier
100
messages per printer per day
Anti-spam limit
SDKs & Libraries
JavaScript
useprintr-jsPython
useprintr-pythonGo
useprintr-goPHP
useprintr-php