Sending Messages:
- Group Chats: The agent’s phone number must first be added to the group chat before messages can be sent.
- Individual Chats: A user must initiate the conversation with the agent’s phone number before the agent can send messages.
Sending Text Messages
Sending Media Messages
Individual Media Message
To send an image to an individual:Using the Universal Endpoint
You can also use the newer universal endpoint for both text and media messages:Supported Media Types
The API supports these media types:- image: For images (JPG, PNG, etc.)
- video: For video files
- audio: For audio files
- document: For documents (PDF, DOC, etc.)
Important Notes
- The
media_url
must be a publicly accessible URL where the media file can be downloaded. - The
caption
field is optional. You can send media without a caption if desired. - Make sure your media files are in formats supported by WhatsApp.
- There are size limits for different media types:
- Images: Generally up to 5MB
- Videos: Generally up to 16MB
- Audio: Generally up to 16MB
- Documents: Generally up to 100MB
- The
from
number must be a WhatsApp-enabled number that your account has permission to use. - The
to
number for individual messages must be a valid WhatsApp number.
Path Parameters
Account ID
Body
application/json