> ## Documentation Index
> Fetch the complete documentation index at: https://www.marqeta.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create PIN control token

> Creates a control token necessary when creating or updating a card's personal identification number (PIN).

POST/pins/controltoken

Creates a control token necessary when creating or updating a card's personal identification number (PIN).

Creating, updating, or revealing a card's PIN is a two-step process. You must first create the control token that is required to create the PIN, and then you create, update, or reveal the PIN itself.

The lifespan of the control token in a production environment is either five minutes or one hour from creation, depending on the token type. If multiple tokens are requested for a single card, only the most recent one is valid. Once redeemed, a token cannot be reused.

## Request body

| Fields | Description |
| - | - |
| card\_token string  Required | The unique identifier of the card for which you want to generate a control token. Send a `GET` request to `/cards/user/{token}` to retrieve card tokens for a specific user. **Allowable Values:**  1–36 chars |
| controltoken\_type string  Optional | Specifies the type of action completed by this request. **WARNING:** Sending a request to this endpoint with a `REVEAL_PIN` control token requires PCI DSS compliance. The lifespan of the control token depends on the token type: - **SET\_PIN:** 60 minutes - **REVEAL\_PIN:** 5 minutes **Allowable Values:**  `SET_PIN`, `REVEAL_PIN` |

## Sample request body

```json JSON lines wrap theme={null}
{
  "card_token": "my_card_01",
  "controltoken_type": "SET_PIN"
}
```

## Response body

| Fields | Description |
| - | - |
| control\_token string  Returned | Unique value generated as a result of issuing a `POST` request to the `/pins/controltoken` endpoint. This value cannot be updated. **Allowable Values:**  1-36 chars |

## Sample response body

```json JSON lines wrap theme={null}
{
  "control_token": "b4647c9a-d4b8-4091-a5ff-dd67a7bb9ffc"
}
```


## Related topics

- [PINs Overview](https://www.marqeta.com/docs/core-api/pins.md)
- [Create or update PIN](https://www.marqeta.com/docs/core-api/pins/create-update.md)
- [Reveal PIN](https://www.marqeta.com/docs/core-api/pins/reveal.md)
- [Create card](https://www.marqeta.com/docs/core-api/cards/create-card.md)
- [Create velocity control](https://www.marqeta.com/docs/core-api/velocity-controls/create-velocity-control.md)
