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

# Update & Delete Data

> Update document metadata and delete documents, collections, and objects — including what cascades

How to change and remove data after ingestion, and exactly what each delete cascades to.

## Update document metadata

`PATCH` a document to change its fields. The body is a partial update — send **only the fields you want to change**; you never resend vectors. Any fields you pass are merged into the document.

```bash theme={null}
curl -sS -X PATCH \
  "$MP_API_URL/v1/collections/$COLLECTION_ID/documents/$DOCUMENT_ID" \
  -H "Authorization: Bearer $MP_API_KEY" \
  -H "X-Namespace: $MP_NAMESPACE" \
  -H "Content-Type: application/json" \
  -d '{ "status": "reviewed", "priority": 3 }'
```

To update many documents at once, use `PATCH /v1/collections/{collection_id}/documents/batch` (bulk update).

<Note>
  Updating metadata does **not** re-run extraction or change vectors — it only edits the stored payload. To change the embedding model, see [Migrate Embedding Models](/processing/model-migration).
</Note>

To change **access control** (not metadata), use the dedicated ACL endpoint `PATCH /v1/collections/{collection_id}/documents/{document_id}/acl` — see [Permissions](/platform/permissions).

<Note>
  **Object metadata vs document metadata are separate.** The `PATCH` above edits a **document** (a processed, searchable record in a collection). To edit the source **object** in the bucket, use [`PUT /v1/buckets/{bucket_id}/objects/{object_id}`](/api-reference/bucket-objects/update-object) with a `metadata` object (merged with existing). Editing one does not change the other, and re-processing an object regenerates its documents from the object's current state.
</Note>

## Delete data

<Warning>
  Deletes are permanent and some **cascade**. Read the cascade column before deleting — removing a bucket object or a collection also destroys derived documents.
</Warning>

| Delete          | Endpoint                                                         | Cascades to                                                                   |
| --------------- | ---------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| A document      | `DELETE /v1/collections/{collection_id}/documents/{document_id}` | Just that document                                                            |
| Many documents  | `DELETE /v1/collections/{collection_id}/documents/batch`         | The documents you list                                                        |
| A bucket object | `DELETE /v1/buckets/{bucket_id}/objects/{object_id}`             | **Hard-deletes every collection document derived from that object**           |
| A collection    | `DELETE /v1/collections/{collection_id}`                         | **All documents in the collection**                                           |
| A namespace     | `DELETE /v1/namespaces/{namespace_id}`                           | **Everything in the namespace** (buckets, collections, documents, retrievers) |

```bash theme={null}
# Delete a single document
curl -sS -X DELETE \
  "$MP_API_URL/v1/collections/$COLLECTION_ID/documents/$DOCUMENT_ID" \
  -H "Authorization: Bearer $MP_API_KEY" -H "X-Namespace: $MP_NAMESPACE"

# Delete a bucket object (also removes its derived documents)
curl -sS -X DELETE \
  "$MP_API_URL/v1/buckets/$BUCKET_ID/objects/$OBJECT_ID" \
  -H "Authorization: Bearer $MP_API_KEY" -H "X-Namespace: $MP_NAMESPACE"
```

<Tip>
  Deleting the **object** is the right move when you want the source asset *and* its derived documents gone. Deleting just the **document** leaves the source object in the bucket, so a re-process would recreate the document.
</Tip>

### Synced sources

If documents came from a [storage sync](/platform/syncs), the sync's `reconcile.on_delete` is `true` by default, so deleting a file in the source (S3, Google Drive, etc.) automatically removes the corresponding object and its derived documents. Set `reconcile.on_delete` to `false` to keep Mixpeek objects when the source asset is deleted.

## Related

* [Documents](/vector-store/documents) — document structure and payload
* [Syncs](/platform/syncs) — source-deletion cascade (`on_delete`)
* [Ingest Data](/platform/data-model) — objects, batches, collections
