> ## Documentation Index
> Fetch the complete documentation index at: https://docs.exowizz.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a record

> Updates an existing record.

Updates a record. The request body is validated against the resource's `updateRules`. The user must be authorized (admin or owner).

## Path parameters

<ParamField path="name" type="string" required>
  The resource name (e.g. `contact`, `order`).
</ParamField>

<ParamField path="id" type="integer" required>
  The record's ID.
</ParamField>

## Request body

The fields to update. Only send the fields you want to change — use `sometimes` in your `updateRules` to make fields optional.

## Request

```bash theme={null}
curl -X PUT \
     -H "Authorization: Bearer YOUR_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{"phone": "+1-555-9999"}' \
     https://your-app.com/exo-api/resources/contact/1
```

## Response

Returns the updated record's transformed data.

**Example response:**

```json theme={null}
{
  "id": 1,
  "name": "Jane Smith",
  "email": "jane@example.com",
  "phone": "+1-555-9999",
  "created_at": "2026-03-28T14:30:00+00:00"
}
```

## Errors

| Status | Description                                                          |
| ------ | -------------------------------------------------------------------- |
| `403`  | User is not authorized to update this record                         |
| `404`  | Resource or record not found                                         |
| `405`  | Resource does not support updates (`supportsUpdate` returns `false`) |
| `422`  | Validation failed — see `errors` object for details                  |
