Get a conversation
One conversation: who owns it, the 24-hour window, whether the customer opted out, and the unread count. Poll it while a person is answering.
Set up WhatsApp first. Connect a WhatsApp number in the dashboard or with Connect numbers. Included on every paid plan. See plans.
conversation_idrequiredcurl -X GET 'https://omnidim.io/api/v1/whatsapp/conversations/{conversation_id}' \ -H 'Authorization: Bearer YOUR_API_KEY'
{ "id": "412-15551234567", "phone_number_id": 0, "customer_phone": "+15551234567", "customer_name": "string", "last_message": { "preview": "string", "type": "string", "sender": "customer", "timestamp": "string", "status": "pending" }, "last_message_at": "string", "unread_count": 0, "message_count": 0, "ownership": { "owner": "person", "paused": false }, "window_open": false, "window_expires_at": "string", "has_failed": false, "opted_out": false, "campaign": { "id": 0, "name": "string" } }
BearerAuthAuthorizationBearer <token>Bearer token authentication. Obtain your API key from the OmniDimension dashboard.
conversation_id*stringA conversation id: the number id, a dash, then the customer's phone
digits, such as 412-919876543210. From
listWhatsappConversations.
Response body
application/jsonThe conversation.
application/jsonid?stringThe conversation id, {number id}-{customer phone digits}.
phone_number_id?integercustomer_phone?stringcustomer_name?stringThe customer's WhatsApp profile name, when set.
last_message?The newest message in the conversation.
last_message_at?stringunread_count?integerCustomer messages you have not read yet.
message_count?integerownership?Who is answering this conversation.
window_open?booleanWhether the 24-hour window is open. Null when the number does not enforce it.
window_expires_at?stringWhen the 24-hour window closes. Null when there is no window.
has_failed?booleanA failed outbound message is newer than the last successful one.
opted_out?booleanThe customer has opted out of messages from this number.
campaign?The broadcast this conversation came from, when it did.
List conversations
A number's inbox, newest activity first. Poll it with updated_since for changes since your last call, or page it with cursor. There are no event webhooks, so polling is how an integration learns about new messages.
Take over a conversation
Take the conversation from the agent, so it stops replying and your team answers. Repeating it changes nothing. Hand it back with handBackWhatsappConversation when the person is done.
