Skip to main content
GET
/
phone-numbers
List phone numbers
curl --request GET \
  --url https://app2.freyavoice.ai/api/v2/phone-numbers \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data": {
    "message": "<string>",
    "result": {
      "phoneNumbers": [
        {
          "id": "<string>",
          "number": "<string>",
          "workspaceId": "<string>",
          "userId": "<string>",
          "createdAt": "<string>",
          "updatedAt": "<string>",
          "friendlyName": "<string>",
          "config": {
            "capabilities": {
              "voice": "<string>",
              "sms": true
            },
            "voiceConfig": "<string>",
            "messagingConfig": "<string>",
            "emergencyCalls": true,
            "configType": "agents",
            "inboundAgentId": "<string>",
            "outboundAgentId": "<string>",
            "inboundWorkflowId": "<string>",
            "outboundWorkflowId": "<string>",
            "originationUri": "<string>",
            "sipInbound": {
              "enabled": true
            },
            "sipOutbound": {
              "enabled": true,
              "endpoint": "<string>",
              "port": 123,
              "username": "<string>",
              "password": "<string>",
              "transportProtocol": "UDP",
              "secureMedia": true,
              "headers": [
                {
                  "key": "<string>",
                  "value": "<string>"
                }
              ]
            }
          },
          "inboundAgentName": "<string>",
          "outboundAgentName": "<string>",
          "inboundWorkflowName": "<string>",
          "outboundWorkflowName": "<string>"
        }
      ],
      "pagination": {
        "total": 123,
        "limit": 123,
        "offset": 123,
        "hasNext": true,
        "hasPrevious": true
      },
      "counts": {}
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

workspaceId
string<uuid>
required

Workspace ID

limit
string
default:25

Page size

offset
string
default:0

Offset for pagination

filters
string

Base64-encoded filter state

Global search term

sortBy
string

Sort field name

sortOrder
enum<string>

Sort direction

Available options:
asc,
desc
export
string

Set to 'true' to return a file export

exportFormat
enum<string>

Export file format

Available options:
csv,
xlsx,
markdown
exportColumns
string

JSON array of column definitions {id,label}

countBy
string

Column ID to return counts for (e.g., 'configType')

Response

Phone numbers with pagination

success
enum<boolean>
required
Available options:
true,
false
data
object
required