Question

How use method Create Company Call Handling Rule ? Always has error "Parameter [callerId] value is invalid"

  • 1 October 2018
  • 2 replies
  • 915 views

Not working method Create Company Call Handling Rule by Api. Always error "Parameter [callerId] value is invalid". But i try phone number in different formats. Try extension ID, number id also. Maybe somebody know how Create Company rule by API. Which caller id is correct?


2 replies

Are you trying the API Explorer? Or could you please post your code?
Just tried this one:

POST https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/answering-rule
{
  "enabled": true,
  "callers": [
    {
      "callerId": "+15551234567"
    }
  ]
}

and the response looks fine:

HTTP 200 OK
{
  "uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/.../answering-rule/198652004",
  "id": "198652004",
  "type": "Custom",
  "name": "My Rule 1",
  "enabled": true,
  "callers": [
    {
      "callerId": "15551234567"
    }
  ],
  "greetings": [
    {
      "type": "Company",
      "preset": {
        "uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/dictionary/greeting/262145";,
        "id": "262145",
        "name": "Company Greeting"
      }
    }
  ],
  "callHandlingAction": "Operator"
}

So, as Tyler already asked, could you please provide your API request?

Reply