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

# Bloquear/Desbloquear tarjeta

> Este endpoint permite bloquear o desbloquear una tarjeta por motivos de seguridad

### Parámetros

<ParamField path="cardId" type="string" required>
  El identificador único de la tarjeta
</ParamField>

### Cuerpo

<ParamField body="status" type="string" required>
  Estado deseado de la tarjeta: `active` (desbloquear) o `locked`
</ParamField>

### Respuesta

<ResponseField name="success" type="boolean">
  Indica si la operación fue exitosa
</ResponseField>

<ResponseField name="cardId" type="string">
  El identificador único de la tarjeta
</ResponseField>

<ResponseField name="status" type="string">
  Estado actualizado de la tarjeta
</ResponseField>

<RequestExample>
  ```bash cURL - Lock Card theme={null}
  curl --location --request PATCH 'https://stablecoin-api.sandbox.getmeru.com/api/v1/cards-program/cards/7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d/status' \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --data-raw '{
      "status": "locked"
  }'
  ```

  ```bash cURL - Unlock Card theme={null}
  curl --location --request PATCH 'https://stablecoin-api.sandbox.getmeru.com/api/v1/cards-program/cards/7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d/status' \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --data-raw '{
      "status": "active"
  }'
  ```

  ```js Javascript theme={null}
  const response = await fetch('https://stablecoin-api.sandbox.getmeru.com/api/v1/cards-program/cards/7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d/status', {
    method: 'PATCH',
    headers: {
      'Content-Type': 'application/json',
      'api-key': '<api-key>'
    },
    body: JSON.stringify({
      status: "locked" // o "active" para desbloquear
    })
  });

  const data = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "cardId": "7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d",
    "status": "locked"
  }
  ```
</ResponseExample>

### Respuestas de error

<ResponseExample>
  ```json 401 theme={null}
  {
    "success": false,
    "error": "Unauthorized. Please check your authentication credentials."
  }
  ```

  ```json 404 theme={null}
  {
    "success": false,
    "error": "Card not found."
  }
  ```
</ResponseExample>

### Casos de uso

**Bloquear una tarjeta** es útil cuando:

* El titular reporta la tarjeta como perdida o robada
* Se detecta actividad sospechosa
* El titular quiere desactivar la tarjeta temporalmente

**Desbloquear una tarjeta** restaura su funcionamiento normal después de haber sido bloqueada.
