---
title: "aid_cards_cardid_rotate_pin_post"
method: POST
path: "/accounts/{aid}/wallets/cards/{card_id}/rotate-pin"
tags: ["cards"]
---

# aid_cards_cardid_rotate_pin_post

`POST /accounts/{aid}/wallets/cards/{card_id}/rotate-pin`

Rotate or add new pin to card

scopes:
- admin:wallets
- write:wallets

## Path parameters

- `aid` string, ^[PT]{1}\d{8}$, required
- `card_id` string, required

## Request body

- object
  - `pin` PinGenerator, required — How the PIN should be generated.
    - `format` PinFormat — PIN format used for generation
      - `length` integer — The length of the PIN (exclusive length of the prefix).
      - `prefix` string — Prefix the PIN, the length of the prefix will affect the total length of the PIN.
      - `symbols` boolean — Allow characters like `@#$%` in the created PIN.
      - `numbers` boolean — Allow characters like `123456` in the created PIN.
      - `characters` boolean — Allow characters like `acbABC` in the created PIN.
      - `barcode` boolean — Include the PIN as a base64 encoded barcode image.
    - `pin` object
      - `value` string
      - `barcode_128` string — Code 128 barcode representation of the PIN value. A base64 encoded image in format `data:[<mime type>][;charset=<charset>][;base64],<encoded data>`

## Response `200`

Pin rotated

- RotatePin
  - `pin` PinGenerator, required — How the PIN should be generated.
    - `format` PinFormat — PIN format used for generation
      - `length` integer — The length of the PIN (exclusive length of the prefix).
      - `prefix` string — Prefix the PIN, the length of the prefix will affect the total length of the PIN.
      - `symbols` boolean — Allow characters like `@#$%` in the created PIN.
      - `numbers` boolean — Allow characters like `123456` in the created PIN.
      - `characters` boolean — Allow characters like `acbABC` in the created PIN.
      - `barcode` boolean — Include the PIN as a base64 encoded barcode image.
    - `pin` object
      - `value` string
      - `barcode_128` string — Code 128 barcode representation of the PIN value. A base64 encoded image in format `data:[<mime type>][;charset=<charset>][;base64],<encoded data>`

## Other responses

- `400` — Bad / Invalid request
- `401` — Access forbidden, invalid JWT token was used
- `403` — Forbidden
- `404` — Resource was not found
- `500` — Unexpected Error

---

[API](https://skmtc.net/dintero/apis/account-management-api.md) · [All operations](https://skmtc.net/dintero/apis/account-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/dintero/account-management-api/revisions/9b83a4199008/schema)
