Skip to main content
GET
/
v1
/
voice-agents
/
phone-number
/
list
Return a list of phone numbers for a user.
curl --request GET \
  --url https://api.tryhamsa.com/v1/voice-agents/phone-number/list \
  --header 'Authorization: <api-key>'
{
  "success": true,
  "message": "Success",
  "data": [
    {
      "id": "d949f13f-40d2-4e48-ac86-b66633070603",
      "number": "+9700000000",
      "label": "My Twilio Number",
      "type": "TWILIO",
      "userId": "d949f13f-40d2-4e48-ac86-b66633070603",
      "sipInboundConfigs": {
        "originationUri": "sip:sip.eu.tryhamsa.com:5060;transport=tcp"
      },
      "sipOutboundConfigs": {
        "address": "sip.example.com",
        "transportType": "TCP",
        "customHeaders": {}
      },
      "voiceAgentId": "d949f13f-40d2-4e48-ac86-b66633070603",
      "voiceAgent": {
        "id": "d949f13f-40d2-4e48-ac86-b66633070603",
        "name": "My Voice Agent"
      },
      "createdAt": "2023-01-01T12:00:00Z",
      "updatedAt": "2023-02-01T12:00:00Z"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.tryhamsa.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Pass the API key in the Authorization header, You need to put Token keyword before the API key. e.g. 'Authorization: Token '

Query Parameters

voiceAgentId
string

Optional UUID of the voice agent to filter associated Twilio numbers.

Example:

"d949f13f-40d2-4e48-ac86-b66633070603"

skip
string

Page number for pagination. Defaults to '1'.

Example:

"1"

take
string

Number of items to take for pagination. Defaults to '10'.

Example:

"10"

provider
enum<string>

The type of the phone numbers provider to filter upon.

Available options:
TWILIO,
SIP
Example:

"TWILIO"

Response

Successful response

success
boolean
Example:

true

message
string
Example:

"Success"

data
object[]