Generate QR Code via API
The Generate QR Code endpoint creates a QR code image from a string of data you provide. You can customise its appearance by changing the color or embedding a logo directly in the centre. The generated QR code is saved as an asset in your library, making it easy to reuse across multiple documents.
Key parameters include:
content
– The text or URL you want to encode.color
– The colour of the QR code in hexadecimal format (e.g.,#000000
for black).logo_url
orlogo_base64
– A URL or base64 string for an image to be placed in the centre of the QR code.output
- The format for the response, which can be a URL or a base64 string.
Endpoint Details
- HTTP Method:
POST
- Request URL:
https://us1.pdfgeneratorapi.com/api/v4/assets/qrcode
- Documentation: Official API Docs
Request Body
This request generates a QR code with a custom blue colour that links to our homepage.
{
"content": "https://pdfgeneratorapi.com",
"color": "#7CCBB2",
"logo_base64": "iVBORw0KGgoAAAANSUhEUgAAA1AAAAMzCAYAAA...",
"output": "base64"
}
Response
The API returns a base64 encoded QR code image, along with metadata about the asset.
{
"response": "JVBERi0xLjcKJeLjz9MKNyAwIG9iago8PCAvVHlwZSA...",
"meta": {
"encoding": "base64",
"content-type": "image/png"
}
}
Related articles you may find helpful
- Extract and Fill Existing PDF Forms Programmatically
- How to Create a Form
- Polish Your PDFs – Add Watermarks & Optimize
Updated on: 11/09/2025
Thank you!