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

# Enviar mensagem de texto

> Envie uma mensagem de texto simples via WhatsApp.

O endpoint mais básico da API: envia texto para um número (`to`) a partir de uma
sessão conectada (`sessionId`). O número usa o formato internacional sem `+`
(ex: `5511999999999`).

Recursos opcionais:

* `linkPreview` — gera pré-visualização de links no texto.
* `mentionAll` — menciona todos os participantes (em grupos).
* `contextInfo` — responde a uma mensagem (reply), menciona contatos ou
  encaminha, via JSON do ContextInfo do Whatsmeow.

<Tip>
  Para responder a uma mensagem específica, informe o `stanzaId` e o
  `participant` da mensagem original dentro de `contextInfo`.
</Tip>


## OpenAPI

````yaml api-reference/openapi.json POST /api/v1/messages/send/text
openapi: 3.1.0
info:
  title: D-API - Infraestrutura WhatsApp Completa
  description: >-
    Solução escalável e robusta para gestores de automação, SaaS e usuários
    finais que precisam de uma integração WhatsApp confiável. Oferece múltiplas
    instâncias simultâneas, webhooks em tempo real, dashboard intuitivo e API
    REST documentada com 99.9% de uptime e latência inferior a 30ms.
  version: 1.2.0
  contact:
    name: Suporte D-API
    email: suporte@d-api.cloud
    url: https://d-api.cloud
servers:
  - url: https://api.d-api.cloud
    description: Produção
security:
  - ApiKeyAuth: []
tags:
  - name: Início
    description: Endpoints base
  - name: Sessões
    description: Endpoints para gerenciamento de sessões
  - name: Mensagens
    description: Endpoints para envio de mensagens
  - name: Ligações URA
    description: >-
      Disparo de ligações de voz (URA): individual ou em massa, com áudio ou
      fluxo IVR.
  - name: SMS
    description: 'Envio de SMS: individual ou em massa.'
paths:
  /api/v1/messages/send/text:
    post:
      tags:
        - Mensagens
      summary: Enviar mensagem de texto
      description: Envia uma mensagem de texto simples via WhatsApp
      operationId: postApiV1MessagesSendText
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                sessionId:
                  minLength: 1
                  type: string
                to:
                  minLength: 1
                  type: string
                text:
                  minLength: 1
                  type: string
                contextInfo:
                  description: >-
                    Whatsmeow ContextInfo proto JSON. Supports mentions, replies
                    (quotedMessage), forwarding, ads, and other metadata.
                  examples:
                    - stanzaId: BAE5C3F2E3D4
                      participant: 5511999999999@s.whatsapp.net
                      mentionedJid:
                        - 5511888888888@s.whatsapp.net
                      quotedMessage:
                        conversation: Original message
                mentionAll:
                  type: boolean
                linkPreview:
                  type: boolean
                linkPreviewUrl:
                  type: string
                linkPreviewSmall:
                  type: boolean
                async:
                  type: string
              required:
                - sessionId
                - to
                - text
          multipart/form-data:
            schema:
              type: object
              properties:
                sessionId:
                  minLength: 1
                  type: string
                to:
                  minLength: 1
                  type: string
                text:
                  minLength: 1
                  type: string
                contextInfo:
                  description: >-
                    Whatsmeow ContextInfo proto JSON. Supports mentions, replies
                    (quotedMessage), forwarding, ads, and other metadata.
                  examples:
                    - stanzaId: BAE5C3F2E3D4
                      participant: 5511999999999@s.whatsapp.net
                      mentionedJid:
                        - 5511888888888@s.whatsapp.net
                      quotedMessage:
                        conversation: Original message
                mentionAll:
                  type: boolean
                linkPreview:
                  type: boolean
                linkPreviewUrl:
                  type: string
                linkPreviewSmall:
                  type: boolean
                async:
                  type: string
              required:
                - sessionId
                - to
                - text
          text/plain:
            schema:
              type: object
              properties:
                sessionId:
                  minLength: 1
                  type: string
                to:
                  minLength: 1
                  type: string
                text:
                  minLength: 1
                  type: string
                contextInfo:
                  description: >-
                    Whatsmeow ContextInfo proto JSON. Supports mentions, replies
                    (quotedMessage), forwarding, ads, and other metadata.
                  examples:
                    - stanzaId: BAE5C3F2E3D4
                      participant: 5511999999999@s.whatsapp.net
                      mentionedJid:
                        - 5511888888888@s.whatsapp.net
                      quotedMessage:
                        conversation: Original message
                mentionAll:
                  type: boolean
                linkPreview:
                  type: boolean
                linkPreviewUrl:
                  type: string
                linkPreviewSmall:
                  type: boolean
                async:
                  type: string
              required:
                - sessionId
                - to
                - text
      responses:
        '200':
          description: Resposta bem-sucedida
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'API Key para autenticação. Formato: <API_KEY>'

````