Authorization
apiKey In: query
Path Parameters
Unique identifier of the recipient contact as registered on the Ventia platform.
Request Body
application/json
Exactly one of channelId, userId, or userIntegrationId must be provided. At least one of text, mediaType+mediaUrl, or template must be provided.
ID of a shared channel to send through. Must belong to the authenticated company. The channel's type (unofficial_wpp, whatsapp_business, fb, or ig) determines which provider is invoked. Mutually exclusive with userId and userIntegrationId.
ID of a user whose personal WhatsApp session will send the message. Requires medium to disambiguate between the user's Baileys (unofficial_wpp) and Meta Cloud (whatsapp_business) integrations. Mutually exclusive with channelId and userIntegrationId.
Required when userId is used. Selects which of the user's personal WhatsApp integrations to send through.
"unofficial_wpp" | "whatsapp_business"ID of a specific personal WhatsApp Business integration (Meta Cloud) to send through. Shortcut for userId + medium: "whatsapp_business" when the integration is already known. Mutually exclusive with channelId and userId.
Plain-text body of the message. Required unless mediaType or template is provided.
Type of attached media. When set, mediaUrl is required.
"image" | "audio" | "video" | "file"Publicly accessible URL of the media file. Required when mediaType is set.
uriMIME type of the media file (e.g. image/jpeg, application/pdf). Useful when the URL does not advertise it.
Original filename for media sent as a document.
Optional caption for media messages. Also used as the message body when text is absent.
ID of a pre-approved WhatsApp Business template to send. Only supported on whatsapp_business channels and on personal WhatsApp Business integrations (userId + medium: "whatsapp_business" or userIntegrationId). Requests combining template with unofficial WhatsApp or other media types are rejected.
ID of a prior message this one replies to (when the channel supports quoted replies).
Client-supplied temporary ID echoed back for optimistic UIs. Optional.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.getventia.com/api/v1.0/contact/string/message" \ -H "Content-Type: application/json" \ -d '{ "channelId": "656b0e1f8e5a2c001f3a9d12", "text": "Hi! Just following up on your inquiry." }'{
"success": true,
"interactionId": "66f3a9b11c4d8e0023b7c9a1"
}{
"success": true,
"queued": true
}{
"success": false,
"error": "Invalid request body",
"details": "channelId: Must be a valid ObjectId"
}{
"success": false,
"error": "Invalid API KEY Group"
}{
"success": false,
"error": "Personal WhatsApp session is not online"
}{
"success": false,
"error": "User has no active personal WhatsApp Business integration"
}{
"success": false,
"error": "Internal Server Error",
"details": "string"
}