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

> You can also update a card's PIN at any point using the following request.

# Step 2: update a card's PIN

You can also update a card's PIN at any point using the following request.

<Info>
  You can choose to omit the `pin` parameter, in which case we'll automatically generate one for you.
</Info>

<CodeGroup>
  ```bash Sandbox theme={null}
  curl -i -X PUT \
    'https://api-sandbox.equalsmoney.com/v2/cards/{cardId}/pin?accountId={accountId}&personId={personId}' \
    -H 'Authorization: ApiKey {apiKey}' \
    -H 'Content-Type: application/json' \
    -d '{
      "pin": "2612"
    }'
  ```

  ```bash Production theme={null}
  curl -i -X PUT \
    'https://api.equalsmoney.com/v2/cards/{cardId}/pin?accountId={accountId}&personId={personId}' \
    -H 'Authorization: ApiKey {apiKey}' \
    -H 'Content-Type: application/json' \
    -d '{
      "pin": "2612"
    }'
  ```
</CodeGroup>

If your request is successful, you'll receive a `200` response containing the updated pin.

```json theme={null}
{
  "success": true,
  "pin": "2612"
}
```
