> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zapfy.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Pair with QR code

> One of the **two ways to pair** (link) the instance to WhatsApp — here you get a QR code to **scan** on the phone (WhatsApp › Linked devices › Link a device). The other way, without scanning, is `POST /instance/pair-code` (a typed code). Use one **or** the other; both connect the same instance.



## OpenAPI

````yaml /en/api-reference/openapi.json get /instance/pair-qr
openapi: 3.1.0
info:
  title: Zapfy API
  description: >-
    Multi-tenant WhatsApp API. Send messages and manage webhooks through a
    single surface.
  version: 1.0.0
servers:
  - url: https://api.zapfy.io/v1
security:
  - accountToken: []
paths:
  /instance/pair-qr:
    get:
      tags:
        - Instance
      summary: Pair with QR code
      description: >-
        One of the **two ways to pair** (link) the instance to WhatsApp — here
        you get a QR code to **scan** on the phone (WhatsApp › Linked devices ›
        Link a device). The other way, without scanning, is `POST
        /instance/pair-code` (a typed code). Use one **or** the other; both
        connect the same instance.
      responses:
        '200':
          $ref: '#/components/responses/QrCode'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '502':
          $ref: '#/components/responses/Error'
      security:
        - instanceToken: []
components:
  responses:
    QrCode:
      description: QR code for connection.
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/QrCodeResult'
    Error:
      description: Error.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Instance not found
  schemas:
    QrCodeResult:
      type: object
      properties:
        qrcode:
          type: string
          description: QR code to scan in the WhatsApp app (base64 data URL image).
          example: data:image/png;base64,iVBORw0KGgo...
        code:
          type: string
          description: Raw QR code, in case you prefer to render it yourself.
          example: 2@AbC...
  securitySchemes:
    accountToken:
      type: http
      scheme: bearer
      description: Account token (`zpfy_acct_...`) — manages instances and webhooks.
    instanceToken:
      type: http
      scheme: bearer
      description: Instance token (`zpfy_inst_...`) — sends messages.

````