Set the user phone
POSThttps://$CUSTOM-DOMAIN/v2/users/:userId/phone
Set the phone number of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by sms..
Request​
Path Parameters
- application/json
- application/grpc
- application/grpc-web+proto
Body
required
Possible values: non-empty
and <= 200 characters
Body
required
Possible values: non-empty
and <= 200 characters
Body
required
Possible values: non-empty
and <= 200 characters
Responses​
- 200
- 403
- 404
- default
OK
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
- Example (from schema)
Schema
details
object
{
"details": {
"sequence": "2",
"changeDate": "2025-03-31T10:57:48.441Z",
"resourceOwner": "69629023906488334",
"creationDate": "2025-03-31T10:57:48.441Z"
},
"verificationCode": "string"
}
- Schema
- Example (from schema)
Schema
details
object
{
"details": {
"sequence": "2",
"changeDate": "2025-03-31T10:57:48.441Z",
"resourceOwner": "69629023906488334",
"creationDate": "2025-03-31T10:57:48.441Z"
},
"verificationCode": "string"
}
- Schema
- Example (from schema)
Schema
details
object
{
"details": {
"sequence": "2",
"changeDate": "2025-03-31T10:57:48.442Z",
"resourceOwner": "69629023906488334",
"creationDate": "2025-03-31T10:57:48.442Z"
},
"verificationCode": "string"
}
Returned when the user does not have permission to access the resource.
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Returned when the resource does not exist.
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
An unexpected error response.
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L 'https://$CUSTOM-DOMAIN/v2/users/:userId/phone' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"phone": "+41791234567",
"sendCode": {},
"returnCode": {},
"isVerified": true
}'