curl --location --request PUT 'https://api.weya.live/backend/api/call/update-phone/6872d4b5f8d7a91234567890' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"accSId": "YOUR_PROVIDER_ACCOUNT_ID",
"authToken": "YOUR_PROVIDER_AUTH_TOKEN"
}'
{
"status": true,
"code": 200,
"message": "Phone updated successfully",
"errorMessage": null,
"data": {
"_id": "6872d4b5f8d7a91234567890",
"phoneNumber": "+919876543210",
"integration": "plivo",
"userId": "64e5f12345abcdef12345678",
"createdAt": "2026-07-20T10:15:30.000Z",
"updatedAt": "2026-11-19T09:00:00.000Z"
}
}
Phone Numbers
Update Phone Number
Update a phone number’s provider credentials or SIP settings.
PUT
/
api
/
call
/
update-phone
/
{phoneId}
curl --location --request PUT 'https://api.weya.live/backend/api/call/update-phone/6872d4b5f8d7a91234567890' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"accSId": "YOUR_PROVIDER_ACCOUNT_ID",
"authToken": "YOUR_PROVIDER_AUTH_TOKEN"
}'
{
"status": true,
"code": 200,
"message": "Phone updated successfully",
"errorMessage": null,
"data": {
"_id": "6872d4b5f8d7a91234567890",
"phoneNumber": "+919876543210",
"integration": "plivo",
"userId": "64e5f12345abcdef12345678",
"createdAt": "2026-07-20T10:15:30.000Z",
"updatedAt": "2026-11-19T09:00:00.000Z"
}
}
Overview
Update the details of one of your phone numbers, such as its provider credentials or SIP connection settings. Send only the fields you want to change; the values are saved as sent. Unlike Add Phone Number, this endpoint doesn’t check credentials with the provider or set up call events again. Make sure new credentials are correct before you save them. To change which agent handles a number, assign the agent from the dashboard’s Phone Numbers page.Prerequisites
- An API key for your workspace
- The phone number’s ID (
_idfrom Get Phone Numbers). The number must have been added by the user who owns the API key.
Request
curl --location --request PUT 'https://api.weya.live/backend/api/call/update-phone/6872d4b5f8d7a91234567890' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"accSId": "YOUR_PROVIDER_ACCOUNT_ID",
"authToken": "YOUR_PROVIDER_AUTH_TOKEN"
}'
Request Parameters
All fields are optional._id, userId, organization, createdAt and updatedAt are ignored if sent.
Response
{
"status": true,
"code": 200,
"message": "Phone updated successfully",
"errorMessage": null,
"data": {
"_id": "6872d4b5f8d7a91234567890",
"phoneNumber": "+919876543210",
"integration": "plivo",
"userId": "64e5f12345abcdef12345678",
"createdAt": "2026-07-20T10:15:30.000Z",
"updatedAt": "2026-11-19T09:00:00.000Z"
}
}
The updated phone number record. It also contains the stored credentials, so don’t log the response.
Error Handling
Errors returnstatus: false, with the reason in errorMessage.
- 400 Bad Request –
Invalid Phone ID. - 401 Unauthorized – Missing or invalid API key.
- 404 Not Found –
Phone not found: the number doesn’t exist or wasn’t added by the user who owns the API key. - 500 Internal Server Error – Unexpected server error.
Was this page helpful?

