Skip to main content
GET

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

string
required
Your workspace API key. Create one from the profile menu in the dashboard → API Keys.
string
required
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.
integer
default:"1"
Page number.
integer
default:"10"
Number of phone numbers per page, from 1 to 1000.
Case-insensitive text to match against the phone number, telephony provider, SIP host or SIP username. Partial matches are returned. Example: 9876 or plivo.

Response

array[object]
required
The phone numbers on this page.
string
Phone number ID. Use it in callingNumbers when creating or updating a campaign.
string
The phone number. SIP connections are identified by sipFromUser and sipHost.
string
Telephony provider: twilio, plivo, telnyx, sip, jambonz, elisiontec, nexmo or vobiz.
string
ID of the user who added the number.
string
When the number was added (ISO 8601).
string
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.
string
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.
string | null
Name of the inbound agent. null when no inbound agent is assigned.
string | null
Name of the outbound agent. null when no outbound agent is assigned.
integer | null
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.
integer | null
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.
string | null
ID of the inbound agent itself. It differs from inboundAgentId when the number is pinned to a version. Use it with the Agents endpoints.
string | null
ID of the outbound agent itself. It differs from outboundAgentId when the number is pinned to a version. Use it with the Agents endpoints.
string
SIP connections only: SIP host. The other SIP fields returned are sipPort, sipUsername and sipFromUser.
string
jambonz numbers only: name of the SIP carrier. The other jambonz fields returned are jambonzCarrierId and jambonzPhoneNumberSid.
object
required
Pagination details: total, page, limit, totalPages, hasNextPage and hasPrevPage.

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.