Skip to main content
POST
/
api
/
v1
/
account
/
phone
/
otp
Request a phone-change code
curl --request POST \
  --url https://sandbox.api.nkama.ga/api/v1/account/phone/otp \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "newPhoneNumber": "<string>"
}
'
{
  "challengeId": "<string>",
  "expiresAt": "2023-11-07T05:31:56Z",
  "maskedDestination": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer access token (JWT) issued by Keycloak or the sandbox token endpoint.

Body

application/json
newPhoneNumber
string
required
Minimum string length: 1
Pattern: ^\+[1-9]\d{6,14}$

Response

201 - */*

Created

challengeId
string
channel
enum<string>
Available options:
WHATSAPP,
SMS,
EMAIL
expiresAt
string<date-time>
maskedDestination
string