curl --location 'https://api.weya.live/backend/api/call/get-phone-with-agent/64e5f12345abcdef12345678?page=1&limit=50' \
--header 'x-api-key: YOUR_API_KEY'
{
"status": true,
"code": 200,
"message": "Phones with agent names retrieved successfully",
"errorMessage": null,
"data": {
"phones": [
{
"_id": "6872d4b5f8d7a91234567890",
"phoneNumber": "+919876543210",
"integration": "plivo",
"inboundAgentId": "686ab1234567890abcdef123",
"outboundAgentId": "686ab1234567890abcdef456",
"inboundAgentName": "Customer Support Agent",
"outboundAgentName": "Sales Agent",
"inboundAgentVersion": 4,
"outboundAgentVersion": 2,
"inboundAgentRootId": "686ab1234567890abcdef123",
"outboundAgentRootId": "686ab1234567890abcdef400",
"activeInboundBatchId": "6806382f98da85ec32fac955",
"activeInboundBatchName": "Support Line",
"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 with Agents
List your phone numbers with their assigned agents and the inbound campaign each one is active on.
GET
/
api
/
call
/
get-phone-with-agent
/
{userId}
curl --location 'https://api.weya.live/backend/api/call/get-phone-with-agent/64e5f12345abcdef12345678?page=1&limit=50' \
--header 'x-api-key: YOUR_API_KEY'
{
"status": true,
"code": 200,
"message": "Phones with agent names retrieved successfully",
"errorMessage": null,
"data": {
"phones": [
{
"_id": "6872d4b5f8d7a91234567890",
"phoneNumber": "+919876543210",
"integration": "plivo",
"inboundAgentId": "686ab1234567890abcdef123",
"outboundAgentId": "686ab1234567890abcdef456",
"inboundAgentName": "Customer Support Agent",
"outboundAgentName": "Sales Agent",
"inboundAgentVersion": 4,
"outboundAgentVersion": 2,
"inboundAgentRootId": "686ab1234567890abcdef123",
"outboundAgentRootId": "686ab1234567890abcdef400",
"activeInboundBatchId": "6806382f98da85ec32fac955",
"activeInboundBatchName": "Support Line",
"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, with their inbound and outbound agents and the inbound campaign each number is currently active on. Results are paginated and sorted newest first. This is the list the dashboard shows when you pick Calling Numbers for a campaign. Unlike Get Phone Numbers, this list also includes deleted jambonz numbers.Prerequisites
- An API key for your workspace
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, SIP username or SIP from user. Partial matches are returned.
curl --location 'https://api.weya.live/backend/api/call/get-phone-with-agent/64e5f12345abcdef12345678?page=1&limit=50' \
--header 'x-api-key: YOUR_API_KEY'
Response
{
"status": true,
"code": 200,
"message": "Phones with agent names retrieved successfully",
"errorMessage": null,
"data": {
"phones": [
{
"_id": "6872d4b5f8d7a91234567890",
"phoneNumber": "+919876543210",
"integration": "plivo",
"inboundAgentId": "686ab1234567890abcdef123",
"outboundAgentId": "686ab1234567890abcdef456",
"inboundAgentName": "Customer Support Agent",
"outboundAgentName": "Sales Agent",
"inboundAgentVersion": 4,
"outboundAgentVersion": 2,
"inboundAgentRootId": "686ab1234567890abcdef123",
"outboundAgentRootId": "686ab1234567890abcdef400",
"activeInboundBatchId": "6806382f98da85ec32fac955",
"activeInboundBatchName": "Support Line",
"createdAt": "2026-07-20T10:15:30.000Z"
}
],
"pagination": {
"total": 1,
"page": 1,
"limit": 50,
"totalPages": 1,
"hasNextPage": false,
"hasPrevPage": false
}
}
}
userId), plus the inbound campaign fields below. Agent fields are left out, rather than null, when no agent is assigned.
ID of the inbound campaign this number currently receives calls for. Left out or
null if it isn’t active on any inbound campaign.Error Handling
- 401 Unauthorized – Missing or invalid API key.
- 500 Internal Server Error – Unexpected server error.
A phone number can be active on only one inbound campaign at a time. Creating an inbound campaign with Upload Campaign CSV using a number that is already active elsewhere returns
409 Conflict unless you send confirmReassign: "true".Was this page helpful?

