---
title: "Get Company Call Handling Rule"
method: GET
path: "/restapi/v1.0/account/{accountId}/answering-rule/{ruleId}"
tags: ["Call Handling Rules"]
---

# Get Company Call Handling Rule

`GET /restapi/v1.0/account/{accountId}/answering-rule/{ruleId}`

## Request

- Base URL: `https://platform.ringcentral.com`
- URL: `https://platform.ringcentral.com/restapi/v1.0/account/{accountId}/answering-rule/{ruleId}`
- Auth: OAuth 2
  - Authorization code: `https://platform.ringcentral.com/restapi/oauth/authorize`
  - Token URL: `https://platform.ringcentral.com/restapi/oauth/token`
- TypeScript: <https://skmtc.dev/ringcentral/apis/ringcentral-api/docs/restapi/v1.0/account/:accountId/answering-rule/:ruleId/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns a company call handling rule by ID.

## Path parameters

- `accountId` string, required
- `ruleId` string, required

## Response `200`

OK

- CompanyAnsweringRuleInfo
  - `id` string: Internal identifier of an answering rule
  - `uri` string, uri: Canonical URI of an answering rule
  - `enabled` boolean: Specifies if the rule is active or inactive
  - `type` 'BusinessHours' | 'AfterHours' | 'Custom': Type of an answering rule
  - `name` string: Name of an answering rule specified by user. Max number of symbols is 30. The default value is 'My Rule N' where 'N' is the first free number
  - `callers` CompanyAnsweringRuleCallersInfoRequest[]: Answering rule will be applied when calls are received from the specified caller(s)
    - `callerId` string: Phone number of a caller
    - `name` string: Displayed name for a caller ID
  - `calledNumbers` CompanyAnsweringRuleCalledNumberInfoRequest[]: Answering rule will be applied when calling the specified number(s)
    - `id` string: Internal identifier of an account phone number
    - `phoneNumber` string: Phone number of a callee
  - `schedule` CompanyAnsweringRuleScheduleInfo: Schedule when an answering rule should be applied
    - `weeklyRanges` CompanyAnsweringRuleWeeklyScheduleInfoRequest: Weekly schedule. If specified, ranges cannot be specified
      - `monday` CompanyAnsweringRuleTimeIntervalRequest[]: Time interval for a particular day
        - `from` string: Time in format hh:mm
        - `to` string: Time in format hh:mm
      - `tuesday` CompanyAnsweringRuleTimeIntervalRequest[]: Time interval for a particular day
        - `from` string: Time in format hh:mm
        - `to` string: Time in format hh:mm
      - `wednesday` CompanyAnsweringRuleTimeIntervalRequest[]: Time interval for a particular day
        - `from` string: Time in format hh:mm
        - `to` string: Time in format hh:mm
      - `thursday` CompanyAnsweringRuleTimeIntervalRequest[]: Time interval for a particular day
        - `from` string: Time in format hh:mm
        - `to` string: Time in format hh:mm
      - `friday` CompanyAnsweringRuleTimeIntervalRequest[]: Time interval for a particular day
        - `from` string: Time in format hh:mm
        - `to` string: Time in format hh:mm
      - `saturday` CompanyAnsweringRuleTimeIntervalRequest[]: Time interval for a particular day
        - `from` string: Time in format hh:mm
        - `to` string: Time in format hh:mm
      - `sunday` CompanyAnsweringRuleTimeIntervalRequest[]: Time interval for a particular day
        - `from` string: Time in format hh:mm
        - `to` string: Time in format hh:mm
    - `ranges` RangesInfo[]: Specific data ranges. If specified, weeklyRanges cannot be specified
      - `from` string, date-time: Beginning timestamp of the range in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100*
      - `to` string, date-time: Ending timestamp of the range in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100*
    - `ref` 'BusinessHours' | 'AfterHours': Reference to Business Hours or After Hours schedule = ['BusinessHours', 'AfterHours']
  - `callHandlingAction` 'Operator' | 'Disconnect' | 'Bypass': Specifies how incoming calls are forwarded. The default value is 'Operator' 'Operator' - play company greeting and forward to operator extension 'Disconnect' - play company greeting and disconnect 'Bypass' - bypass greeting to go to selected extension = ['Operator', 'Disconnect', 'Bypass']
  - `extension` CompanyAnsweringRuleExtensionInfoRequest: Extension to which the call is forwarded in 'Bypass' mode
    - `id` string: Internal identifier of an extension
  - `greetings` GreetingInfo[]: Greetings applied for an answering rule; only predefined greetings can be applied, see Dictionary Greeting List
    - `type` 'Introductory' | 'Announcement' | 'AutomaticRecording' | 'BlockedCallersAll' | 'BlockedCallersSpecific' | 'BlockedNoCallerId' | 'BlockedPayPhones' | 'ConnectingMessage' | 'ConnectingAudio' | 'StartRecording' | 'StopRecording' | 'Voicemail' | 'Unavailable' | 'InterruptPrompt' | 'HoldMusic' | 'Company': Type of greeting, specifying the case when the greeting is played.
    - `preset` PresetInfo
      - `uri` string, uri: Link to a greeting resource
      - `id` string: Internal identifier of a greeting
      - `name` string: Name of a greeting
    - `custom` CustomGreetingInfoRequest
      - `id` string: Internal identifier of a custom user greeting

## Other responses

- `404`: General response with **HTTP 404 "Not found"** status.<br> Reasons: the entity with given ID (typically specified in a path parameter), is not found or inaccessible
- `500`: General response with **HTTP 500 "Internal Server Error"** status.<br> Reasons: general server-side error.
- `503`: General response with **HTTP 503 "Service not available"** status.<br> Reasons: server cannot process the request because of being overloaded, misconfiguration or other issues.

---

[API](https://skmtc.dev/ringcentral/apis/ringcentral-api.md) - [All operations](https://skmtc.dev/ringcentral/apis/ringcentral-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ringcentral/apis/ringcentral-api/revisions/8d602198ec97?raw)
