Skip to main content
POST
https://snip.sa
/
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"
  }'
{
  "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

urlId
string
required
URL ID to generate QR code for
size
number
default:"300"
QR code size in pixels (100-2000)
format
string
default:"png"
Image format: png, svg, or jpeg
errorCorrectionLevel
string
default:"M"
Error correction level: L, M, Q, or H
foregroundColor
string
default:"#000000"
Foreground color (hex format)
backgroundColor
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"
  }'
{
  "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"
    }
  }
}