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

# Manage PINs

> Retrieve or update a given card's Personal Identification Number (PIN).

Retrieve or update a given card's Personal Identification Number (PIN).

## Retrieve a card's PIN

<Note>
  **GET** `/v2/cards/{cardId}/pin`
</Note>

### Request

Use this request to retrieve the PIN for a given card.

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X GET \
    'https://api.equalsmoney.com/v2/cards/e9293471-5eb3-4dbc-916c-dbaf9e2deefd/pin?accountId=F12345&personId=775596ae-2624-40af-a9dc-9756110a4a04&cardholderVerificationMethod=BIOMETRIC_FACE' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE'
  ```

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

#### Path parameters

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

  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" required>
  The ID of the person who owns the card.

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

<ParamField body="cardholderVerificationMethod" type="string" required>
  The method that was used to verify the identity of the cardholder.

  Allowable values: `BIOMETRIC_FACE`, `BIOMETRIC_FINGERPRINT`, `LOGIN`
</ParamField>

### Response

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

<CodeGroup>
  ```json Sample response theme={null}
  {
    "pin": "7268"
  }
  ```

  ```json Response structure theme={null}
  {
    "pin": "string"
  }
  ```
</CodeGroup>

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

## Update a card's PIN

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

### Request

Use this request to update the PIN of a card on a given account where an `accountId` and `cardId` are provided.

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

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

### Path parameters

<ParamField body="cardId" type="string" required>
  The ID of the card that you want to update the PIN for. You can get the `cardId` when you [view card details](/pages/cards/get-card-details).

  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 `accountId` (≤ 36 characters)
</ParamField>

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

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

#### Request body schema

<ParamField body="pin" type="string">
  The new card PIN. If not provided, we'll randomly generate one for you.

  Allowable values: 4 characters (`^\d+$`)
</ParamField>

### Response

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

<CodeGroup>
  ```json Sample response theme={null}
  {
    "success": true
  }
  ```

  ```json Response structure theme={null}
  {
    "success": boolean
  }
  ```
</CodeGroup>

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