# UPDATE Cases

### PUT /`api/v1/cases/:uuid`

Updates an existing case identified by UUID.

#### Path Params

| Name   | Type     | Required | Description             |
| ------ | -------- | -------- | ----------------------- |
| `uuid` | `string` | **Yes**  | UUID of case to update. |

#### Body Params

Only these fields are accepted (unknown fields return `400`):

| Name               | Type      | Required | Validation / Notes                                  |
| ------------------ | --------- | -------- | --------------------------------------------------- |
| `case_name`        | `string`  | No       | Max `255`, cannot contain \`+ < > : " / \\          |
| `case_number`      | `string`  | No       | Max `255`, same character restrictions              |
| `description`      | `string`  | No       | Max `2000`                                          |
| `status`           | `string`  | No       | Max `255`                                           |
| `type`             | `string`  | No       | Max `255`                                           |
| `case_lead_id`     | `integer` | No       | Positive integer                                    |
| `client_id`        | `integer` | No       | Positive integer                                    |
| `case_open_date`   | `string`  | No       | Must be strict `YYYY-MM-DD` and valid calendar date |
| `case_closed_date` | `string`  | No       | Must be strict `YYYY-MM-DD` and valid calendar date |

#### Success Response (200)

```json
{
  "success": true,
  "message": "Case updated successfully",
  "case_id": 123
}
```

#### Error Responses

* `400` validation error:

```json
{
  "message": "Invalid case data",
  "success": false,
  "errors": [
    { "message": "Invalid date format for case_open_date, must be YYYY-MM-DD" }
  ]
}
```

* `400` when UUID does not resolve to a case:

```json
{
  "message": "Case not found",
  "success": false
}
```

* `500` server error:

```json
{
  "message": "Error updating case",
  "success": false
}
```

#### Example

```bash
curl -X PUT "https://<host>/v1/cases/<case-uuid>" \
  -H "Content-Type: application/json" \
  -H "x-api-key: <api-key>" \
  -d '{
    "case_name": "Updated Case Name",
    "description": "Updated synopsis",
    "status": "Closed",
    "type": "Investigation",
    "case_closed_date": "2026-02-25"
  }'
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.monolithforensics.com/monolith/monolith-api/cases-api/update-cases.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
