API Endpoints Reference
Complete documentation for all QR Fast API endpoints
๐ Base URL
https://qrfa.st/api/v1
๐ Authentication
All requests require a Bearer token with your API key:
Authorization: Bearer YOUR_API_KEY
QR Code Endpoints
POST
/qrcode
Create a new QR code
Request Body
{ "targetUrl": "https://example.com", // Required: URL to redirect to "customShortId": "my-custom-id", // Optional: Custom short ID "qrCodeOptions": { // Optional: Styling options "width": 300, "height": 300, "dotsOptions": { "type": "square", // square, dots, rounded, extra-rounded, classy, classy-rounded "color": "#000000" }, "backgroundOptions": { "color": "#FFFFFF" } } }
Response (201 Created)
{ "success": true, "shortId": "abc123defg", "qrCodeUrl": "https://qrfa.st/abc123defg", "editUrl": "https://qrfa.st/qrcode/edit/abc123defg", "targetUrl": "https://example.com", "views": 0, "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T10:30:00Z" }
cURL Example
curl -X POST https://qrfa.st/api/v1/qrcode \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"targetUrl": "https://example.com"}'
GET
/qrcode/:shortId
Get QR code details
URL Parameters
shortId
- The unique identifier of the QR codeResponse (200 OK)
{ "success": true, "shortId": "abc123defg", "targetUrl": "https://example.com", "views": 42, "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T10:30:00Z" }
PUT
/qrcode/:shortId
Update an existing QR code
Request Body
{ "targetUrl": "https://new-example.com", // Optional: New target URL "qrCodeOptions": { // Optional: New styling options "dotsOptions": { "type": "dots", "color": "#0000FF" } } }
GET
/qrcode
List all QR codes
Query Parameters
limit
- Number of items per page (default: 20, max: 100)offset
- Number of items to skip (default: 0)sort
- Sort field (createdAt, updatedAt, views) (default: createdAt)order
- Sort order (asc, desc) (default: desc)DELETE
/qrcode/:shortId
Delete a QR code
Response (204 No Content)
Empty response body
๐จ Common Error Responses
400 Bad Request
{ "error": "INVALID_REQUEST", "message": "targetUrl is required" }
401 Unauthorized
{ "error": "UNAUTHORIZED", "message": "Invalid or missing API key" }
404 Not Found
{ "error": "NOT_FOUND", "message": "QR code not found" }