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-codesCreate 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
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Human-readable name for the QPR Code |
| prompt | string | Yes | AI system prompt. Sets the AI's persona and behavior. |
| welcome_message | string | No | First message shown to the user. Defaults to a greeting. |
| template | string | No | One of: business, rewards, events, personal, hospitality, healthcare, retail |
| metadata | object | No | Arbitrary 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-codesList QPR Codes
Returns a paginated list of your QPR Codes, sorted by creation date (newest first).
Query parameters
| Param | Default | Description |
|---|---|---|
| limit | 20 | Max items to return (1–100) |
| offset | 0 | Pagination offset |
| status | active | Filter 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
}