Set phone as primary

POST
/api/users/[user_id]/phones/[identifier_id]/primary

Path Parameters

user_id
string
Required

User Id

identifier_id
string
Required

The Id of the phone to be set as primary.

Authentication

X-API-KEY
header
Required

Api key needed to access the endpoints. X-API-KEY: Your_API_Key

Headers

accept
string
  • application/json
  • application/problem+json

Responses

200
OK
400
Bad Request
422
Unprocessable Entity
404
Not Found
401
Unauthorized
403
Forbidden

Request Example

Request
curl -X POST "https://<your-domain>/api/users/{user_id}/phones/{identifier_id}/primary" \
 -H "X-API-KEY: <your-api-key>" \
 -H "Accept: application/json"

Response Example

Response
200 OK
{
  "creation_time": 1640975400,
  "last_updated": 1640975400,
"private_data": {
"roles": [ "administrator"
], "has_dashboard_access": false, "member_since": 1672511400
},
"idps": [
{ "provider_user_id": "79a500f9-aba6-4f03-baec-c18f4b7136ad",
"claims": { "email": "user@example.com", "email_verified": "true", "name": "John Doe"
}, "authenticator": "google"
}
],
"emails": [
{
"authenticators": [ "password", "email"
], "verified": true, "id": "6cec8047-6149-4d9b-8d99-91c83c22a9dc", "email": "user@example.com", "primary": false,
"idps": [ "monocloud", "google"
]
}
],
"phone_numbers": [
{ "phone": "+441514960453",
"authenticators": [ "password", "phone"
], "verified": true, "id": "ab66b6a2-df6b-4f9d-9eb2-5a7142984e70", "primary": false,
"idps": [ "monocloud", "google"
]
}
], "password_updated_at": 1640975400, "user_id": "UOtBaOybB6dTpIJNrnkRw",
"claims": { "name": "John Doe", "given_name": "John", "family_name": "Doe"
},
"public_data": {
"color_preference": { "dashboard": "monochrome"
}, "send_emails": true, "days_to_retain": 1
}, "disabled": true,
"username": {
"authenticators": [ "password"
], "id": "9082b772-dbf6-4610-a71e-05fb93c0ab73",
"idps": [ "monocloud", "google"
], "username": "username"
}, "has_password": true }