Create message
bearerAuthAuthorizationBearer <token>API key sent as Authorization: Bearer <API_KEY>.
idcontact*stringUnique identifier of the recipient contact as registered on the Ventia platform.
Exactly one of channelId, userId, or userIntegrationId must be provided. At least one of text, mediaType+mediaUrl, or template must be provided.
application/json- body
channelId?stringID 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.
userId?stringID 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.
medium?stringRequired when userId is used. Selects which of the user's personal WhatsApp integrations to send through.
"unofficial_wpp""whatsapp_business"userIntegrationId?stringID 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.
text?stringPlain-text body of the message. Required unless mediaType or template is provided.
mediaType?stringType of attached media. When set, mediaUrl is required.
"image""audio""video""file"mediaUrl?stringPublicly accessible URL of the media file. Required when mediaType is set.
urimimetype?stringMIME type of the media file (e.g. image/jpeg, application/pdf). Useful when the URL does not advertise it.
fileName?stringOriginal filename for media sent as a document.
caption?stringOptional caption for media messages. Also used as the message body when text is absent.
template?stringID 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.
replyMessage?stringID of a prior message this one replies to (when the channel supports quoted replies).
localId?stringClient-supplied temporary ID echoed back for optimistic UIs. Optional.
Message was accepted and delivered to the underlying channel. Returned for WhatsApp (official, unofficial, channel, and personal) sends where the dispatch is synchronous.
application/json- response
success?booleaninteractionId?stringID of the interaction record created for this outgoing message.
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"}