Send Session Message
POST/v1/messages/send
Sends a session message in an existing conversation (text, media, interactive, replies, and private notes). For media, provide exactly one of fileUrl (public direct media URL) or fileId (existing attachment/canned file id). Multipart file upload is also supported by the API but not shown in this docs renderer. Location messages are not supported.
Body
conversationIdstring•MongoDB ObjectId of the conversation required
Example:60f1234567890abcdef12345
isReplyenum: true | false•Whether this message is a reply. When
true, parentMessageProviderId is required. When false, parentMessageProviderId must not be provided. required Example:false
parentMessageProviderIdstring•Provider id of the parent message when
isReply is true.Example:wamid.HBgN...
referencedMessageIdstring•Optional referenced message id.
Example:60f9999997890abcdef12345
contentstring•Text body of the message.
Example:Hello, how can I help you?
typeenum: text | audio | image | video | document | application | csv | interactive•Message type. For media types, provide
fileUrl or fileId. Location is not supported.Example:image
fileUrlstring (uri)•Public HTTP(S) URL of media to download and send. Must be a direct media file (not an HTML page). Mutually exclusive with
fileId and multipart file.Example:https://example.com/bmw.jpg
fileIdstring•Existing file/attachment id for media messages. Mutually exclusive with
fileUrl and multipart file.Example:60faaaaaa7890abcdef12345
virtualIdstring or null•Optional client-generated id for correlating the outbound message.
Example:client-msg-123
interactiveobject•Interactive payload for WhatsApp list or Instagram quick replies. Location request payloads are not documented/supported for Developer API.
mentionsarray[string]•Optional array of user mention ids.
Example:[]
isPrivateboolean•When true, stores the message as a private note.
Example:false
meta_dataobject•Optional arbitrary metadata.
Responses
Body
success_codeenum: 200 | 201•Numeric success code matching the HTTP response status. required
Example:200
messagestring required
Example:OK
detailsobject required
dataobject required
metaobject