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

# Get WhatsApp QR code

> Get the QR code to connect WhatsApp on the phone.



## OpenAPI

````yaml /en/whatsapp-api/api-reference/openapi-whatsapp.json get /v1/whatsapp/instances/{instanceId}/qr
openapi: 3.0.3
info:
  title: Notifique API — WhatsApp
  description: >-
    Send WhatsApp messages and manage connections. Authenticate with
    `Authorization: Bearer sk_live_...` or `x-api-key`.
  version: 1.0.0
servers:
  - url: https://api.notifique.dev
    description: Production
security:
  - ntfWaBearerAuth: []
  - ntfWaApiKeyHeader: []
tags:
  - name: Messages
    description: Send, list, edit, and cancel messages
  - name: Instances
    description: >-
      Register and manage connected WhatsApp numbers — each number is an
      **instance** (the phone that sends and receives messages).
  - name: Groups
    description: Groups (unofficial only)
paths:
  /v1/whatsapp/instances/{instanceId}/qr:
    get:
      tags:
        - Instâncias
      summary: Get WhatsApp QR code
      description: Get the QR code to connect WhatsApp on the phone.
      operationId: ntfWa_getV1WhatsappInstanceQr
      parameters:
        - name: instanceId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: QR atual (ou null se ACTIVE).
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      status:
                        type: string
                        description: PENDING, ACTIVE ou DISCONNECTED.
                      base64:
                        type: string
                        nullable: true
                        description: >-
                          Image do QR em base64 (data URL); null se instance
                          ACTIVE.
              examples:
                pending:
                  summary: QR pendente
                  value:
                    success: true
                    data:
                      status: PENDING
                      base64: data:image/png;base64,...
                      loginUrl: null
                active:
                  summary: Já conectado
                  value:
                    success: true
                    data:
                      status: ACTIVE
                      base64: null
        '400':
          description: Instance sem conexão WhatsApp configurada.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_ErrorResponse'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_ErrorResponse'
        '402':
          description: Plano expirado ou suspenso.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_ErrorResponse'
        '403':
          description: Escopo ou acesso à instance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_ErrorResponse'
        '404':
          description: Instance not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_ErrorResponse'
        '409':
          description: >-
            Número conectado não corresponde ao vinculado ou expectedPhoneNumber
            (PHONE_NUMBER_MISMATCH).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_ErrorResponse'
              example:
                success: false
                error: Conflict
                code: PHONE_NUMBER_MISMATCH
                message: >-
                  This number does not match the one originally linked to this
                  instance. Create a new instance to use a different number.
        '429':
          description: >-
            Cooldown de reconexão após desconexão involuntária ou excesso de
            tentativas (RECONNECT_COOLDOWN). Inclui retryAfterSec (segundos).
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/NtfWa_ErrorResponse'
                  - type: object
                    properties:
                      retryAfterSec:
                        type: integer
                        description: Segundos até poder solicitar novo QR.
              example:
                success: false
                error: Too Many Requests
                code: RECONNECT_COOLDOWN
                message: >-
                  Reconnection is temporarily blocked after an involuntary
                  disconnect. Wait before requesting a new QR, or create a new
                  instance if you need another number.
                retryAfterSec: 21600
components:
  schemas:
    NtfWa_ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          description: 'Rótulo HTTP do erro (ex.: Unauthorized, Bad Request, Not Found).'
        message:
          type: string
          description: >-
            Message legível para exibir ao usuário (localizada via
            Accept-Language / x-locale quando aplicável).
        code:
          type: string
          description: >-
            Código estável da API v1 (enum). Sempre presente em erros. Use com o
            status HTTP para decidir retry ou correção. Ver [Responses de
            erro](/guides/conceitos/resposta-de-erros).
        details:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
        note:
          type: string
      required:
        - success
        - error
        - message
        - code
  securitySchemes:
    ntfWaBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        API Key no header Authorization. Exemplo: `Authorization: Bearer
        sk_live_xxxxx`
    ntfWaApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: API Key no header x-api-key.

````