QR Code Collection

Create or Update Message QR Code

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.

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

Path parameters

Versionstring required

Graph API version to use for this request. Determines the API behavior and available features.

Phone-Number-IDstring required

The WhatsApp Business Account phone number ID for which to create or update the QR code. This ID is provided when you add a phone number to your WhatsApp Business Account.

Headers

User-Agentstring
Example:Meta-Business-Messaging-OpenAPI/1.0.0;spec=2025-10-21

The user agent string identifying the client software making the request.

Authorizationstring required
Example:Bearer EAABwzLixnjYBOzYmNMJJGfHq9DgNh...

Bearer token for API authentication. This should be a valid access token obtained through the appropriate OAuth flow or system user token.

Content-Type'application/json' | 'application/x-www-form-urlencoded' | 'multipart/form-data' required
Example:application/json

Media type of the request body

Request body

OR

Example request

{
  "prefilled_message": "Hi! I'm interested in your products. Can you help me?",
  "generate_qr_image": "SVG"
}

Response

Successfully created or updated the message QR code

codestring required

Unique 14-character identifier for the QR code. This code is used for future updates or deletions.

prefilled_messagestring required

The pre-filled message text associated with this QR code. This text appears when customers use the QR code.

deep_link_urlstring 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_urlstring 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.

Example response

{
  "code": "ANED2T5QRU7HG1",
  "prefilled_message": "Hi! I'm interested in your products. Can you help me?",
  "deep_link_url": "https://wa.me/message/ANED2T5QRU7HG1",
  "qr_image_url": "https://scontent-iad3-2.xx.fbcdn.net/m1/v/t6/An-psFmLBls2NFXnhhkSVqwIHEqCTQoNKTLxxlOeci0Wbsukd2RLiwZalHrXwqT5RTFSzOhyw6OLvJJO0itaQtJI1BS2WkNcV67wR3GNx7ZX1tFSNCbpo1e6KPptKF1GbVGzmUfkgSPX?ccb=10-5&oh=00_AfAOAr6oRA2OKV_Ur3GUh4em57sACxUkfhXHsObiFrxOsA&oe=64DCCEF6&_nc_sid=5a413f"
}

Changes

No recorded changes to this operation across all 5 revisions of this API.