v1

latestOpenAPI 3.0.1MIT2026-07-26104203277.0 KB

Add a phone number for a user.

post/v1/voice-agents/phone-number

Request body

OR

Example request

{
  "sipInboundConfigs": {
    "originationUri": "sip:sip.eu.tryhamsa.com:5060;transport=tcp"
  },
  "sipOutboundConfigs": {
    "transportType": "TCP"
  }
}

Response

Successful response

successboolean
messagestring

Example response

{
  "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"
    },
    "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"
  }
}