Request a change of the users phone number
The endpoint will issue an email to the customer, to confirm the update of the phone number is valid. After confirmation by the user an SMS is send to the user to verify the phone number. The SMS contains a code, that needs to be provided to the verify user phone operation. Mailing the customer will be omitted for the first time (if there is no phone number set). If the process is not completed within 24h the process is canceled.
Responses
-
Phone number is set
-
Phone number is set but not verified
-
401 application/vnd.api+json
OAuth token missing or invalid or a linked identity is missing.
Linked identity missing is a special case where you need to make sure that the user has additionally logged in / authorized with a third-party.
This is not relevant for most use-cases.
The specific error code that identifies a missing linked identity is
missing-linked-identity
Example:
{ "errors": [ { "id": "cbgmhslmp1o9or9kh1p0", "title": "Missing linked identity for authorized access", "detail": "Linked identity is needed to access this resource, please check why the user does not have a linked identity", "status": "401", "code": "missing-linked-identity" } ] }
-
404 application/vnd.api+json
Resource not found
-
501 application/vnd.api+json
Internal server error
curl \
-X PUT https://api.pace.cloud/user/2023-1/user/phone \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/vnd.api+json"
{
"data": {
"type": "phone",
"id": "string",
"attributes": {
"phoneNumber": "+49 170 888 999 000"
}
}
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}