Contents
On this page

Get Lead - Plugixa Chat

GET /plugixa-chat/v1/leads/{id}

Read one lead.

The signed-in user needs the plugixa_chat_view capability. Administrators have it.

Note. Reading a lead does not mark it as read. Use Update Lead for that.

Request

GET https://your-site.example/wp-json/plugixa-chat/v1/leads/41

Path parameters

Name Type Description
id integer The lead’s id

Responses

200 OK. data is the lead.

{
  "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"
  }
}
Field Type Meaning
data.id integer The lead’s id
data.widget_id integer The widget whose form it came from
data.widget_name string That widget’s name. Empty if the widget was purged
data.channel_slug string Always contact_form
data.name, data.email, data.phone, data.message string What the visitor typed. Empty for a field the form did not show
data.consent boolean Whether the consent box was ticked
data.subscribed boolean Whether the newsletter box was ticked
data.page_url string The page the form was sent from, kept only when it is on this site
data.status string new or read
data.created_at string UTC datetime
data.created_label string The same moment in the site’s timezone, in the plugin’s date and time format
data.created_by string "0": leads come from visitors
data.deleted_at string|null null unless the lead is in the trash

Answers to custom form fields PRO are read with Lead Answers.

Errors

Status Code When
404 plugixa_chat_not_found No lead 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/leads/41" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-chat/v1/leads/41');
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/leads/41', {
  headers: {
    'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
  },
});
const { data } = await response.json();

Quick Links

Share