> For the complete documentation index, see [llms.txt](https://docs.valtimo.nl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.valtimo.nl/nog-een-plek-geven/reference/modules/document.md).

# Document

## Events

| Event Type                          | Audit event | When                                              | Description                                                                                                          |
| ----------------------------------- | :---------: | ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `DocumentCreatedEvent`              |      ✓      | When a document is created.                       | Contains details about the document that was created.                                                                |
| `DocumentDefinitionDeployedEvent`   |             | When a document definition is deployed.           | Contains details about the deployed document.                                                                        |
| `DocumentFieldChangedEvent`         |             | -                                                 | Not an actual event. It is a part of the `DocumentModifiedEvent` and contains individual changes made to a document. |
| `DocumentModifiedEvent`             |      ✓      | When a document is modified.                      | Contains details about each changes when a document is modified.                                                     |
| `DocumentSnapshotCapturedEvent`     |             | When a document is created or modified.           | Contains a snapshot of the document. Created when a document is created or modified.                                 |
| `DocumentRelatedFileAddedEvent`     |      ✓      | When an uploaded file is added to a document.     | Contains a reference to the file that is linked to the document, and a reference to the document.                    |
| `DocumentRelatedFileRemovedEvent`   |      ✓      | When an uploaded file is removed from a document. | Contains a reference to the file that is unlinked from the document, and a reference to the document.                |
| `DocumentRelatedFileSubmittedEvent` |             | When a a file is uploaded for a document.         | Contains the ID of the related document and the resource ID that is being uploaded.                                  |

### Audit events

All audit events contain information on who caused the event, when it occurred, and any other useful metadata.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.valtimo.nl/nog-een-plek-geven/reference/modules/document.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
