TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

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

Description

Links a new phone number with the ID specified in the request to the VoIP provider.

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

{
  "id": "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>