---
name: metabase_move_dashboard
kind: function
lang: py
domain: infra
version: "1.0.0"
purity: impure
signature: "def metabase_move_dashboard(client: MetabaseClient, dashboard_id: int, collection_id: int | None) -> dict"
description: "Mueve un dashboard a otra coleccion via PUT /api/dashboard/:id. Wrapper thin que solo actualiza collection_id. collection_id=None mueve a 'Our analytics' (root)."
tags: [metabase, dashboard, move, collection, 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: dashboard_id
    desc: "ID del dashboard a mover"
  - name: collection_id
    desc: "ID de la coleccion destino; None mueve a 'Our analytics' (root)"
output: "dict: objeto dashboard actualizado con el nuevo collection_id"
tested: false
tests: []
test_file_path: ""
file_path: "python/functions/metabase/dashboards.py"
---

## Ejemplo

```python
# Mover a una coleccion especifica
dash = metabase_move_dashboard(client, 1, collection_id=7)
print(dash["collection_id"])  # 7

# Mover a root ("Our analytics")
dash = metabase_move_dashboard(client, 1, collection_id=None)
```

## Notas

Wrapper con intencion explicita sobre metabase_update_dashboard. Envia solo
`{collection_id: ...}` en el body para no sobreescribir dashcards ni otros
campos del dashboard. Pasar `collection_id=None` es el mecanismo de Metabase
para mover a root.
