---
title: "Set PIN"
method: POST
path: "/auth/me/pin"
tags: ["auth"]
---

# Set PIN

`POST /auth/me/pin`

## Request

- Base URL: `https://api.instruxi.dev/api/v1/enforcer`
- URL: `https://api.instruxi.dev/api/v1/enforcer/auth/me/pin`
- Auth: API key in header `Authorization`

Enrolls a 4- or 6-digit PIN for the caller. First enrollment only: 409 `pin_already_set` when one exists (changes go through the 2FA reset flow). 412 `no_verified_contact` when the account has no verified email or phone on file — a PIN without a recovery channel is refused.

## Request body

- InternalDeliveryHttpHandlerPinRequest
  - `pin` string

## Response `200`

OK

- InternalDeliveryHttpHandlerPinStatusResponse
  - `data` InternalDeliveryHttpHandlerPinStatusData
    - `pin_length` integer
    - `pin_set` boolean
  - `success` boolean

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `409`: Conflict
- `412`: Precondition Failed

---

[API](https://skmtc.dev/instruxi/apis/enforcer-api.md) · [All operations](https://skmtc.dev/instruxi/apis/enforcer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/instruxi/apis/enforcer-api/revisions/fa82bc1becc0?raw)
