---
name: metabase_archive_document
kind: function
lang: py
domain: infra
version: "1.0.0"
purity: impure
signature: "def metabase_archive_document(client: MetabaseClient, document_id: int) -> dict"
description: "Archiva un document (PUT archived=True). Prerequisito para poder eliminarlo."
tags: [metabase, document, archive, api, python]
uses_functions: []
uses_types: []
returns: []
returns_optional: false
error_type: "error_go_core"
imports: [httpx]
params:
  - name: client
    desc: "instancia autenticada de MetabaseClient"
  - name: document_id
    desc: "ID del document a archivar"
output: "dict: document con archived=True"
tested: false
tests: []
test_file_path: ""
file_path: "python/functions/metabase/documents.py"
---

## Ejemplo

```python
metabase_archive_document(client, 1)
metabase_delete_document(client, 1)  # ahora si puede eliminarse
```
