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

> Updates the PIN of a card on a given account where an ```accountId``` and ```cardId``` are provided.



## OpenAPI

````yaml /autogenerated/openapi/cards.openapi.json put /cards/{cardId}/pin
openapi: 3.1.0
info:
  title: Cards API
  version: 2.0.0
  description: Version 2
  license:
    name: UNLICENSED
    url: https://docs.equalsmoney.com
servers:
  - url: https://api.equalsmoney.com/v2
    description: Production
  - url: https://api-sandbox.equalsmoney.com/v2
    description: Sandbox
security: []
paths:
  /cards/{cardId}/pin:
    put:
      tags:
        - PIN
      summary: Update a card's PIN
      description: >-
        Updates the PIN of a card on a given account where an ```accountId```
        and ```cardId``` are provided.
      operationId: update
      parameters:
        - name: cardId
          in: path
          required: true
          schema:
            description: The ID of the card to work with.
            type:
              - string
            format: uuid
            maxLength: 36
            example: e9293471-5eb3-4dbc-916c-dbaf9e2deefd
        - name: accountId
          in: query
          schema:
            description: The ID of the account to work with.
            type:
              - string
            example: F50091
          required: true
        - name: personId
          in: query
          schema:
            description: The ID of the person to work with.
            type:
              - string
            format: uuid
            maxLength: 36
            example: 775596ae-2624-40af-a9dc-9756110a4a04
          required: true
      requestBody:
        description: Body
        content:
          application/json:
            schema:
              type:
                - object
              properties:
                pin:
                  type:
                    - string
                  minLength: 4
                  maxLength: 4
                  pattern: ^\d+$
                  description: >-
                    The new card PIN. If not provided, we'll randomly generate
                    one for you.
                cardholderVerificationMethod:
                  description: >-
                    The supplemental method used to verify the cardholder’s
                    identity before revealing the card’s PIN.
                  type:
                    - string
                  enum:
                    - BIOMETRIC_FACE
                    - BIOMETRIC_FINGERPRINT
                    - LOGIN
                    - OTP
                  example: BIOMETRIC_FACE
                mfa:
                  type:
                    - object
                  properties:
                    sessionId:
                      description: The MFA session id.
                      type:
                        - string
                      example: c92e2960-b745-4b38-8e77-898b2f9ad9bb
                    token:
                      description: The security token e.g. MFA code.
                      type:
                        - string
                      example: '123456'
                  required:
                    - sessionId
                    - token
              description: Request body for creating a PIN
              example:
                pin: stri
                cardholderVerificationMethod: BIOMETRIC_FACE
                mfa:
                  sessionId: c92e2960-b745-4b38-8e77-898b2f9ad9bb
                  token: '123456'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type:
                  - object
                properties:
                  success:
                    type:
                      - boolean
                    description: Indicates the outcome of the operation.
                  pin:
                    type:
                      - string
                    minLength: 4
                    maxLength: 4
                    pattern: ^\d+$
                    description: The updated card PIN.
                required:
                  - success
                  - pin
                example:
                  success: true
                  pin: stri
      security:
        - CommonAuth:
            - pin:update:own
            - pin:update:any
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl --request PUT \
              --url 'https://api.equalsmoney.com/v2/cards/{cardId}/pin?accountId={{accountId}}&personId={{personId}}' \
              --header 'Authorization: <api-key>' \
              --header 'Content-Type: application/json' \
              --data '
            {
              "pin": "stri",
              "cardholderVerificationMethod": "BIOMETRIC_FACE",
              "mfa": {
                "sessionId": "c92e2960-b745-4b38-8e77-898b2f9ad9bb",
                "token": "123456"
              }
            }
            '
components:
  securitySchemes:
    CommonAuth:
      type: apiKey
      in: header
      name: Authorization

````