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

## Ejemplo

```python
# Mover a una coleccion especifica
card = metabase_move_card(client, 42, collection_id=7)
print(card["collection_id"])  # 7

# Mover a root ("Our analytics")
card = metabase_move_card(client, 42, collection_id=None)
```

## Notas

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