Skip to content
You're offline. Some features may be unavailable.
QPortal is live. Deploy QR-powered AI instantly.

API Reference

QPR Codes

QPR Codes are the core primitive. Each code bundles an AI prompt with a unique QR image. When scanned, it opens an AI conversation powered by that prompt — no app needed.

POST/v1/qpr-codes

Create a QPR Code

Creates a new QPR Code with an embedded AI prompt. Returns the code details including the scan URL and QR image URLs.

Request body

FieldTypeRequiredDescription
namestringYesHuman-readable name for the QPR Code
promptstringYesAI system prompt. Sets the AI's persona and behavior.
welcome_messagestringNoFirst message shown to the user. Defaults to a greeting.
templatestringNoOne of: business, rewards, events, personal, hospitality, healthcare, retail
metadataobjectNoArbitrary key-value pairs attached to the code
Requestbash
curl -X POST https://api.3qpr.com/v1/qpr-codes \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Hotel Room Concierge",
    "prompt": "You are a luxury hotel concierge. Help guests with room service, spa bookings, local recommendations, and any requests. Always address guests by name if they share it.",
    "welcome_message": "Welcome! How can I make your stay exceptional today?",
    "template": "hospitality",
    "metadata": {"hotel": "Grand Meridian", "floor": "14"}
  }'
Response 200json
{
  "id": "qpr_01HXYZ789ABC",
  "name": "Hotel Room Concierge",
  "short_id": "hc9m3r",
  "scan_url": "https://3qpr.com/s/hc9m3r",
  "qr_image_url": "https://api.3qpr.com/qr/hc9m3r.png",
  "qr_svg_url": "https://api.3qpr.com/qr/hc9m3r.svg",
  "template": "hospitality",
  "status": "active",
  "scans_total": 0,
  "metadata": {"hotel": "Grand Meridian", "floor": "14"},
  "created_at": "2026-03-20T12:00:00Z",
  "updated_at": "2026-03-20T12:00:00Z"
}
GET/v1/qpr-codes

List QPR Codes

Returns a paginated list of your QPR Codes, sorted by creation date (newest first).

Query parameters

ParamDefaultDescription
limit20Max items to return (1–100)
offset0Pagination offset
statusactiveFilter by status: active | archived
curl "https://api.3qpr.com/v1/qpr-codes?limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response 200json
{
  "codes": [
    {
      "id": "qpr_01HXYZ789ABC",
      "name": "Hotel Room Concierge",
      "short_id": "hc9m3r",
      "scan_url": "https://3qpr.com/s/hc9m3r",
      "status": "active",
      "scans_total": 142,
      "created_at": "2026-03-20T12:00:00Z"
    }
  ],
  "total": 1,
  "limit": 10,
  "offset": 0
}