Get Started
Usage API
More information

GET api/2.0/crm/voip/numbers/available This function requires authentication

Description

Returns all the available phone numbers matching the parameters specified in the request.

Parameters
Name Description Type Example
numberType
sent in body
Number type Local, TollFreeNextYear Local
isoCountryCode
sent in body
ISO country code string some text
Example
GET api/2.0/crm/voip/numbers/available
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "numberType": "Local",
  "isoCountryCode": "some text"
}
Returns

Phone numbers

Example Response

application/json

{
  "status": 0,
  "response": [
    {
      "Id": "id",
      "Number": "Number",
      "Alias": "Alias",
      "Settings": {
        "VoiceUrl": "VoiceUrl",
        "Name": "Name",
        "Operators": [
          {
            "Id": "92eb52c8-bb93-4caf-87fb-46ea11530899",
            "Answer": 1,
            "ClientID": "ClientID",
            "Record": true,
            "TimeOut": 1,
            "Status": 1,
            "AllowOutgoingCalls": true,
            "PostFix": "PostFix",
            "PhoneNumber": "PhoneNumber",
            "RedirectToNumber": "RedirectToNumber"
          }
        ],
        "Queue": {
          "Id": "id",
          "Name": "Name",
          "Size": 123,
          "WaitUrl": "WaitUrl",
          "WaitTime": 4
        },
        "Caller": {
          "Id": "92eb52c8-bb93-4caf-87fb-46ea11530899",
          "Answer": 1,
          "ClientID": "ClientID",
          "Record": true,
          "TimeOut": 1,
          "Status": 1,
          "AllowOutgoingCalls": true,
          "PostFix": "PostFix",
          "PhoneNumber": "PhoneNumber",
          "RedirectToNumber": "RedirectToNumber"
        },
        "WorkingHours": {
          "Enabled": true,
          "From": "2020-12-22T04:11:57.0469085+00:00",
          "To": "2020-12-22T04:11:57.0469085+00:00"
        },
        "VoiceMail": "VoiceMail",
        "GreetingAudio": "GreetingAudio",
        "HoldAudio": "HoldAudio",
        "AllowOutgoingCalls": true,
        "Pause": true,
        "Record": true
      },
      "Caller": {
        "Id": "92eb52c8-bb93-4caf-87fb-46ea11530899",
        "Answer": 1,
        "ClientID": "ClientID",
        "Record": true,
        "TimeOut": 1,
        "Status": 1,
        "AllowOutgoingCalls": true,
        "PostFix": "PostFix",
        "PhoneNumber": "PhoneNumber",
        "RedirectToNumber": "RedirectToNumber"
      }
    }
  ]
}

text/xml

<result>
  <status>0</status>
  <response>
    <Id>id</Id>
    <Number>Number</Number>
    <Alias>Alias</Alias>
    <Settings>
      <VoiceUrl>VoiceUrl</VoiceUrl>
      <Name>Name</Name>
      <Operators>
        <Id>92eb52c8-bb93-4caf-87fb-46ea11530899</Id>
        <Answer>1</Answer>
        <ClientID>ClientID</ClientID>
        <Record>True</Record>
        <TimeOut>1</TimeOut>
        <Status>1</Status>
        <AllowOutgoingCalls>True</AllowOutgoingCalls>
        <PostFix>PostFix</PostFix>
        <PhoneNumber>PhoneNumber</PhoneNumber>
        <RedirectToNumber>RedirectToNumber</RedirectToNumber>
      </Operators>
      <Queue>
        <Id>id</Id>
        <Name>Name</Name>
        <Size>123</Size>
        <WaitUrl>WaitUrl</WaitUrl>
        <WaitTime>4</WaitTime>
      </Queue>
      <Caller>
        <Id>92eb52c8-bb93-4caf-87fb-46ea11530899</Id>
        <Answer>1</Answer>
        <ClientID>ClientID</ClientID>
        <Record>True</Record>
        <TimeOut>1</TimeOut>
        <Status>1</Status>
        <AllowOutgoingCalls>True</AllowOutgoingCalls>
        <PostFix>PostFix</PostFix>
        <PhoneNumber>PhoneNumber</PhoneNumber>
        <RedirectToNumber>RedirectToNumber</RedirectToNumber>
      </Caller>
      <WorkingHours>
        <Enabled>True</Enabled>
        <From>2020-12-22T04:11:57.0469085+00:00</From>
        <To>2020-12-22T04:11:57.0469085+00:00</To>
      </WorkingHours>
      <VoiceMail>VoiceMail</VoiceMail>
      <GreetingAudio>GreetingAudio</GreetingAudio>
      <HoldAudio>HoldAudio</HoldAudio>
      <AllowOutgoingCalls>True</AllowOutgoingCalls>
      <Pause>True</Pause>
      <Record>True</Record>
    </Settings>
    <Caller>
      <Id>92eb52c8-bb93-4caf-87fb-46ea11530899</Id>
      <Answer>1</Answer>
      <ClientID>ClientID</ClientID>
      <Record>True</Record>
      <TimeOut>1</TimeOut>
      <Status>1</Status>
      <AllowOutgoingCalls>True</AllowOutgoingCalls>
      <PostFix>PostFix</PostFix>
      <PhoneNumber>PhoneNumber</PhoneNumber>
      <RedirectToNumber>RedirectToNumber</RedirectToNumber>
    </Caller>
  </response>
</result>