curl --location 'https://api.weya.live/backend/api/call/get-phone/64e5f12345abcdef12345678?page=1&limit=50' \
--header 'x-api-key: YOUR_API_KEY'
curl --location 'https://api.weya.live/backend/api/call/get-phone/64e5f12345abcdef12345678?search=plivo' \
--header 'x-api-key: YOUR_API_KEY'
{
"status": true,
"code": 200,
"message": "User with phones retrieved successfully",
"errorMessage": null,
"data": {
"phones": [
{
"_id": "6872d4b5f8d7a91234567890",
"phoneNumber": "+919876543210",
"integration": "plivo",
"userId": "64e5f12345abcdef12345678",
"inboundAgentId": "686ab1234567890abcdef123",
"outboundAgentId": "686ab1234567890abcdef456",
"inboundAgentName": "Customer Support Agent",
"outboundAgentName": "Sales Agent",
"inboundAgentVersion": 4,
"outboundAgentVersion": 2,
"inboundAgentRootId": "686ab1234567890abcdef123",
"outboundAgentRootId": "686ab1234567890abcdef400",
"createdAt": "2026-07-20T10:15:30.000Z"
}
],
"pagination": {
"total": 1,
"page": 1,
"limit": 50,
"totalPages": 1,
"hasNextPage": false,
"hasPrevPage": false
}
}
}
Phone Numbers
Get Phone Numbers
List your phone numbers with their telephony provider and assigned agents.
GET
/
api
/
call
/
get-phone
/
{userId}
curl --location 'https://api.weya.live/backend/api/call/get-phone/64e5f12345abcdef12345678?page=1&limit=50' \
--header 'x-api-key: YOUR_API_KEY'
curl --location 'https://api.weya.live/backend/api/call/get-phone/64e5f12345abcdef12345678?search=plivo' \
--header 'x-api-key: YOUR_API_KEY'
{
"status": true,
"code": 200,
"message": "User with phones retrieved successfully",
"errorMessage": null,
"data": {
"phones": [
{
"_id": "6872d4b5f8d7a91234567890",
"phoneNumber": "+919876543210",
"integration": "plivo",
"userId": "64e5f12345abcdef12345678",
"inboundAgentId": "686ab1234567890abcdef123",
"outboundAgentId": "686ab1234567890abcdef456",
"inboundAgentName": "Customer Support Agent",
"outboundAgentName": "Sales Agent",
"inboundAgentVersion": 4,
"outboundAgentVersion": 2,
"inboundAgentRootId": "686ab1234567890abcdef123",
"outboundAgentRootId": "686ab1234567890abcdef400",
"createdAt": "2026-07-20T10:15:30.000Z"
}
],
"pagination": {
"total": 1,
"page": 1,
"limit": 50,
"totalPages": 1,
"hasNextPage": false,
"hasPrevPage": false
}
}
}
Overview
List the phone numbers added by the user who owns the API key, including their telephony provider and the inbound and outbound agents assigned to them. Results are paginated and sorted newest first. Use a number’s_id as a callingNumbers entry when you create or update a campaign.
To see which inbound campaign each number is active on, use Get Phone Numbers with Agents.
Prerequisites
- An API key for your workspace
Endpoint
Request
Your user ID. The path needs a value, but it isn’t used to filter: numbers are always returned for the user who owns the API key.
Case-insensitive text to match against the phone number, telephony provider, SIP host or SIP username. Partial matches are returned. Example:
9876 or plivo.curl --location 'https://api.weya.live/backend/api/call/get-phone/64e5f12345abcdef12345678?page=1&limit=50' \
--header 'x-api-key: YOUR_API_KEY'
curl --location 'https://api.weya.live/backend/api/call/get-phone/64e5f12345abcdef12345678?search=plivo' \
--header 'x-api-key: YOUR_API_KEY'
Response
{
"status": true,
"code": 200,
"message": "User with phones retrieved successfully",
"errorMessage": null,
"data": {
"phones": [
{
"_id": "6872d4b5f8d7a91234567890",
"phoneNumber": "+919876543210",
"integration": "plivo",
"userId": "64e5f12345abcdef12345678",
"inboundAgentId": "686ab1234567890abcdef123",
"outboundAgentId": "686ab1234567890abcdef456",
"inboundAgentName": "Customer Support Agent",
"outboundAgentName": "Sales Agent",
"inboundAgentVersion": 4,
"outboundAgentVersion": 2,
"inboundAgentRootId": "686ab1234567890abcdef123",
"outboundAgentRootId": "686ab1234567890abcdef400",
"createdAt": "2026-07-20T10:15:30.000Z"
}
],
"pagination": {
"total": 1,
"page": 1,
"limit": 50,
"totalPages": 1,
"hasNextPage": false,
"hasPrevPage": false
}
}
}
ID of the agent that answers incoming calls on this number, if any. When the number is pinned to an agent version, this is the version’s ID.
ID of the agent that places outgoing calls from this number, if any. When the number is pinned to an agent version, this is the version’s ID.
Version of the inbound agent the number uses: the pinned version, or the agent’s latest version when the number follows the latest.
null when no inbound agent is assigned.Version of the outbound agent the number uses: the pinned version, or the agent’s latest version when the number follows the latest.
null when no outbound agent is assigned.ID of the inbound agent itself. It differs from
inboundAgentId when the number is pinned to a version. Use it with the Agents endpoints.ID of the outbound agent itself. It differs from
outboundAgentId when the number is pinned to a version. Use it with the Agents endpoints.SIP connections only: SIP host. The other SIP fields returned are
sipPort, sipUsername and sipFromUser.jambonz numbers only: name of the SIP carrier. The other jambonz fields returned are
jambonzCarrierId and jambonzPhoneNumberSid.Error Handling
- 401 Unauthorized – Missing or invalid API key.
- 500 Internal Server Error – Unexpected server error.
After listing your phone numbers, you can:
GET /api/call/get-phone-with-agent/{userId}to see which inbound campaign each number is active on.PUT /api/call/update-phone/{phoneId}to update a number.DELETE /api/call/delete-phone/{phoneId}to remove a number.
Was this page helpful?

