Skip to main content

List WABA Conversations Programmatically

Agent Skill

Automate this endpoint with an AI agent using the 2chat-whatsapp-waba skill:

npx skills add 2ChatCo/agent-skills -s 2chat-whatsapp-waba

This endpoint lists the conversations of one of your WhatsApp Business API numbers β€” each contact together with the state of its latest activity β€” most recently active first.

Endpoint​

GET https://api.p.2chat.io/open/waba/conversations/{channel_uuid}

Authentication​

Include your API key in the X-User-API-Key header. Learn more about authentication.

Parameters​

ParameterInRequiredDescription
channel_uuidpathYesThe WAN… UUID of your WABA number (e.g. WAN95841312-b54d-46e3-b0bc-6414f4a5296b)
page_numberqueryNoZero-based page. Defaults to 0
results_per_pagequeryNoConversations per page, between 1 and 200. Defaults to 10
phone_numberqueryNoNarrows the list to contacts whose number contains this value. Between 3 and 20 digits
info

You need the UUID of the channel first. Get it from Get Numbers.

Paging​

page_number is zero-based and results_per_page decides how many conversations each one holds, defaulting to 10:

  • Page 0, the most recently active: https://api.p.2chat.io/open/waba/conversations/WAN95841312-b54d-46e3-b0bc-6414f4a5296b
  • Page 1, the 10 before those: https://api.p.2chat.io/open/waba/conversations/WAN95841312-b54d-46e3-b0bc-6414f4a5296b?page_number=1
  • 100 at a time: https://api.p.2chat.io/open/waba/conversations/WAN95841312-b54d-46e3-b0bc-6414f4a5296b?results_per_page=100
Searching by number

?phone_number=123456 returns the conversations whose contact number contains 123456. The value you searched for comes back as search_term.

Invocation​

curl --location --request GET 'https://api.p.2chat.io/open/waba/conversations/WAN95841312-b54d-46e3-b0bc-6414f4a5296b?page_number=0' \
--header 'X-User-API-Key: your_api_key_here'

Response​

Success (HTTP 200 OK)​

{
"success": true,
"page_number": 0,
"results_per_page": 10,
"total": 2,
"sessions": [
{
"session_key": "WA-WAN95841312-b54d-46e3-b0bc-6414f4a5296b-5215512345432",
"friendly_name": "Ana",
"region_name": "Mexico City, FD",
"iso_country_code": "MX",
"device": null,
"channel_uuid": "WAN95841312-b54d-46e3-b0bc-6414f4a5296b",
"phone_number": "+5215512345432",
"timezone": "America/Mexico_City",
"profile_pic_url": null,
"is_group_chat": false,
"last_user_message_sent_at": "2026-09-20T14:03:11Z",
"last_activity_at": "2026-09-20T14:05:48Z",
"created_at": "2026-08-14T09:21:07Z",
"contact": {
"id": 4471,
"uuid": "CONe6226cd2-cb09-491f-9854-8a9b0626406a",
"first_name": "Ana",
"last_name": "Duarte",
"channel_uuid": null,
"profile_pic_url": null
}
},
{
"session_key": "WA-WAN95841312-b54d-46e3-b0bc-6414f4a5296b-17131234567",
"friendly_name": null,
"region_name": "Houston, TX",
"iso_country_code": "US",
"device": null,
"channel_uuid": "WAN95841312-b54d-46e3-b0bc-6414f4a5296b",
"phone_number": "+17131234567",
"timezone": "America/Chicago",
"profile_pic_url": null,
"is_group_chat": false,
"last_user_message_sent_at": null,
"last_activity_at": "2026-09-18T22:40:19Z",
"created_at": "2026-09-18T22:39:55Z"
}
]
}
FieldDescription
successtrue when the request was successful
page_numberThe page you asked for, echoed back
results_per_pageThe page size in effect, echoed back
totalHow many conversations matched, within the 1000-conversation window described above
search_termPresent only when you passed phone_number; the value that was searched
sessionsThe page of conversations, most recently active first
sessions[].session_keyThe conversation's key. Pass it to Get a Message
sessions[].friendly_nameThe contact's WhatsApp display name, when known
sessions[].phone_numberThe contact's phone number
sessions[].region_nameRegion the number is registered in, when known
sessions[].iso_country_codeCountry of the number
sessions[].timezoneTimezone of the number
sessions[].channel_uuidYour WABA channel the conversation belongs to
sessions[].profile_pic_urlThe contact's profile picture, when available
sessions[].is_group_chatAlways false on WABA β€” the Cloud API has no group messaging
sessions[].last_user_message_sent_atWhen the contact last wrote to you, UTC
sessions[].last_activity_atWhen the conversation last had any activity, UTC
sessions[].created_atWhen the conversation started, UTC
sessions[].contactThe matching 2Chat contact, when the number is in your contacts

Error​

{
"error": true,
"error_message": "WhatsApp Profile setup not found"
}
HTTPWhen
400The page starts at or past the end of the 1000-conversation window
404The channel is not a WABA number of your account
422channel_uuid is not a WAN… UUID, page_number is negative, or results_per_page is outside 1–200