Set the caller's Phone Number
Sets the authenticated user’s phone number and country code together; both are required. This is the self-service twin of PATCH /v1/users/, which is administrator-only — and unlike that merge endpoint it writes ONLY these two fields. Clearing the number is DELETE /v1/users//phone, which is refused while SMS MFA is enabled; an empty phone here is rejected with 400 rather than clearing anything. Authorized on the “own-profile” resource, which every authenticated user holds, and confined to the caller’s own account: an other than the token subject is refused with 403 / IDE-0057.
Authorizations
Bearer authentication. Send Authorization: Bearer .
Path Parameters
Caller's own User ID
Body
User Phone Input
UserPhoneInput payload
User's ISO 3166-1 alpha-2 country code. Required.
len=2,alpha is the closest shape this repo's validator can express — it has no iso3166_1_alpha2 rule and no uppercase rule. The authoritative check is Casdoor's, which rejects a country code that does not resolve against the phone number.
"BR"
User's phone number in E.164 format. Required.
5511998888777

