Skip to main content
POST
Send message

Authorizations

x-api-key
string
header
required

Your ps_ API key

Body

application/json
templateId
string

Template id or name (mutually exclusive with text).

Example:

"boas_vindas"

text
string

Free-form text (mutually exclusive with templateId).

Example:

"Olá! Sua entrega chegou."

destinationNumber
string

Destination (exactly one). Accepts an E.164 phone OR a BSUID — the contact's durable userId (e.g. BR.13491208655302741918), returned by GET /api/v1/conversations. Use the BSUID to reply to contacts using a WhatsApp username (no phone). One-tap/zero-tap/copy-code authentication templates require a phone number.

Example:

"5511988887777"

groupId
string

Group JID. NOT_SUPPORTED_FOR_META.

Example:

"123456789-987654321@g.us"

newsletterId
string

Channel/newsletter JID. NOT_SUPPORTED_FOR_META.

Example:

"120363000000000000@newsletter"

variables
object

Template variables (default {}).

Example:
media
string

Public http(s) URL OR base64 data URI (e.g. data:audio/ogg;base64,AAAA…). Base64 works on Meta Cloud API and Evolution v2; on Evolution GO use a public http(s) URL (GO does not accept base64). Used in template mode or in direct-media mode (media + mediaType, without templateId and without text).

Example:

"https://cdn.acme.com/img.png"

mediaType
enum<string>

Media type. In direct-media mode (no templateId/text) send media + mediaType: optional caption for image/video/document (not for audio/voice); buttons/header/footer/variables not allowed. "audio" delivers as a voice note (PTT) without waveform; "voice" delivers as a voice note with waveform visualization (Meta renders the "ondinha" when voice: true). Both are normalised server-side (OGG/Opus mono, stripped metadata, zero start-time). On Evolution v2 and GO a "recording audio" presence indicator is shown before the voice note. "sticker" sends a WhatsApp sticker: direct-media mode only (never with templateId), no caption, and the file must be image/webp at exactly 512x512 pixels — static up to 100 KB, animated up to 500 KB. Any other dimension is rejected by WhatsApp (Meta error 131053, META_MEDIA_UPLOAD_ERROR) after this API has already answered 202. On Meta Cloud API the sticker is uploaded and sent as type "sticker"; on Evolution v2 and GO it goes through each server's dedicated sticker route.

Available options:
image,
video,
document,
audio,
voice,
sticker
Example:

"image"

mediaFilename
string

Filename the document arrives with in WhatsApp. Direct document sends only (requires mediaType: document). When omitted the name falls back to the URL basename. Path separators are stripped. Rejected with 400 when sent without media, on a template send, or with any mediaType other than document.

Example:

"Nota Fiscal 123.pdf"

caption
string

Caption that travels with a direct media send. Allowed for image, video and document; rejected with 400 for audio, voice and sticker (a voice note and a sticker carry no text). Max 1024 characters. Not used in template mode — there the text comes from the template body.

Example:

"Here is your receipt"

buttons
object[]

Up to 3 interactive buttons. Each item has type + displayText plus one type-specific field.

  • reply — quick-reply button; works on free-form and template sends. Set id (your own value; not echoed back on tap — match replies by label + quotedMessageId).
  • url — opens a link; set url (https). On free-form sends at most one URL button per message, and it may be combined with reply buttons.
  • call — dials a number; set phoneNumber (E.164, e.g. +5511999999999). Template sends only — rejected with 400 (BUTTON_PHONE_NUMBER_TEMPLATE_ONLY) on free-form.
  • copy — copies a code; set copyCode. Template sends only — rejected with 400 (BUTTON_COPY_CODE_TEMPLATE_ONLY) on free-form.

On a template send, buttons override the template's own buttons.

Example:
list
object

Interactive single-select list — a button that opens a menu of up to 10 rows. Requires text (the message body above the button); mutually exclusive with templateId, buttons and direct media. Works on both number types with the same request: Meta Cloud API numbers send the official interactive list, unofficial (Pilot Status web) numbers send the native list. The recipient's selection arrives as a normal inbound message/webhook.

Example:

Session carousel — a horizontal, swipeable row of 2–10 cards attached to a free-form send. Requires text (the message body shown above the cards); mutually exclusive with templateId, list, buttons and direct media, and a header is not allowed (each card carries its own media). Works on both number types: Meta Cloud API numbers send it only inside the 24-hour service window (outside it, use an approved template carousel); unofficial (Pilot Status web) numbers send it ad-hoc. Session-carousel buttons are QUICK_REPLY only on Meta (a URL button there requires an approved template carousel); on unofficial numbers a URL button also works ad-hoc. A card's quick-reply tap arrives as a normal inbound webhook.

Example:
header
object

Header for a free-form interactive message. Requires buttons. type is text (up to 60 chars in content) or image / video / document (public URL in content).

Example:

Message footer (max 60 characters). Requires buttons.

deliverAt
string

Schedule delivery for a future time.

Example:

"2026-06-21T09:00:00Z"

deliverUntil
string

Maximum delivery window.

Example:

"2026-06-21T18:00:00Z"

labels
string[]

Labels to apply to the destination conversation.

Example:

Response

Send template