Contents
On this page

Update Case - Plugixa CRM

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

Change some of a case’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 case.

closed_at is in the site’s time zone, not UTC like created_at and modified_at.

Request

PUT https://your-site.example/wp-json/plugixa-crm/v1/cases/42

Path parameters

Name Type Description
id integer The case’s id

Request body

Content type: application/json

Field Type Required Description
name string No Must not be blank when sent.
description string No HTML. Tags not allowed in post content are stripped.
status string No new, assigned, pending, closed, rejected or duplicate.
priority string No low, normal, high or urgent.
type string No question, incident or problem.
account_id integer No The account. Not checked.
contact_id integer No The main contact. Not checked.
lead_id integer No A lead. Not checked.
contacts array No Contact ids involved in the case. Replaces the whole list.
is_internal boolean No Defaults to false.
assigned_user_id integer No The WordPress user who owns the case. 0 means none.
modified_at string No The modified_at you read. When sent, the update is refused if the case changed since: see Avoiding lost updates.

Moving to a closing status stamps closed_at; moving back to an open one clears it.

{
  "status": "closed"
}

Responses

200 OK. data is the updated case.

{
  "success": true,
  "data": {
    "id": 42,
    "name": "Invoice shows the wrong VAT number",
    "status": "closed",
    "priority": "high",
    "type": "problem",
    "description": "<p>The October invoice carries the old VAT number.</p>",
    "account_id": 12,
    "contact_id": 31,
    "lead_id": null,
    "is_internal": false,
    "closed_at": "2026-11-12 11:15:00",
    "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,
    "number": "C-00042",
    "number_value": 42,
    "is_closed": true,
    "account_name": "Northwind Traders",
    "contact_name": "Maria Anders",
    "assigned_user_name": "Jordan Lee",
    "contacts": [
      31
    ]
  }
}
Field Type Meaning
data.status string new, assigned, pending, closed, rejected or duplicate
data.is_closed boolean true for closed, rejected and duplicate
data.closed_at string|null When the case was closed, in the site’s time zone

Errors

Status Code When
404 plugixa_crm_not_found No case with that id, or it is in the trash.
422 plugixa_crm_invalid_name name is sent blank.
422 plugixa_crm_invalid_status status is not a case status.
422 plugixa_crm_invalid_priority priority is not a priority.
422 plugixa_crm_invalid_type type is not a case type.
409 plugixa_crm_conflict You sent modified_at and the case changed since.

Plus the errors every endpoint can return.

Examples

curl -s -X PUT "https://your-site.example/wp-json/plugixa-crm/v1/cases/42" \
  -u "admin:$WP_APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"status":"closed"}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-crm/v1/cases/42');
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' => 'closed',
    ]),
]);
$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/cases/42', {
  method: 'PUT',
  headers: {
    'Authorization': auth,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ status: 'closed' }),
});
const { data } = await response.json();

Quick Links

Share