Skip to main content
PUT
/
api
/
v1
/
auth
/
user
/
id
/
{id}
/
pin
Update user PIN by ID
curl --request PUT \
  --url https://crypto.westminister.tech/api/v1/auth/user/id/{id}/pin \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "new_pin": "654321",
  "confirm_new_pin": "654321",
  "current_pin": "123456"
}
'
{
  "id": "5c81c005-1c52-4e0d-85e2-862ee1cdd4d0",
  "email": "user@example.com",
  "phone_number": "+254712345678",
  "first_name": "John",
  "last_name": "Doe",
  "role": "customer",
  "kyc_status": "pending"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

User ID.

Body

application/json

Request payload for updating or setting a user's 6-digit PIN.

new_pin
string
required

New 6-digit PIN to set.

Pattern: ^[0-9]{6}$
Example:

"654321"

confirm_new_pin
string
required

Must match new_pin.

Pattern: ^[0-9]{6}$
Example:

"654321"

current_pin
string

Existing 6-digit PIN. Required if a PIN is already set for the user.

Pattern: ^[0-9]{6}$
Example:

"123456"

Response

PIN updated successfully

id
string<uuid>

User ID.

email
string<email>

User email.

phone_number
string

Phone in E.164 format.

first_name
string

Given name.

last_name
string

Family name.

role
string

Assigned role.

kyc_status
string

Current KYC status.