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

# Send an organization invite link via WhatsApp template



## OpenAPI

````yaml https://portal.unicontrol.me/v1/openapi post /v1/organizations/{id}/whatsapp-invite
openapi: 3.1.0
info:
  title: Unicontrol API
  description: Welcome
  version: 1.0.0
servers:
  - url: http://0.0.0.0:3000
    description: Local Server
  - url: https://portal.test.flexhome.casa
    description: Development
  - url: https://portal.unicontrol.me
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/organizations/{id}/whatsapp-invite:
    post:
      tags:
        - Organizations
      summary: Send an organization invite link via WhatsApp template
      operationId: postV1OrganizationsByIdWhatsapp-invite
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: ID da organização
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - phone_number
              properties:
                phone_number:
                  type: string
                  description: >-
                    Número no formato E.164 sem '+' (ex.: 5511999999999).
                    Caracteres não-dígitos são removidos automaticamente.
                role:
                  type: string
                  enum:
                    - admin
                    - member
                  description: 'Papel atribuído ao aceitar (default: member).'
                area_ids:
                  type: array
                  items:
                    type: integer
                  description: >-
                    IDs de áreas às quais o usuário será adicionado após
                    aprovação.
                expires_in_days:
                  type: integer
                  nullable: true
                  description: 'Dias até o link expirar. null = nunca. Default: 7.'
            example:
              phone_number: '5511999999999'
              role: member
              area_ids:
                - 1
      responses:
        '201':
          description: Convite enviado
          content:
            application/json:
              example:
                ok: true
                link:
                  id: 42
                  token: AbC
                  url: https://app/invite/AbC
        '400':
          description: Dados inválidos
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: validation error
        '401':
          description: Não autenticado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: unauthorized
        '403':
          description: Acesso negado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: forbidden
        '500':
          description: Erro interno do servidor
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: internal_error
        '502':
          description: >-
            WhatsApp recusou a mensagem (template não aprovado, número inválido
            etc.)
          content:
            application/json:
              example:
                error: bad_gateway
                message: Falha ao enviar WhatsApp.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.