API Documentation
Integrate DeskQRCode into your applications. Create, manage, and track QR codes programmatically using our REST API.
Base URL
https://your-project.supabase.co/functions/v1/apiAll API endpoints are prefixed with /v1 for versioning.
Authentication
All requests must include a valid API key in the Authorization header using the Bearer scheme. API keys start with the prefix dqr_.
Authorization: Bearer dqr_your_api_key_hereGenerate API keys from your Settings page. Keys are hashed on our servers -- we never store the raw key.
Rate Limits
60
requests
1
minute
When you exceed the rate limit, the API returns a 429 Too Many Requests response. Wait for the window to reset before retrying.
Endpoints
GET/api/v1/qrcodes
List all QR codes for the authenticated user.
Response
{
"data": [
{
"id": "uuid",
"type": "url",
"title": "My Website",
"data": { "url": "https://example.com" },
"style": { "foregroundColor": "#000000" },
"scans": 142,
"is_active": true,
"created_at": "2026-01-15T10:30:00Z"
}
],
"count": 1
}GET/api/v1/qrcodes/:id
Get a specific QR code by ID.
Response
{
"data": {
"id": "uuid",
"type": "url",
"title": "My Website",
"data": { "url": "https://example.com" },
"style": { "foregroundColor": "#000000" },
"scans": 142,
"is_active": true,
"created_at": "2026-01-15T10:30:00Z"
}
}POST/api/v1/qrcodes
Create a new QR code.
Request Body
{
"type": "url",
"title": "My Website",
"data": { "url": "https://example.com" },
"style": {
"foregroundColor": "#000000",
"backgroundColor": "#ffffff"
}
}Response
{
"data": {
"id": "uuid",
"type": "url",
"title": "My Website",
"created_at": "2026-02-23T14:00:00Z"
}
}PUT/api/v1/qrcodes/:id
Update an existing QR code.
Request Body
{
"title": "Updated Title",
"data": { "url": "https://new-url.com" },
"is_active": true
}Response
{
"data": {
"id": "uuid",
"title": "Updated Title",
"updated_at": "2026-02-23T15:00:00Z"
}
}DELETE/api/v1/qrcodes/:id
Delete a QR code.
Response
{
"message": "QR code deleted successfully"
}GET/api/v1/qrcodes/:id/analytics
Get scan analytics for a specific QR code.
Response
{
"data": {
"total_scans": 142,
"scans_today": 12,
"scans_this_week": 65,
"device_breakdown": {
"mobile": 98,
"desktop": 34,
"tablet": 10
}
}
}GET/api/v1/usage
Get API usage statistics for your account.
Response
{
"data": {
"total_requests": 1250,
"requests_today": 43,
"avg_response_time_ms": 85,
"rate_limit": {
"limit": 60,
"window": "1 minute"
}
}
}Code Examples
# List all QR codes
curl -X GET "https://your-project.supabase.co/functions/v1/api/v1/qrcodes" \
-H "Authorization: Bearer dqr_your_api_key_here" \
-H "Content-Type: application/json"
# Create a new QR code
curl -X POST "https://your-project.supabase.co/functions/v1/api/v1/qrcodes" \
-H "Authorization: Bearer dqr_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"type": "url",
"title": "My Website",
"data": { "url": "https://example.com" }
}'Error Codes
| Code | Status | Description |
|---|---|---|
| 400 | Bad Request | Invalid request body or parameters |
| 401 | Unauthorized | Missing or invalid API key |
| 404 | Not Found | Resource not found |
| 429 | Too Many Requests | Rate limit exceeded (60 req/min) |
| 500 | Server Error | Internal server error |