Contents
List Agents - Plugixa Chat
GET /plugixa-chat/v1/agents
List the people visitors can reach through the widget PRO, one page at a time.
Needs Plugixa Chat Pro. The signed-in user needs the plugixa_chat_view capability. Administrators have it.
Request
GET https://your-site.example/wp-json/plugixa-chat/v1/agents?search=sales
Query parameters
The list parameters every paged list accepts. search matches the name, the role and the value. orderby accepts id, name, sort_order and created_at.
Responses
200 OK. data is one page of agents.
{
"success": true,
"data": [
{
"id": 4,
"name": "Sara",
"role": "Sales",
"photo": null,
"slug": "whatsapp",
"value": "+15550001234",
"message": "Hi Sara, I have a question",
"hours": [
"1:540-1080",
"2:540-1080"
],
"widget_id": 0,
"is_active": true,
"sort_order": 0,
"deleted_at": null,
"created_at": "2026-11-12 09:30:00",
"modified_at": "2026-11-12 09:30:00",
"created_by": "1",
"modified_by": "1"
}
],
"meta": {
"total": 1,
"pages": 1
}
}
| Field | Type | Meaning |
|---|---|---|
data[] |
object |
A agent, shaped as in Get Agent |
meta.total |
integer |
Matching rows, before paging |
meta.pages |
integer |
Number of pages at this per_page |
Errors
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-chat/v1/agents?search=sales" \
-u "admin:$WP_APP_PASSWORD"
<?php
$query = http_build_query([
'search' => 'sales',
]);
$ch = curl_init('https://your-site.example/wp-json/plugixa-chat/v1/agents?' . $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({ search: 'sales' });
const response = await fetch(`https://your-site.example/wp-json/plugixa-chat/v1/agents?${query}`, {
headers: {
'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
},
});
const { data } = await response.json();
Quick Links
Share