Contents
List Leads - Plugixa Chat
GET /plugixa-chat/v1/leads
List the messages sent through the contact form, one page at a time.
The signed-in user needs the plugixa_chat_view capability. Administrators have it.
Leads are read-only. They are created only by the contact form, through Submit Lead.
POST /leadsis refused with405plugixa_chat_leads_read_only.
Privacy. A lead carries a name, an e-mail address and a phone number. Anyone who holds
plugixa_chat_viewcan read them. The stored IP value is never returned.
Request
GET https://your-site.example/wp-json/plugixa-chat/v1/leads?status=new&widget_id=2
Query parameters
| Name | Type | Default | Description |
|---|---|---|---|
status |
string |
new or read. Empty for both. |
|
widget_id |
integer |
Leads from this widget only. |
Plus the list parameters every paged list accepts. search matches the name, e-mail, phone and message. orderby accepts id, created_at, modified_at, name, email and status.
Responses
200 OK. data is one page of leads.
{
"success": true,
"data": [
{
"id": 41,
"widget_id": 2,
"channel_slug": "contact_form",
"name": "Jane Doe",
"email": "jane@example.com",
"phone": "",
"message": "Do you ship to Canada?",
"consent": true,
"subscribed": false,
"page_url": "https://your-site.example/shop/",
"status": "new",
"deleted_at": null,
"created_at": "2026-11-12 09:30:00",
"modified_at": "2026-11-12 09:30:00",
"created_by": "0",
"modified_by": "0",
"widget_name": "Main widget",
"created_label": "2026-11-12 10:30"
}
],
"meta": {
"total": 3,
"pages": 1
}
}
| Field | Type | Meaning |
|---|---|---|
data[] |
object |
A lead, shaped as in Get Lead |
meta.total |
integer |
Leads matching the filters, before paging |
meta.pages |
integer |
Number of pages at this per_page |
Errors
| Status | Code | When |
|---|---|---|
400 |
rest_invalid_param |
status is not new, read or empty. |
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-chat/v1/leads?status=new&widget_id=2" \
-u "admin:$WP_APP_PASSWORD"
<?php
$query = http_build_query([
'status' => 'new',
'widget_id' => 2,
]);
$ch = curl_init('https://your-site.example/wp-json/plugixa-chat/v1/leads?' . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const query = new URLSearchParams({ status: 'new', widget_id: '2' });
const response = await fetch(`https://your-site.example/wp-json/plugixa-chat/v1/leads?${query}`, {
headers: {
'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
},
});
const { data } = await response.json();
Quick Links
Share