Create QR Code

Prev Next
Post
/qr-code

This endpoint provides a consumer to create creating custom QR Codes programmatically. Every QR Code will contain a unique Branch link which you can deep link and track analytics with.

Body parameters
Collapse all
object
branch_key
string Required

The Branch key of the originating app; from your Branch Settings Dashboard i.e. accessible over https://dashboard.branch.io/account-settings/app. Please note that the key provided in example is dummy.

Examplekey_live_xxxx
qr_code_settings
object Required

Pre-defined set of QR code related properties that works over the overall display of the QR Code

image_format
string

The output image format that could be either JPEG or PNG

Valid values[ "png", "jpeg", "jpg" ]
Examplepng
center_logo_url
string

URL to the image you want as a center logo e.g. “https://cdn.branch.io/branch-assets/00000000-og_image.png”

Examplehttps://cdn.branch.io/branch-assets/00000000-og_image.png
width
integer

Output size of QR Code image. Min 300px. Max 2000px. (Only applicable to JPEG/PNG)

Minimum300
Maximum2000
Example300
margin
integer

The number of pixels you want for the margin. Min 1px. Max 20px.

Minimum1
Maximum20
Example1
code_color
string

Hex color value of the QR Code itself as per the https://htmlcolorcodes.com/

Example#000000
background_color
string

Hex color value of the background of the QR code itself as per the https://htmlcolorcodes.com/

Example#FFFFFF
code_pattern
integer

Instead of the generic/standard QR-Code pattern we’re used to seeing, customers can now use (1) standard, (2) squares, (3) circles, (4) triangles, (5) diamonds, (6) hexagons, and (7) octagons.

Valid values[ 1, 2, 3, 4, 5, 6, 7 ]
Default1
finder_pattern
string

The finder pattern refers to the shape seen in the top left, top right, and bottom left of a QR-Code. Users can now choose between a square, a rounded square, or a circle. 1 = square, 2 = rounded rectangle, 3 = circle

Valid values[ "1", "2", "3" ]
Default"1"
finder_pattern_color
string

Hex color value of the Finder Pattern as per the https://htmlcolorcodes.com/

Example#00A3D8
background_image_url
string

We can lay the QR-Code on top of a background image.

code_pattern_url
string

Direct link to an image to be used as the code-pattern itself on the QR Code.

finder_eye_color
string

Hex color value of the finder eye as per the https://htmlcolorcodes.com/

Example#00A3D8
data
object

The dictionary to embed link data behind the QR Code. Accessed as session or install parameters from the SDK. Use the data dictionary for all link control parameters that you'll find here https://help.branch.io/using-branch/docs/creating-a-deep-link#section-redirections.

Responses
200
400

Ok