Skip to main content

Change PIN

POST/subscribers/{id}/change-pinOpen in the API playground →
Warning

Changing PIN requires verification of the current PIN first.

Request

Authorizationstringheaderrequired

Bearer olive_live_xxx or Bearer eyJ... (JWT)

Path Parameters

idstringpathrequired

Subscriber UUID (e.g., sub_abc123)

Body Parameters

current_pinstringbodyrequired

Current 4-digit PIN

new_pinstringbodyrequired

New 4-digit PIN


Response

successboolean

Whether change succeeded

messagestring

Result message


Examples

Request
cURL
curl -X POST "https://demo.api.vultlocal.com/api/v1/subscribers/sub_abc123/change-pin" \
-H "Authorization: Bearer olive_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"current_pin": "1234",
"new_pin": "5678"
}'
Response
200 Success
{
"success": true,
"message": "PIN changed successfully"
}
401 Wrong PIN
{
"success": false,
"message": "Current PIN is incorrect",
"attempts_remaining": 2
}
400 Invalid New PIN
{
"success": false,
"message": "New PIN must be 4 digits",
"code": "INVALID_PIN_FORMAT"
}

PIN Rules

Format
  • Exactly 4 digits
  • Numbers only (0-9)
  • No spaces or special characters
Security
  • Cannot be same as current PIN
  • Sequential patterns discouraged
  • Simple patterns (1111) warned

Validation

RuleInvalid ExampleReason
Length123Must be 4 digits
Numeric12abNumbers only
Same as current12341234Must be different

Notifications

Info

A WhatsApp notification is sent to the subscriber when their PIN is changed.


Errors

StatusCodeDescription
400INVALID_PIN_FORMATPIN must be 4 digits
400SAME_PINNew PIN same as current
401UNAUTHORIZEDInvalid or missing API key
401WRONG_CURRENT_PINCurrent PIN incorrect
403ACCOUNT_LOCKEDToo many failed attempts
404NOT_FOUNDSubscriber not found
500INTERNAL_ERRORServer error

Verify PIN

Verify a PIN without changing it