> ## 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.

# Ativar link WhatsApp

> Gera um link para outra pessoa concluir a conexão.



## OpenAPI

````yaml /whatsapp-api/api-reference/openapi-whatsapp.json post /v1/whatsapp/instances/{instanceId}/connect-page/enable
openapi: 3.0.3
info:
  title: Notifique API — WhatsApp
  description: >-
    Envie mensagens WhatsApp e gerencie conexões. Autentique com `Authorization:
    Bearer sk_live_...` ou `x-api-key`.
  version: 1.0.0
servers:
  - url: https://api.notifique.dev
    description: Produção
security:
  - ntfWaBearerAuth: []
  - ntfWaApiKeyHeader: []
tags:
  - name: Mensagens
    description: Enviar, listar, editar e cancelar mensagens
  - name: Instâncias
    description: >-
      Cadastre e gerencie os números de WhatsApp conectados — cada número é uma
      **instância** (o telefone por onde entram e saem as mensagens).
  - name: Grupos
    description: Grupos (só conexão não oficial)
paths:
  /v1/whatsapp/instances/{instanceId}/connect-page/enable:
    post:
      tags:
        - Instâncias
      summary: Ativar link WhatsApp
      description: Gera um link para outra pessoa concluir a conexão.
      operationId: ntfWa_postV1WhatsappInstanceConnectPageEnable
      parameters:
        - name: instanceId
          in: path
          required: true
          schema:
            type: string
          example: inst_abc
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                allowedHosts:
                  type: array
                  items:
                    type: string
                  description: Hosts permitidos para embed iframe (opcional).
                  example:
                    - app.cliente.com
                    - painel.cliente.com.br
            examples:
              withHosts:
                summary: Com hosts permitidos para iframe
                value:
                  allowedHosts:
                    - app.cliente.com
                    - painel.cliente.com.br
              empty:
                summary: Sem restrição de host
                value: {}
      responses:
        '200':
          description: Link habilitado (ou secret rotacionado).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_ConnectPageEnableResponse'
              example:
                success: true
                data:
                  hostedUrl: >-
                    https://api.notifique.dev/w/instance-connect/V1StGXR8_Z5jdHi6B-myT?token=AbCdEfGhIjKlMnOpQrStUvWxYz012345
                  embedUrl: >-
                    https://api.notifique.dev/w/embed/instance-connect/V1StGXR8_Z5jdHi6B-myT?token=AbCdEfGhIjKlMnOpQrStUvWxYz012345
                  publicId: V1StGXR8_Z5jdHi6B-myT
                  secret: AbCdEfGhIjKlMnOpQrStUvWxYz012345
                  iframeSnippet: >-
                    <iframe
                    src="https://api.notifique.dev/w/embed/instance-connect/V1StGXR8_Z5jdHi6B-myT?token=AbCdEfGhIjKlMnOpQrStUvWxYz012345"
                    style="border:0;width:100%;min-height:560px"
                    allow="clipboard-read; clipboard-write"></iframe>
                  shareableLink:
                    hostedUrl: >-
                      https://api.notifique.dev/w/instance-connect/V1StGXR8_Z5jdHi6B-myT?token=AbCdEfGhIjKlMnOpQrStUvWxYz012345
                    embedUrl: >-
                      https://api.notifique.dev/w/embed/instance-connect/V1StGXR8_Z5jdHi6B-myT?token=AbCdEfGhIjKlMnOpQrStUvWxYz012345
                    publicId: V1StGXR8_Z5jdHi6B-myT
                    secret: AbCdEfGhIjKlMnOpQrStUvWxYz012345
                    iframeSnippet: >-
                      <iframe
                      src="https://api.notifique.dev/w/embed/instance-connect/V1StGXR8_Z5jdHi6B-myT?token=AbCdEfGhIjKlMnOpQrStUvWxYz012345"
                      style="border:0;width:100%;min-height:560px"
                      allow="clipboard-read; clipboard-write"></iframe>
        '400':
          description: Instância não elegível ou página não habilitada.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_ErrorResponse'
              example:
                success: false
                error: Connect page is not enabled for this instance.
                message: Connect page is not enabled for this instance.
                code: CONNECT_PAGE_ERROR
        '401':
          description: Não autorizado.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_ErrorResponse'
              example:
                success: false
                error: Unauthorized
                message: Invalid or missing API Key
                code: UNAUTHORIZED
        '403':
          description: Escopo ausente ou instância fora do escopo da API Key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_ErrorResponse'
              example:
                success: false
                error: Forbidden
                message: Missing scope
                code: FORBIDDEN
        '404':
          description: Instância não encontrada.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_ErrorResponse'
              example:
                success: false
                error: Not Found
                message: Instance not found
                code: NOT_FOUND
components:
  schemas:
    NtfWa_ConnectPageEnableResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          allOf:
            - $ref: '#/components/schemas/NtfWa_ShareableLink'
            - type: object
              properties:
                shareableLink:
                  $ref: '#/components/schemas/NtfWa_ShareableLink'
    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: >-
            Mensagem 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 [Respostas 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
    NtfWa_ShareableLink:
      type: object
      description: >-
        URLs da página pública de conexão. Quem tiver a URL pode
        conectar/desconectar a instância — rotacione o secret após o uso.
      properties:
        hostedUrl:
          type: string
          description: URL hospedada da página de conexão (inclui o token).
          example: >-
            https://api.notifique.dev/w/instance-connect/V1StGXR8_Z5jdHi6B-myT?token=AbCdEfGhIjKlMnOpQrStUvWxYz012345
        embedUrl:
          type: string
          description: URL para embed em iframe (inclui o token).
          example: >-
            https://api.notifique.dev/w/embed/instance-connect/V1StGXR8_Z5jdHi6B-myT?token=AbCdEfGhIjKlMnOpQrStUvWxYz012345
        publicId:
          type: string
          description: ID público da página de conexão.
          example: V1StGXR8_Z5jdHi6B-myT
        secret:
          type: string
          description: >-
            Secret bruto (retornado em enable/rotate). Prefira usar hostedUrl,
            que já embute o token.
          example: AbCdEfGhIjKlMnOpQrStUvWxYz012345
        iframeSnippet:
          type: string
          description: Snippet HTML de iframe pronto para colar.
          example: >-
            <iframe
            src="https://api.notifique.dev/w/embed/instance-connect/V1StGXR8_Z5jdHi6B-myT?token=AbCdEfGhIjKlMnOpQrStUvWxYz012345"
            style="border:0;width:100%;min-height:560px" allow="clipboard-read;
            clipboard-write"></iframe>
      required:
        - hostedUrl
        - embedUrl
        - publicId
  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.

````