curl -X POST https://snip.sa/api/qr-codes \
-H "Content-Type: application/json" \
-H "X-API-Key: your_api_key_here" \
-d '{
"urlId": "507f1f77bcf86cd799439011",
"size": 500,
"format": "png"
}'
const response = await axios.post('https://snip.sa/api/qr-codes', {
urlId: '507f1f77bcf86cd799439011',
size: 500,
format: 'png'
}, {
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'your_api_key_here'
}
});
{
"success": true,
"data": {
"qrCode": {
"_id": "qr123",
"urlId": "507f1f77bcf86cd799439011",
"imageUrl": "https://snip.sa/qr-codes/qr123.png",
"size": 500,
"format": "png",
"createdAt": "2024-01-15T10:30:00.000Z"
}
}
}
QR Codes
Generate QR Code
Generate a QR code for a shortened URL
POST
/
api
/
qr-codes
curl -X POST https://snip.sa/api/qr-codes \
-H "Content-Type: application/json" \
-H "X-API-Key: your_api_key_here" \
-d '{
"urlId": "507f1f77bcf86cd799439011",
"size": 500,
"format": "png"
}'
const response = await axios.post('https://snip.sa/api/qr-codes', {
urlId: '507f1f77bcf86cd799439011',
size: 500,
format: 'png'
}, {
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'your_api_key_here'
}
});
{
"success": true,
"data": {
"qrCode": {
"_id": "qr123",
"urlId": "507f1f77bcf86cd799439011",
"imageUrl": "https://snip.sa/qr-codes/qr123.png",
"size": 500,
"format": "png",
"createdAt": "2024-01-15T10:30:00.000Z"
}
}
}
Request Body
string
required
URL ID to generate QR code for
number
default:"300"
QR code size in pixels (100-2000)
string
default:"png"
Image format:
png, svg, or jpegstring
default:"M"
Error correction level:
L, M, Q, or Hstring
default:"#000000"
Foreground color (hex format)
string
default:"#FFFFFF"
Background color (hex format)
curl -X POST https://snip.sa/api/qr-codes \
-H "Content-Type: application/json" \
-H "X-API-Key: your_api_key_here" \
-d '{
"urlId": "507f1f77bcf86cd799439011",
"size": 500,
"format": "png"
}'
const response = await axios.post('https://snip.sa/api/qr-codes', {
urlId: '507f1f77bcf86cd799439011',
size: 500,
format: 'png'
}, {
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'your_api_key_here'
}
});
{
"success": true,
"data": {
"qrCode": {
"_id": "qr123",
"urlId": "507f1f77bcf86cd799439011",
"imageUrl": "https://snip.sa/qr-codes/qr123.png",
"size": 500,
"format": "png",
"createdAt": "2024-01-15T10:30:00.000Z"
}
}
}
