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

# core.document.updated

> Fired when a document's attributes or metadata change in Chamelio Knowledge Center, so downstream systems can stay in sync with the latest values.

## Event

```
core.document.updated
```

This event fires when a document's field value is edited, whether from the Chamelio web application or through the [Update Document Attribute](https://docs.chamelio.ai/api-reference/endpoint/core/update-attribute.md) API.

## Payload Example

```json theme={null}
{
  "event": "core.document.updated",
  "event_id": "3f7c1a8e-5b2d-4e9a-9c31-8a6f0d4b7e12",
  "organization_id": 42,
  "user_id": 1337,
  "payload_version": 1,
  "timestamp": "2026-09-02T14:32:00Z",
  "data": {
    "document_id": 88213,
    "updated_fields": [
      {
        "field_name": "Contract Value",
        "field_type": "number",
        "is_null": false,
        "is_unclear": false
      }
    ],
    "actor": {
      "user_id": 1337,
      "email": "john.doe@example.com",
      "name": "John Doe"
    }
  }
}
```

## Payload Fields

### Envelope

| Field | Type | Description |
| - | - | - |
| `event` | string | Always `core.document.updated` |
| `event_id` | string | UUID for this delivery. Use it to deduplicate retries |
| `organization_id` | integer | ID of the organization the event occurred in |
| `user_id` | integer or null | ID of the user who triggered the event |
| `payload_version` | integer | Envelope schema version. Currently `1` |
| `timestamp` | string | ISO 8601 UTC timestamp of when the event was generated |
| `data` | object | Event-specific payload (see below) |

### Data Object

| Field | Type | Description |
| - | - | - |
| `document_id` | integer | ID of the updated Knowledge Center document |
| `updated_fields` | array | The fields that changed (see below) |
| `actor` | object | The user who made the change (see below) |

### Updated Field Object

| Field | Type | Description |
| - | - | - |
| `field_name` | string | Human-readable name of the field that changed |
| `field_type` | string | Value type of that field, for example `text`, `number`, `boolean`, `date`, `enum`, or `clause` |
| `is_null` | boolean | Whether the field is now empty |
| `is_unclear` | boolean | Whether the field is now flagged as unclear |

### Actor Object

Chamelio resolves the acting user at send time. `user_id` is present whenever a user triggered the
event; `email` and `name` are filled in only if that user could still be resolved in the
organization.

| Field | Type | Description |
| - | - | - |
| `user_id` | integer or null | ID of the user who triggered the event |
| `email` | string or null | Email of that user |
| `name` | string or null | Full name of that user |

> [!NOTE]
>
> One event is emitted per field change, so `updated_fields` normally contains a single entry. It is an
> array so that batched updates can be represented without a schema change.

> [!WARNING]
>
> `updated_fields` describes *which* fields changed and their resulting state - it does not carry the
> old or new values. Read the current value with [Get Contract Data](https://docs.chamelio.ai/api-reference/endpoint/core/get-contract-data.md).
