Contents
On this page

Update Webhook - Plugixa Chat

PUT /plugixa-chat/v1/webhooks/{id}

Replace a webhook’s address, events, name and switch. PUT and PATCH behave the same. The signing secret is kept.

Needs Plugixa Chat Pro. The signed-in user needs the plugixa_chat_edit capability. Administrators have it.

Note. This is a full replace, even with PATCH: url and events are required every time, a missing name is cleared, and a missing is_active switches the webhook off.

Request

PUT https://your-site.example/wp-json/plugixa-chat/v1/webhooks/3

Path parameters

Name Type Description
id integer The webhook’s id

Request body

Content type: application/json

Field Type Required Description
url string Yes An http or https address this site can reach. Local and private addresses are refused.
events array Yes At least one known event. Only lead.created exists in 1.0.0; unknown names are dropped.
name string No Your label for it. Up to 191 characters.
is_active boolean No Whether deliveries are sent. Left out, the webhook is saved switched off.
{
  "name": "Zapier",
  "url": "https://hooks.zapier.com/hooks/catch/123/abc/",
  "events": [
    "lead.created"
  ],
  "is_active": true
}

Responses

200 OK. data is the updated webhook.

{
  "success": true,
  "data": {
    "id": 3,
    "name": "Zapier",
    "url": "https://hooks.zapier.com/hooks/catch/123/abc/",
    "events": [
      "lead.created"
    ],
    "is_active": true,
    "last_status": 0,
    "last_error": "",
    "last_sent_at": null,
    "failures": 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 webhook’s id
data.url string Where deliveries are posted
data.events array The events it receives. Only lead.created exists in 1.0.0
data.is_active boolean Whether deliveries are sent

Errors

Status Code When
404 plugixa_chat_webhook_missing No webhook has this id, or it is in the trash.
400 plugixa_chat_webhook_url url is missing, not http or https, or points at a local or private address.
400 plugixa_chat_webhook_events events has no known event.

Plus the errors every endpoint can return.

Examples

curl -s -X PUT "https://your-site.example/wp-json/plugixa-chat/v1/webhooks/3" \
  -u "admin:$WP_APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"name":"Zapier","url":"https://hooks.zapier.com/hooks/catch/123/abc/","events":["lead.created"],"is_active":true}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-chat/v1/webhooks/3');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST  => 'PUT',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'admin:' . getenv('WP_APP_PASSWORD'),
    CURLOPT_HTTPHEADER     => [
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS     => json_encode([
        'name'      => 'Zapier',
        'url'       => 'https://hooks.zapier.com/hooks/catch/123/abc/',
        'events'    => ['lead.created'],
        'is_active' => true,
    ]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-chat/v1/webhooks/3', {
  method: 'PUT',
  headers: {
    'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ name: 'Zapier', url: 'https://hooks.zapier.com/hooks/catch/123/abc/', events: ['lead.created'], is_active: true }),
});
const { data } = await response.json();

Quick Links

Share