Contents
On this page

List A/B Tests - Plugixa Chat

GET /plugixa-chat/v1/experiments

List the A/B tests 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/experiments

Query parameters

The list parameters every paged list accepts. search matches the name. orderby accepts id, name, status, created_at and started_at.

Responses

200 OK. data is one page of tests.

{
  "success": true,
  "data": [
    {
      "id": 7,
      "name": "Green button or blue button",
      "widget_a": 2,
      "widget_b": 5,
      "split": 50,
      "status": "draft",
      "started_at": null,
      "ended_at": null,
      "winner_id": 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 test, shaped as in Get A/B Test
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/experiments" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-chat/v1/experiments');
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/experiments', {
  headers: {
    'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
  },
});
const { data } = await response.json();

Quick Links

Share