> ## 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 a card's state

> When you create a card, its initial state is set to `UNACTIVATED`. Before it can be used, you'll need to activate it by using the following request.

# Step 2: update a card's state

When you create a card, its initial state is set to `UNACTIVATED`. Before it can be used, you'll need to activate it by using the following request.

<CodeGroup>
  ```bash Sandbox theme={null}
  curl -i -X POST \
    'https://api-sandbox.equalsmoney.com/v2/cards/{cardId}/transition?accountId={accountId}&personId={personId}' \
    -H 'Authorization: ApiKey {apiKey}' \
    -H 'Content-Type: application/json' \
    -d '{
      "state": "ACTIVE",
      "reason": "Activate new card"
    }'
  ```

  ```bash Production theme={null}
  curl -i -X POST \
    'https://api.equalsmoney.com/v2/cards/{cardId}/transition?accountId={accountId}&personId={personId}' \
    -H 'Authorization: ApiKey {apiKey}' \
    -H 'Content-Type: application/json' \
    -d '{
      "state": "ACTIVE",
      "reason": "Activate new card"
    }'
  ```
</CodeGroup>

If your request is successful, you'll receive a `200` response where the `state` is set to `ACTIVE`.

```json theme={null}
{
  "id": "800065b2-4d12-42ac-940c-00cd930e3758",
  "name": "Marketing",
  "personId": "cfd2431d-a682-4167-adfa-5975bc47aaf5",
  "accountId": "F12345",
  "state": "ACTIVE",
  "cardType": "VIRTUAL_PAN",
  "lastFour": "3315",
  "cardProductToken": "23ada04b-5b3b-4b73-8343-da3f14d8d96f",
  "fulfillmentStatus": "ISSUED",
  "expiration": "0128",
  "pinIsSet": false,
  "recipientAddress": null,
  "cardPersonalization": null,
  "careOfLine": null,
  "budgetCardPhoneNumber": null,
  "userTokenId": "5609caee-f89d-4e49-8d2e-6e4d8f8d0422",
  "cardOwnerType": "PEOPLE",
  "budgetCardPhoneNumberPersonId": null,
  "cardGroupId": "800065b2-4d12-42ac-940c-00cd930e3758",
  "cardProductId": "029bddac-7ef0-11ee-8764-06395f802f08",
  "physicalCardState": "NOT_REQUESTED",
  "physicalCardId": null,
  "forceChangePin": false,
  "createdAt": "2024-01-18T13:42:51.000Z",
  "updatedAt": "2024-01-18T13:45:02.111Z",
  "meta": [
    {
      "id": "8a98c26c-8196-4f40-ba72-037569a0a8d0",
      "cardId": "800065b2-4d12-42ac-940c-00cd930e3758",
      "metaKey": "expirationTime",
      "metaValue": "2028-01-31T23:59:59Z",
      "createdAt": "2024-01-18T13:42:51.000Z",
      "updatedAt": "2024-01-18T13:42:51.000Z",
      "CardId": "800065b2-4d12-42ac-940c-00cd930e3758"
    },
    {
      "id": "ee473b51-d16b-429d-8017-d13cd2361925",
      "cardId": "800065b2-4d12-42ac-940c-00cd930e3758",
      "metaKey": "stateReason",
      "metaValue": "New card",
      "createdAt": "2024-01-18T13:42:51.000Z",
      "updatedAt": "2024-01-18T13:42:51.000Z",
      "CardId": "800065b2-4d12-42ac-940c-00cd930e3758"
    }
  ],
  "token": {
    "id": "5609caee-f89d-4e49-8d2e-6e4d8f8d0422",
    "personId": "cfd2431d-a682-4167-adfa-5975bc47aaf5",
    "accountId": "F12345",
    "userToken": "c8b9f4a6-b254-4b01-a3b3-9c266980e36c",
    "budgetId": null
  }
}
```
