arazzo: 1.0.1 info: title: WhatsApp Create and Retrieve QR Code summary: Create a click-to-chat QR code and read back its deep link and image URLs. description: >- Click-to-chat QR codes let a business put a scannable code on print or digital media that opens a WhatsApp conversation pre-filled with a message. This workflow creates a QR code with a prefilled message for a phone number and then reads the created QR code back by its identifier to retrieve its deep link and hosted image URLs. Every step spells out its request inline so the flow can be read and executed without opening the underlying OpenAPI description. version: 1.0.0 sourceDescriptions: - name: whatsappCloudApi url: ../openapi/whatsapp-cloud-api-openapi.yml type: openapi workflows: - workflowId: create-qr-code summary: Create a prefilled QR code and read back its deep link and image URLs. description: >- Creates a click-to-chat QR code with a prefilled message and image format, then retrieves the created QR code by its identifier to surface its deep link and image URLs. inputs: type: object required: - accessToken - phoneNumberId - prefilledMessage - imageFormat properties: accessToken: type: string description: Access token with whatsapp_business_messaging permission. phoneNumberId: type: string description: The WhatsApp phone number ID the QR code opens a chat with. prefilledMessage: type: string description: The message text pre-filled when a user scans the code. imageFormat: type: string description: Image format for the QR code (SVG or PNG). steps: - stepId: createQr description: >- Create a click-to-chat QR code with the supplied prefilled message and image format. operationId: createQrCode parameters: - name: Authorization in: header value: Bearer $inputs.accessToken - name: phone-number-id in: path value: $inputs.phoneNumberId requestBody: contentType: application/json payload: prefilled_message: $inputs.prefilledMessage generate_qr_image: $inputs.imageFormat successCriteria: - condition: $statusCode == 200 outputs: qrCodeId: $response.body#/code deepLinkUrl: $response.body#/deep_link_url - stepId: readQr description: >- Retrieve the created QR code by its identifier to read back its deep link and hosted image URLs. operationId: getQrCode parameters: - name: Authorization in: header value: Bearer $inputs.accessToken - name: phone-number-id in: path value: $inputs.phoneNumberId - name: qr-code-id in: path value: $steps.createQr.outputs.qrCodeId successCriteria: - condition: $statusCode == 200 outputs: deepLinkUrl: $response.body#/deep_link_url qrImageUrl: $response.body#/qr_image_url outputs: qrCodeId: $steps.createQr.outputs.qrCodeId deepLinkUrl: $steps.readQr.outputs.deepLinkUrl qrImageUrl: $steps.readQr.outputs.qrImageUrl