Send Media message using URL
Last updated
Last updated
This endpoint sends a media message to a phone number on WhatsApp.
Please note: We can only send a media message if the recipient has initiated the conversation.
URL:​ ​https://waapi.pepipost.com/api/v2/message/
Method: POST
This id in response is message id for future response. All the message status updates on webhook will be mapped to this id. So store this message id at your side.
According to error code and message will change.
Parameter
Description
Data Type
Required
recipient_whatsapp
Recipient’s phone number. Must be a valid number. Phone number must include a country code otherwise message might not get delivered.
String
Yes
recipient_type
Indicate whether the recipient is an individual
or a group
.
Specifying recipient_type
in the request is optional when the value is individual
. However, recipient_type
is required when using group
.
String
No
message_type
Pass media
as the type of the message.
String
Yes
source
Source id of the origin. Source id must be valid and obtained from source creation API.
String
No
attachment_url
The URL where the media is hosted
String
Yes​
attachment_type
Indicate the type of media being shown to the recipient.
Allowed values : image
video
audio
document
sticker
String
Yes
caption
The caption to be given for attachment
String
No
x-apiheader
Any custom data which user needs to send. ​ X-apiheader can be used instead of message id for mapping messages.
String
No