Creates a new user phone number from provided data
curl --request POST \
--url https://api.rootly.com/v1/users/{user_id}/phone_numbers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '{
"data": {
"type": "user_phone_numbers",
"attributes": {
"phone": "<string>"
}
}
}'
{
"data": {
"id": "dce58e06-6b86-4ef1-86a0-12e8ee0c89ed",
"type": "user_phone_numbers",
"attributes": {
"user_id": 513,
"phone": "+14155552671",
"primary": true,
"created_at": "2025-09-11T06:46:10.677-07:00",
"updated_at": "2025-09-11T06:46:10.677-07:00"
}
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
user_phone_number created
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://api.rootly.com/v1/users/{user_id}/phone_numbers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '{
"data": {
"type": "user_phone_numbers",
"attributes": {
"phone": "<string>"
}
}
}'
{
"data": {
"id": "dce58e06-6b86-4ef1-86a0-12e8ee0c89ed",
"type": "user_phone_numbers",
"attributes": {
"user_id": 513,
"phone": "+14155552671",
"primary": true,
"created_at": "2025-09-11T06:46:10.677-07:00",
"updated_at": "2025-09-11T06:46:10.677-07:00"
}
}
}