> ## 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.

# vault.folder.deleted

> Fired when a folder is deleted from Documents Vault.

## Event

```
vault.folder.deleted
```

This event fires when a folder is deleted from Documents Vault. The payload describes the folder as it was just before deletion.

## Payload Example

```json theme={null}
{
  "event": "vault.folder.deleted",
  "event_id": "3f7c1a8e-5b2d-4e9a-9c31-8a6f0d4b7e12",
  "organization_id": 42,
  "user_id": 1337,
  "payload_version": 1,
  "timestamp": "2026-09-24T14:32:00Z",
  "data": {
    "event": "vault.folder.deleted",
    "resource_id": "a1d4f7c2-9e3b-4b6a-8f15-3c7e0d2b9a84",
    "resource_type": "folder",
    "name": "Vendor Contracts",
    "parent_folder_id": "7b3e9d20-4c1f-4a8e-b5d6-2f9a0c8e1d47",
    "path": "u1337.Legal.Vendor_Contracts",
    "external_source": null,
    "external_id": null
  }
}
```

## Payload Fields

### Envelope

| Field             | Type            | Description                                                                                     |
| ----------------- | --------------- | ----------------------------------------------------------------------------------------------- |
| `event`           | string          | Always `vault.folder.deleted`                                                                   |
| `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 made the change. For changes made by folder sync, the user who owns the sync |
| `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                                                                                                    |
| ------------------ | -------------- | -------------------------------------------------------------------------------------------------------------- |
| `event`            | string         | The event name, repeated from the envelope                                                                     |
| `resource_id`      | string         | UUID of the folder in Documents Vault                                                                          |
| `resource_type`    | string         | Always `folder`                                                                                                |
| `name`             | string         | Name the folder had when it was deleted                                                                        |
| `parent_folder_id` | string or null | UUID of the folder that contains the folder. `null` when the folder is at the top level of the vault           |
| `path`             | string or null | Internal hierarchical path of the folder (see [Path format](#path-format))                                     |
| `external_source`  | string or null | The external drive the folder is synced with, for example `google_drive`. `null` for items created in Chamelio |
| `external_id`      | string or null | The folder's ID in the external drive, when `external_source` is set                                           |

### Path format

`path` is an internal dot-separated path, not a display path. Each segment is a sanitized label:
characters other than letters, digits, and underscores become `_`. For example, a file named
`Q3 NDA.pdf` appears as a `Q3_NDA_pdf` segment. Use `resource_id` and `parent_folder_id` to
identify items and rebuild the hierarchy; treat `path` as informational.

<Warning>
  Deleting a folder also deletes everything inside it, but you receive only this one event. No `vault.document.deleted` or `vault.folder.deleted` events are sent for the files and subfolders under it.
</Warning>
