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

# Update cards

> Update an existing card to change its state or its details, such as its name, linked budget, or the phone number associated with it. You can't update 

Update an existing card to change its state or its details, such as its name, linked budget, or the phone number associated with it. You can't update a card's PAN or CVV.

<Info>
  The endpoints described in this guide are currently in beta mode.
</Info>

## Update a card's details

<Note>
  **PUT** `/v2/cards/{cardId}`
</Note>

### Request

Use this request to update the details about a given card.

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X PUT \
    'https://api.equalsmoney.com/v2/cards/e9293471-5eb3-4dbc-916c-dbaf9e2deefd?accountId=F12345' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
      "personId": "775596ae-2624-40af-a9dc-9756110a4a04",
      "budgetCardPhoneNumberPersonId": "775596ae-2624-40af-a9dc-9756110a4a04",
      "budgetCardPhoneNumber": "+447911001762",
      "name": "Team Party"
    }'
  ```

  ```bash Request structure theme={null}
  curl -i -X PUT \
    'https://api.equalsmoney.com/v2/cards/{cardId}?accountId={accountId}' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
      "personId": "string",
      "budgetCardPhoneNumberPersonId": "string",
      "budgetCardPhoneNumber": "string",
      "name": "string"
    }'
  ```
</CodeGroup>

#### Path parameters

<ParamField body="cardId" type="string" required>
  The ID of the card that you want to update.

  Allowable values: An existing `cardId` (≤ 36 characters)
</ParamField>

#### Query parameters

<ParamField body="accountId" type="string" required>
  The ID of the account associated with the card.

  Allowable values: An existing `cardId` (≤ 36 characters)
</ParamField>

<ParamField body="personId" type="string">
  The ID of the person that the card belongs to.

  Allowable values: An existing `personId` (≤ 36 characters)
</ParamField>

#### Request body schema

<ParamField body="personId" type="string">
  The ID of the person who owns the card, if the card is individual. Update this if you want to change the ownership of the card.

  Allowable values: A valid `personId` (≤ 36 characters)
</ParamField>

<ParamField body="budgetCardPhoneNumberPersonId" type="string">
  The person associated with the card, if the card is shared.

  Allowable values: An existing `personId` (≤ 36 characters)
</ParamField>

<ParamField body="budgetCardPhoneNumber" type="string">
  The phone number associated with the card, if the card is shared.

  Allowable values: A valid string
</ParamField>

<ParamField body="name" type="string">
  The name of the card. Any diacritics will be converted to the nearest English letter equivalent. Note that any name that is longer than 21 characters will be truncated.

  Allowable values: ≤ 21 characters
</ParamField>

<ParamField body="state" type="string (enum)">
  The state of the card.

  Allowable values: `ACTIVE`, `REPLACED`, `TERMINATED`, `SUSPENDED`, `UNACTIVATED`
</ParamField>

<ParamField body="fulfillmentStatus" type="string (enum)">
  The fulfillment status of the card..

  Allowable values: `ISSUED`, `ORDERED`, `REORDERED`, `REJECTED`, `SHIPPED`, `DIGITALLY_PRESENTED`
</ParamField>

### Response

If your request is successful, you'll receive a `200` response.

<CodeGroup>
  ```json Sample response theme={null}
  {
    "id": "e9293471-5eb3-4dbc-916c-dbaf9e2deefd",
    "personId": "775596ae-2624-40af-a9dc-9756110a4a08",
    "accountId": "F12345",
    "cardProductName": "string",
    "lastFour": "0056",
    "expiration": "0111",
    "expirationTime": "2025-01-31T23:59:59Z",
    "pinIsSet": true,
    "state": "ACTIVE",
    "stateReason": "New card",
    "fulfillmentStatus": "ISSUED",
    "cardType": "PHYSICAL_MSR",
    "recipientAddress": {
      "firstName": "Jane",
      "middleName": "Roger",
      "lastName": "Doe",
      "address1": "123 Henry St",
      "address2": "Suite 101",
      "city": "Porterville",
      "state": "CA",
      "postalCode": "93257",
      "country": "US",
      "phone": "8315555555"
    },
    "cardOwnerType": "PEOPLE",
    "name": "Team Party Card",
    "budgetCardPhoneNumber": "+447911001762",
    "meta": [
      {
        "id": "string",
        "cardId": "e9293471-5eb3-4dbc-916c-dbaf9e2deefd",
        "metaKey": "expirationTime",
        "metaValue": "New card"
      }
    ],
    "budgets": [
      {
        "id": "775596ae-2624-40af-a9dc-9756110a4a03",
        "name": "Engineering"
      }
    ],
    "budget": {
      "id": "775596ae-2624-40af-a9dc-9756110a4a03",
      "name": "Engineering"
    },
    "spendingLimit": {
      "id": "775596ae-2624-40af-a9dc-9756110a4a03",
      "amount": 100.5,
      "active": false,
      "limitTurnedOff": true,
      "limitWindow": "DAY",
      "available": {
        "uses": 0,
        "amount": 100.5,
        "daysRemaining": 1
      }
    },
    "transactionLimit": {
      "id": "775596ae-2624-40af-a9dc-9756110a4a03",
      "amount": 100.5,
      "active": false,
      "limitTurnedOff": true,
      "limitWindow": "TRANSACTION"
    },
    "budgetCardPhoneNumberPersonId": "775596ae-2624-40af-a9dc-9756110a4a08",
    "previousCards": [
      null
    ],
    "currencies": [
      {
        "numericCode": "840",
        "code": "USD"
      }
    ],
    "physicalCardState": "ACTIVE",
    "physicalCardId": "884496ae-2624-40af-a9dc-9756110a4a18",
    "forceChangePin": false,
    "createdAt": "2021-01-30T08:30:00Z",
    "updatedAt": "2021-01-30T08:30:00Z"
  }
  ```

  ```json Response structure theme={null}
  {
    "id": "string",
    "personId": "string",
    "accountId": "string",
    "cardProductName": "string",
    "lastFour": "string",
    "expiration": "string",
    "expirationTime": "string",
    "pinIsSet": boolean,
    "state": "string",
    "stateReason": "string",
    "fulfillmentStatus": "string",
    "cardType": "string",
    "recipientAddress": {
      "firstName": "string",
      "middleName": "string",
      "lastName": "string",
      "address1": "string",
      "address2": "string",
      "city": "string",
      "state": "string",
      "postalCode": "string",
      "country": "string",
      "phone": "string"
    },
    "cardOwnerType": "string",
    "name": "string",
    "budgetCardPhoneNumber": "string",
    "meta": [
      {
        "id": "string",
        "cardId": "string",
        "metaKey": "string",
        "metaValue": "string"
      }
    ],
    "budgets": [
      {
        "id": "string",
        "name": "string"
      }
    ],
    "budget": {
      "id": "string",
      "name": "string"
    },
    "spendingLimit": {
      "id": "string",
      "amount": number,
      "active": boolean,
      "limitTurnedOff": boolean,
      "limitWindow": "string",
      "available": {
        "uses": number,
        "amount": number,
        "daysRemaining": number
      }
    },
    "transactionLimit": {
      "id": "string",
      "amount": number,
      "active": boolean,
      "limitTurnedOff": boolean,
      "limitWindow": "string"
    },
    "budgetCardPhoneNumberPersonId": "string",
    "previousCards": [
      null
    ],
    "currencies": [
      {
        "numericCode": "string",
        "code": "string"
      }
    ],
    "physicalCardState": "string",
    "physicalCardId": "string",
    "forceChangePin": boolean,
    "createdAt": "string",
    "updatedAt": "string"
  }
  ```
</CodeGroup>

For more detailed information about this request and its response, [see the API reference](/api-reference/update-a-card/update-a-cards-details).

## Update a card's state

<Note>
  **POST** `/v2/cards/{cardId}/transition`
</Note>

### Request

Use this request to update the state of an existing card. For example, you can set the state of a lost card to `SUSPENDED` to prevent any unauthorised transactions. Later, if the card is later found, you can set the state to `ACTIVE` so that it can be used again. [Learn more about card states](/pages/cards/about-card-states).

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X POST \
    'https://api.equalsmoney.com/v2/cards/e9293471-5eb3-4dbc-916c-dbaf9e2deefd/transition?accountId=F12345' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
      "state": "SUSPENDED",
      "reason": "Lost card"
    }'
  ```

  ```bash Request structure theme={null}
  curl -i -X POST \
    'https://api.equalsmoney.com/v2/cards/{cardId}/transition?accountId={accountId}' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
      "state": "string",
      "reason": "string"
    }'
  ```
</CodeGroup>

#### Path parameters

<ParamField body="cardId" type="string" required>
  The ID of the card that you want to update.

  Allowable values: An existing `cardId` (≤ 36 characters)
</ParamField>

#### Query parameters

<ParamField body="accountId" type="string" required>
  The ID of the account associated with the card.

  Allowable values: An existing `cardId` (≤ 36 characters)
</ParamField>

<ParamField body="personId" type="string">
  The ID of the person who owns the card.

  Allowable values: An existing `personId` (≤ 36 characters)
</ParamField>

#### Request body schema

<ParamField body="state" type="string" required>
  The state that you want to update the card to.

  Allowable values: `ACTIVE`, `TERMINATED`, `SUSPENDED`
</ParamField>

<ParamField body="reason" type="string">
  The reason for the update.

  Allowable values: A valid string.
</ParamField>

### Response

If your request is successful, you'll receive a `200` response.

<CodeGroup>
  ```json Sample response theme={null}
  {
    "id": "e9293471-5eb3-4dbc-916c-dbaf9e2deefd",
    "personId": "f3e5ff26-28ff-4cd6-9b1b-e303a185a13a",
    "accountId": "F12345",
    "cardProductName": "string",
    "lastFour": "0056",
    "expiration": "0111",
    "expirationTime": "2025-01-31T23:59:59Z",
    "pinIsSet": true,
    "state": "ACTIVE",
    "stateReason": "New card",
    "fulfillmentStatus": "ISSUED",
    "cardType": "PHYSICAL_MSR",
    "recipientAddress": {
      "firstName": "Jane",
      "middleName": "Roger",
      "lastName": "Doe",
      "address1": "123 Henry St",
      "address2": "Suite 101",
      "city": "Porterville",
      "state": "CA",
      "postalCode": "93257",
      "country": "US",
      "phone": "8315555555"
    },
    "cardOwnerType": "PEOPLE",
    "name": "Team Party Card",
    "budgetCardPhoneNumber": "+447911001762",
    "meta": [
      {
        "id": "string",
        "cardId": "e9293471-5eb3-4dbc-916c-dbaf9e2deefd",
        "metaKey": "expirationTime",
        "metaValue": "New card"
      }
    ],
    "budgets": [
      {
        "id": "775596ae-2624-40af-a9dc-9756110a4a03",
        "name": "Engineering"
      }
    ],
    "budget": {
      "id": "775596ae-2624-40af-a9dc-9756110a4a03",
      "name": "Engineering"
    },
    "spendingLimit": {
      "id": "775596ae-2624-40af-a9dc-9756110a4a03",
      "amount": 100.5,
      "active": false,
      "limitTurnedOff": true,
      "limitWindow": "DAY",
      "available": {
        "uses": 0,
        "amount": 100.5,
        "daysRemaining": 1
      }
    },
    "transactionLimit": {
      "id": "775596ae-2624-40af-a9dc-9756110a4a03",
      "amount": 100.5,
      "active": false,
      "limitTurnedOff": true,
      "limitWindow": "TRANSACTION"
    },
    "budgetCardPhoneNumberPersonId": "775596ae-2624-40af-a9dc-9756110a4a08",
    "previousCards": [
      null
    ],
    "currencies": [
      {
        "numericCode": "840",
        "code": "USD"
      }
    ],
    "physicalCardState": "ACTIVE",
    "physicalCardId": "884496ae-2624-40af-a9dc-9756110a4a18",
    "forceChangePin": false,
    "createdAt": "2021-01-30T08:30:00Z",
    "updatedAt": "2021-01-30T08:30:00Z"
  }
  ```

  ```json Response structure theme={null}
  {
    "id": "string",
    "personId": "string",
    "accountId": "string",
    "cardProductName": "string",
    "lastFour": "string",
    "expiration": "string",
    "expirationTime": "string",
    "pinIsSet": boolean,
    "state": "string",
    "stateReason": "string",
    "fulfillmentStatus": "string",
    "cardType": "string",
    "recipientAddress": {
      "firstName": "string",
      "middleName": "string",
      "lastName": "string",
      "address1": "string",
      "address2": "string",
      "city": "string",
      "state": "string",
      "postalCode": "string",
      "country": "string",
      "phone": "string"
    },
    "cardOwnerType": "string",
    "name": "string",
    "budgetCardPhoneNumber": "string",
    "meta": [
      {
        "id": "string",
        "cardId": "string",
        "metaKey": "string",
        "metaValue": "string"
      }
    ],
    "budgets": [
      {
        "id": "string",
        "name": "string"
      }
    ],
    "budget": {
      "id": "string",
      "name": "string"
    },
    "spendingLimit": {
      "id": "string",
      "amount": number,
      "active": boolean,
      "limitTurnedOff": boolean,
      "limitWindow": "string",
      "available": {
        "uses": number,
        "amount": number,
        "daysRemaining": number
      }
    },
    "transactionLimit": {
      "id": "string",
      "amount": number,
      "active": boolean,
      "limitTurnedOff": boolean,
      "limitWindow": "string"
    },
    "budgetCardPhoneNumberPersonId": "string",
    "previousCards": [
      null
    ],
    "currencies": [
      {
        "numericCode": "string",
        "code": "string"
      }
    ],
    "physicalCardState": "string",
    "physicalCardId": "string",
    "forceChangePin": boolean,
    "createdAt": "string",
    "updatedAt": "string"
  }
  ```
</CodeGroup>

For more detailed information about this request and its response, [see the API reference](/api-reference/update-a-card/update-a-cards-state).

## Remove a card from a budget

<Note>
  **DELETE** `/v2/cards/{cardId}/budgets/{budgetId}`
</Note>

### Request

Use this request to remove a card from a given budget.

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X DELETE \
    'https://api.equalsmoney.com/v2/cards/755ab16f-bcb2-428c-ad22-2be6c24a5e3e/budgets/3135d763-551c-4289-b002-ea812bbd0d71?accountId=F12345' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE'
  ```

  ```bash Request structure theme={null}
  curl -i -X DELETE \
    'https://api.equalsmoney.com/v2/cards/{cardId}/budgets/{budgetId}?accountId={accountId}' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE'
  ```
</CodeGroup>

### Path parameters

<ParamField body="cardId" type="string" required>
  The ID of the card to work with.

  Allowable values: An existing `accountId`
</ParamField>

<ParamField body="budgetId" type="string" required>
  The ID of the budget to remove the card from.

  Allowable values: An existing `budgetId`
</ParamField>

### Query parameters

<ParamField body="accountId" type="string" required>
  The ID of the account associated with the card.

  Allowable values: An existing `accountId`
</ParamField>

### Response

If your request is successful, you'll receive a `200` response.

```json theme={null}
{
  "success": true
}
```

For more detailed information about this request and its response, [see the API reference](/api-reference/card-budgets/remove-a-card-from-a-budget).

## Remove a card from all budgets

<Note>
  **DELETE** `/v2/cards/{cardId}/budgets`
</Note>

### Request

Use this request to remove a card from all of the budgets that it's associated with.

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X DELETE \
    'https://api.equalsmoney.com/v2/cards/755ab16f-bcb2-428c-ad22-2be6c24a5e3e/budgets?accountId=F12345' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE'
  ```

  ```bash Request structure theme={null}
  curl -i -X DELETE \
    'https://api.equalsmoney.com/v2/cards/{cardId}/budgets?accountId={accountId}' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE'
  ```
</CodeGroup>

### Path parameters

<ParamField body="cardId" type="string" required>
  The ID of the card to work with.

  Allowable values: An existing `cardId`
</ParamField>

### Query parameters

<ParamField body="accountId" type="string" required>
  The ID of the account associated with the card.

  Allowable values: An existing `accountId`
</ParamField>

### Response

If your request is successful, you'll receive a `200` response.

```json theme={null}
{
  "success": true
}
```

For more detailed information about this request and its response, [see the API reference](/api-reference/card-budgets/remove-a-card-from-all-budgets).
