Contents
On this page
List Widgets - Plugixa Chat
GET /plugixa-chat/v1/widgets
List the widgets on the site, one page at a time, each with its channels and rules.
The signed-in user needs the plugixa_chat_view capability. Administrators have it.
Request
GET https://your-site.example/wp-json/plugixa-chat/v1/widgets?search=main
Query parameters
The list parameters every paged list accepts. search matches the widget name. orderby accepts id, name, status, sort_order, created_at and modified_at.
Responses
200 OK. data is one page of widgets.
{
"success": true,
"data": [
{
"id": 2,
"name": "Main widget",
"status": "active",
"appearance": {
"position": "right",
"layout": "vertical",
"animation": "none",
"trigger": "click",
"size": 56,
"offset_x": 24,
"offset_y": 24,
"color": "#0f766e",
"icon_color": "#ffffff",
"cta": "",
"label": "",
"icon": null,
"badge": 0,
"show_delay": 0,
"show_scroll": 0,
"show_exit": false
},
"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",
"channels": [
{
"id": 31,
"widget_id": 2,
"slug": "whatsapp",
"label": "",
"value": "+15550001234",
"message": "Hi! I'm on {title}",
"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",
"color": "#25d366",
"new_tab": false,
"devices": "all",
"icon": null,
"hover": "",
"qr": false,
"settings": []
}
],
"rules": [
{
"id": 8,
"widget_id": 2,
"kind": "url",
"mode": "hide",
"operator": "contains",
"value": "[\"\\/checkout\"]",
"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",
"values": [
"/checkout"
]
}
],
"channel_count": 1
}
],
"meta": {
"total": 1,
"pages": 1,
"limit": 0,
"used": 1
}
}
| Field | Type | Meaning |
|---|---|---|
data[] |
object |
A widget, shaped as in Get Widget |
meta.total |
integer |
Widgets matching the search, before paging |
meta.pages |
integer |
Number of pages at this per_page |
meta.limit |
integer |
How many widgets the site may have. 0 means no limit, the default |
meta.used |
integer |
Widgets that are not in the trash |
A ceiling exists only when a developer sets one with the plugixa_chat_max_widgets filter.
Errors
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-chat/v1/widgets?search=main" \
-u "admin:$WP_APP_PASSWORD"
<?php
$query = http_build_query([
'search' => 'main',
]);
$ch = curl_init('https://your-site.example/wp-json/plugixa-chat/v1/widgets?' . $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: 'main' });
const response = await fetch(`https://your-site.example/wp-json/plugixa-chat/v1/widgets?${query}`, {
headers: {
'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
},
});
const { data } = await response.json();
Quick Links
Share