> ## 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.

# Update Card

> This endpoint updates card settings including status, limits, and configuration

### Params

<ParamField path="cardId" type="string" required>
  The unique card identifier
</ParamField>

### Body

<ParamField body="status" type="string">
  Card status: `notActivated`, `active`, `locked`, or `canceled`
</ParamField>

<ParamField body="limit" type="object">
  Spending limit configuration

  <Expandable title="Limit object">
    <ParamField body="amount" type="number" required>
      Limit amount
    </ParamField>

    <ParamField body="frequency" type="string" required>
      Frequency: `per24HourPeriod`, `per7DayPeriod`, `per30DayPeriod`, `perYearPeriod`, `allTime`, or `perAuthorization`
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="configuration" type="object">
  Card configuration settings

  <Expandable title="Configuration object">
    <ParamField body="virtualCardArt" type="string" required>
      Virtual card artwork identifier
    </ParamField>
  </Expandable>
</ParamField>

### Response

<ResponseField name="success" type="boolean">
  Indicates whether the call was successful
</ResponseField>

<ResponseField name="cardId" type="string">
  The unique card identifier
</ResponseField>

<ResponseField name="status" type="string">
  Updated card status
</ResponseField>

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

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

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

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

### Error Responses

<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>
