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

  • 1
  • Problem
  • Updated 2 months ago
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?
Photo of Nikolay Naau

Nikolay Naau

  • 130 Points 100 badge 2x thumb

Posted 2 months ago

  • 1
Photo of Tyler Long

Tyler Long, Official Rep

  • 8,492 Points 5k badge 2x thumb
Are you trying the API Explorer? Or could you please post your code?
Photo of Victor Shisterov

Victor Shisterov

  • 100 Points 100 badge 2x thumb
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?