Skip to main content
Access messages through a BusinessAccount object or directly via the client.

Check the 24h conversation window

Before sending a free-form message (text, image, video, etc.), check whether the conversation window is open. The window opens when the contact sends you an inbound message and expires 24 hours later.
Get detailed window info (last inbound timestamp, expiration):
Outside the 24h window, Meta only allows template messages. Free-form messages (text, media) will be rejected. Always check the window before sending non-template messages.

Send a text message

Send a template message

Send media messages

Within the 24-hour conversation window, you can send images, videos, audio, and documents by URL:
Media URLs must be publicly accessible. Meta downloads the file once and delivers it natively in the recipient’s WhatsApp chat. Supported formats: JPEG/PNG (image), MP4 (video), OGG/MP3 (audio), PDF/DOCX (document).
Meta file size limits: Image: 5 MB — Video: 16 MB — Audio: 16 MB — Document: 100 MB. Files exceeding these limits will be rejected by Meta.

Send interactive buttons

Send a message with up to 3 reply buttons. The recipient taps a button and you receive the response via webhook.
When the recipient taps a button, you receive a webhook message.received with:
  • message_type: "interactive"
  • message_metadata.interactive_type: "button_reply"
  • message_metadata.id: the button ID (e.g. "confirm")
  • message_metadata.title: the button label (e.g. "Yes, confirm")
Limits: Max 3 buttons per message. Button titles max 20 characters. Interactive messages require an open 24h conversation window (no template fallback).

Using the messages resource directly

List messages

Only returns the last 100 messages, ordered newest first.

Retrieve a message

Message attributes

Status helpers