GET
/
v1
/
voice-agents
/
twilio
/
phone-number
/
list
curl --request GET \
  --url https://api.tryhamsa.com/v1/voice-agents/twilio/phone-number/list \
  --header 'Authorization: <api-key>'
{
  "success": true,
  "message": "Success",
  "data": [
    {
      "id": "d949f13f-40d2-4e48-ac86-b66633070603",
      "number": "+9700000000",
      "label": "My Twilio Number",
      "numberSid": "PNXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "isActive": true,
      "userId": "d949f13f-40d2-4e48-ac86-b66633070603",
      "voiceAgentId": null,
      "createdAt": "2023-01-01T12:00:00Z",
      "updatedAt": "2023-02-01T12:00:00Z"
    }
  ]
}

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 <api-key>'

Query Parameters

voiceAgentId
string

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

Example:

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

isActive
string

Optional boolean-like string indicating whether to fetch active Twilio numbers. Defaults to 'true'.

Example:

"true"

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"

Response

200
application/json

Successful response

The response is of type object.