Get Started
Usage API
More information

POST api/2.0/crm/voip/numbers This function requires authentication

Description

Buys a phone number specified in the request.

Parameters
Name Description Type Example
number
sent in body
Phone number string some text
Example
POST api/2.0/crm/voip/numbers
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "number": "some text"
}
Returns

Phone number

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>