messages

Envia mensagem WhatsApp (template, texto, interativa, localização ou reação)

Aceita exatamente um tipo de payload por request: templateName, body, interactive, location ou reaction. Retorna 202 Accepted com o ID interno; o status real chega via webhook.

post/v1/messages

Request body

receiverstring required

Número E.164 do destinatário.

senderstring nullable

Número remetente (opcional; usa default da org).

type'template' | 'text' | 'interactive' | 'location' | 'reaction' nullable

Tipo explícito. Quando omitido, infere de outros campos.

templateNamestring nullable
templateVariablesstring[] nullable

Lista posicional de variáveis (aceita alias variables).

smartLinkParamstring nullable
smartLinkUrlstring nullable
bodystring nullable

Texto livre (apenas em janela 24h aberta).

replyTostring nullable

internalId da mensagem original sendo respondida.

scheduled_atstring date-time nullable
mode'LIVE' nullable
media_urlstring nullable

DEPRECATED — use variables posicionalmente (header na primeira posição).

Example request

{
  "receiver": "+5511999998888"
}

Response

Mensagem aceita pra envio

idstring nullable
status'PENDING' | 'SCHEDULED' | 'PROCESSING' | 'SENT' | 'DELIVERED' | 'READ' | 'FAILED' | 'CANCELED' required
mode'LIVE' required
senderstring required
receiverstring required
bodystring nullable
costnumber float nullable

Example response

{
  "status": "SENT"
}

Changes

Changed in 2 of the 4 revisions of this API.51026

  • 174c89e36a13181See the full diff
    • removed the enum value TEST of the request property mode

      request-property-enum-value-removed

    • added the new CANCELED enum value to the status response property for the response status 202

      response-property-enum-value-added

    • added the new DELIVERED enum value to the status response property for the response status 202

      response-property-enum-value-added

    • added the new FAILED enum value to the status response property for the response status 202

      response-property-enum-value-added

    • added the new PENDING enum value to the status response property for the response status 202

      response-property-enum-value-added

    • added the new PROCESSING enum value to the status response property for the response status 202

      response-property-enum-value-added

    • added the new READ enum value to the status response property for the response status 202

      response-property-enum-value-added

    • added the new SCHEDULED enum value to the status response property for the response status 202

      response-property-enum-value-added

    • added the new SENT enum value to the status response property for the response status 202

      response-property-enum-value-added

    • removed the TEST enum value from the mode response property for the response status 202

      response-property-enum-value-removed

  • 4e426b85f7844225See the full diff
    • the response property body became nullable for the status 202

      response-property-became-nullable

    • the response property cost became nullable for the status 202

      response-property-became-nullable

    • the response property id became nullable for the status 202

      response-property-became-nullable

    • the cost response's property type/format changed from number/decimal to number/float for status 202

      response-property-type-changed

    • deleted the header request parameter Idempotency-Key

      request-parameter-removed

    • removed the request property channel

      request-property-removed

    • api tag messages added

      api-tag-added

    • api tag Messages removed

      api-tag-removed

    • added the new optional request property interactive

      new-optional-request-property

    • added the new optional request property location

      new-optional-request-property

    • added the new optional request property media_url

      new-optional-request-property

    • added the new optional request property reaction

      new-optional-request-property

    • added the new optional request property replyTo

      new-optional-request-property

    • added the new optional request property sender

      new-optional-request-property

    • added the new optional request property type

      new-optional-request-property

    • the request property body became nullable

      request-property-became-nullable

    • the request property mode became nullable

      request-property-became-nullable

    • the request property scheduled_at became nullable

      request-property-became-nullable

    • the request property smartLinkParam became nullable

      request-property-became-nullable

    • the request property smartLinkUrl became nullable

      request-property-became-nullable

    • the request property templateName became nullable

      request-property-became-nullable

    • the request property templateVariables became nullable

      request-property-became-nullable

    • added the media type application/json for the response with the status 400

      response-media-type-added

    • added the media type application/json for the response with the status 401

      response-media-type-added

    • added the media type application/json for the response with the status 403

      response-media-type-added

    • added the non-success response with the status 422

      response-non-success-status-added

    • added the non-success response with the status 429

      response-non-success-status-added

    • the response property mode became required for the status 202

      response-property-became-required

    • the response property receiver became required for the status 202

      response-property-became-required

    • the response property sender became required for the status 202

      response-property-became-required

    • the response property status became required for the status 202

      response-property-became-required

    This revision also has 24 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog