Contents
On this page
Get Agent - Plugixa Chat
GET /plugixa-chat/v1/agents/{id}
Read one agent.
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/4
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The agent’s id |
Responses
200 OK. data is the agent.
{
"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"
}
}
| Field | Type | Meaning |
|---|---|---|
data.id |
integer |
The agent’s id |
data.name |
string |
The name visitors see |
data.role |
string |
The line under the name |
data.photo |
object|null |
The photo, or null |
data.slug |
string |
The channel this person answers on |
data.value |
string |
Their number, handle or address on that channel |
data.hours |
array |
Opening hours as weekday:start-end, see the request body |
data.widget_id |
integer |
The widget they belong to, 0 for every widget |
data.is_active |
boolean |
Whether they are shown |
data.created_at |
string |
UTC datetime |
data.deleted_at |
string|null |
null unless the agent is in the trash |
Errors
| Status | Code | When |
|---|---|---|
404 |
plugixa_chat_not_found |
No agent has this id, or it is in the trash. |
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-chat/v1/agents/4" \
-u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-chat/v1/agents/4');
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 response = await fetch('https://your-site.example/wp-json/plugixa-chat/v1/agents/4', {
headers: {
'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
},
});
const { data } = await response.json();
Quick Links
Share