Contents
On this page

Update Lead - Plugixa CRM

PUT /plugixa-crm/v1/leads/{id}

Change some of a lead’s fields. Only the fields you send change. PATCH works the same way.

Any user with access to Plugixa CRM. With Plugixa CRM Pro roles, the user’s role must also allow editing this lead.

status: converted is silently ignored on update: the status keeps its current value and the call succeeds. Converting goes through Convert Lead.

Note. A converted lead is read-only: every update is refused with 409.

Request

PUT https://your-site.example/wp-json/plugixa-crm/v1/leads/22

Path parameters

Name Type Description
id integer The lead’s id

Request body

Content type: application/json

Field Type Required Description
first_name string No First name.
last_name string No Last name. full_name is made from both.
account_name string No The company, as free text.
salutation string No Free text.
title string No Job title.
email string No An e-mail address. A value that is not one is stored empty.
phone string No Free text.
website string No A URL. A value without a scheme gets http:// in front.
industry string No Free text.
source string No Where the lead came from, free text, for example web_site.
status string No new, assigned, in_process, recycled or dead. Anything else is stored as new.
score integer No 0 to 100. Values outside are clamped.
opportunity_amount number No The expected deal value. Negative values become 0.
opportunity_currency string No Three letters, upper-cased for you. Sent empty, it becomes USD.
do_not_call boolean No Defaults to false.
address_street string No Postal address.
address_city string No Postal address.
address_state string No Postal address.
address_postal_code string No Postal address.
address_country string No Postal address.
description string No HTML. Tags not allowed in post content are stripped.
assigned_user_id integer No The WordPress user who owns the lead. 0 or nothing means none.
modified_at string No The modified_at you read. When sent, the update is refused if the lead changed since: see Avoiding lost updates.

A field you leave out keeps its value. full_name is rebuilt when either name changes.

{
  "status": "in_process",
  "score": 70
}

Responses

200 OK. data is the updated lead.

{
  "success": true,
  "data": {
    "id": 22,
    "salutation": "",
    "first_name": "Ada",
    "last_name": "Lovelace",
    "full_name": "Ada Lovelace",
    "account_name": "Analytical Engines Ltd",
    "title": "CTO",
    "email": "ada@analytical.example",
    "phone": "",
    "website": "https://analytical.example",
    "status": "in_process",
    "source": "web_site",
    "industry": "Software",
    "score": 70,
    "opportunity_amount": 12000,
    "opportunity_currency": "EUR",
    "address_city": "London",
    "address_country": "United Kingdom",
    "description": "",
    "converted_at": null,
    "converted_account_id": null,
    "converted_contact_id": null,
    "converted_opportunity_id": null,
    "assigned_user_id": 3,
    "created_by": "1",
    "modified_by": "1",
    "created_at": "2026-11-12 09:30:00",
    "modified_at": "2026-11-12 10:15:00",
    "deleted_at": null,
    "do_not_call": "0",
    "address_street": "",
    "address_state": "",
    "address_postal_code": ""
  }
}
Field Type Meaning
data.id integer The lead’s id
data.status string new, assigned, in_process, converted, recycled or dead
data.score integer 0 to 100
data.modified_at string UTC datetime of this change

Errors

Status Code When
404 plugixa_crm_not_found No lead with that id, or it is in the trash.
409 plugixa_crm_lead_converted The lead has been converted.
409 plugixa_crm_conflict You sent modified_at and the lead changed since.

Plus the errors every endpoint can return.

Examples

curl -s -X PUT "https://your-site.example/wp-json/plugixa-crm/v1/leads/22" \
  -u "admin:$WP_APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"status":"in_process","score":70}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-crm/v1/leads/22');
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([
        'status' => 'in_process',
        'score'  => 70,
    ]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const auth = 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`);
const response = await fetch('https://your-site.example/wp-json/plugixa-crm/v1/leads/22', {
  method: 'PUT',
  headers: {
    'Authorization': auth,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ status: 'in_process', score: 70 }),
});
const { data } = await response.json();

Quick Links

Share