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

# Enviar template

> Envia uma mensagem de template aprovado do WhatsApp para um destinatário.



## OpenAPI

````yaml openapi.evolution-v2.pt.json POST /message/sendTemplate/{instance}
openapi: 3.1.0
info:
  title: Evolution V2 Layer
  version: 1.0.0
  description: >-
    Camada de API do Pilot Status — Evolution V2. Base URL
    `https://pilotstatus.com.br/api/layer/evolution-v2`. Autentique com o header
    `apikey` (sua chave `ps_` do Pilot Status). Endpoints de instância/sessão
    NÃO estão disponíveis na camada.
servers:
  - url: https://pilotstatus.com.br/api/layer/evolution-v2
security:
  - apiKey: []
tags:
  - name: Chamada e Business
  - name: Chat
  - name: Grupo
  - name: Etiqueta (Label)
  - name: Mensagem
  - name: Perfil
  - name: Configurações e Proxy
  - name: Armazenamento (S3)
  - name: Template
paths:
  /message/sendTemplate/{instance}:
    post:
      tags:
        - Mensagem
      summary: Enviar template
      description: >-
        Envia uma mensagem de template aprovado do WhatsApp para um
        destinatário.
      operationId: post__message_sendTemplate_instance
      parameters:
        - name: instance
          in: path
          required: true
          schema:
            type: string
          description: O nome de exibição do número no painel do Pilot Status.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                number:
                  type: string
                  description: Telefone do destinatário em E.164 sem `+`, ou um JID.
                  example: '5511999999999'
                name:
                  type: string
                  description: Nome do template aprovado.
                  example: order_confirmation
                language:
                  type: string
                  description: 'Código de idioma/localidade do template (ex.: `pt_BR`).'
                  example: pt_BR
                components:
                  type: array
                  description: >-
                    Componentes do template (parâmetros de
                    cabeçalho/corpo/botão).
                  items:
                    type: object
                  example:
                    - type: body
                      parameters:
                        - type: text
                          text: Ismael
                webhookUrl:
                  type: string
                  description: >-
                    URL de webhook opcional por mensagem para callbacks de
                    status.
                  example: https://example.com/webhooks/template
              required:
                - name
                - language
      responses:
        '200':
          description: Sucesso — corpo de resposta nativo do provedor.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Sent template message. Served by the Cloud API (Meta) channel;
                  returns the persisted messageRaw envelope with the template
                  rendered as a conversation preview.
                properties:
                  key:
                    type: object
                    description: Message key identifying the sent template message.
                    properties:
                      remoteJid:
                        type: string
                        description: Recipient JID.
                      fromMe:
                        type: boolean
                        description: Always true for outbound messages.
                      id:
                        type: string
                        description: WhatsApp message id (wamid for Cloud API).
                  message:
                    type: object
                    description: >-
                      Rendered message content. Templates are stored as a
                      conversation preview marked with the template name.
                    properties:
                      conversation:
                        type: string
                        description: Template preview text in the form ▶️<template_name>◀️.
                  messageType:
                    type: string
                    description: Content type; templates render as 'conversation'.
                  messageTimestamp:
                    type: integer
                    description: Unix timestamp (seconds) when the message was accepted.
                  instanceId:
                    type: string
                    description: Instance UUID that sent the message.
                  webhookUrl:
                    type:
                      - string
                      - 'null'
                    description: Webhook URL configured for this instance (may be null).
                  status:
                    type: string
                    description: Delivery status.
                    enum:
                      - ERROR
                      - PENDING
                      - SERVER_ACK
                      - DELIVERY_ACK
                      - READ
                      - PLAYED
                  source:
                    type: string
                    description: Origin device; 'unknown' for Cloud API sends.
              example:
                key:
                  remoteJid: 5511999999999@s.whatsapp.net
                  fromMe: true
                  id: >-
                    wamid.HBgLNTUxMTk5OTk5OTk5FQIAERgSN0EyN0M4N0E4RjBBQkNEMTIzAA==
                message:
                  conversation: ▶️order_confirmation◀️
                messageType: conversation
                messageTimestamp: 1720483200
                instanceId: a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d
                webhookUrl: null
                status: PENDING
                source: unknown
        default:
          description: Erro — erro do provedor ou da camada.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  error:
                    type: string
                  message:
                    type: string
                  response:
                    type: object
              example:
                status: 400
                error: Bad Request
                message: Invalid payload
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: apikey
      description: >-
        Your Pilot Status API key (ps_...). Evolution GO also accepts
        `Authorization: Bearer <key>`.

````