---
title: "Create or Update Message QR Code"
method: POST
path: "/{Version}/{Phone-Number-ID}/message_qrdls"
tags: ["QR Code Collection"]
---

# Create or Update Message QR Code

`POST /{Version}/{Phone-Number-ID}/message_qrdls`

## Request

- Base URL: `https://graph.facebook.com`
- URL: `https://graph.facebook.com/{Version}/{Phone-Number-ID}/message_qrdls`
- Auth: HTTP bearer

Create a new QR code (without code parameter) or update existing QR code (with code parameter).
Supports optional QR image generation in PNG or SVG format.

## Path parameters

- `Version` string, required
- `Phone-Number-ID` string, required

## Headers

- `User-Agent` string
- `Authorization` string, required
- `Content-Type` 'application/json' | 'application/x-www-form-urlencoded' | 'multipart/form-data', required

## Request body

- union
  - CreateQrCodeRequest: Request payload for creating a new message QR code
    - `prefilled_message` string, required: Pre-filled message text (max 140 characters) that appears in customer chat
    - `generate_qr_image` 'PNG' | 'SVG': QR image format. When specified, response includes qr_image_url
  - UpdateQrCodeRequest: Request payload for updating an existing message QR code
    - `code` string, required: 14-character QR code identifier to update
    - `prefilled_message` string, required: New pre-filled message text (max 140 characters)

## Response `200`

Successfully created or updated the message QR code

- QrCodeResponse: Response containing QR code details after creation or update
  - `code` string, required: Unique 14-character identifier for the QR code. This code is used for future updates or deletions.
  - `prefilled_message` string, required: The pre-filled message text associated with this QR code. This text appears when customers use the QR code.
  - `deep_link_url` string, uri, required: WhatsApp deep link URL that can be used directly without QR code scanning. Customers can click this link to start a conversation with the pre-filled message.
  - `qr_image_url` string, uri: URL to download the QR code image. Only present if generate_qr_image parameter was specified in the request. Image format matches the requested format.

## Other responses

- `400`: Bad Request - Invalid parameters or malformed request
- `401`: Unauthorized - Invalid or missing access token
- `403`: Forbidden - Insufficient permissions or access denied
- `404`: Not Found - Phone number ID does not exist or QR code not found for update
- `429`: Too Many Requests - Rate limit exceeded
- `500`: Internal Server Error - Unexpected server error

---

[API](https://skmtc.dev/meta/apis/whatsapp-business-messaging.md) - [All operations](https://skmtc.dev/meta/apis/whatsapp-business-messaging/llms.txt) - [OpenAPI document](https://skmtc.dev/meta/apis/whatsapp-business-messaging/revisions/5c1973265369?raw)
