---
title: "List Blocked/Allowed Phone Numbers"
method: GET
path: "/restapi/v1.0/account/{accountId}/extension/{extensionId}/caller-blocking/phone-numbers"
tags: ["Call Blocking"]
---

# List Blocked/Allowed Phone Numbers

`GET /restapi/v1.0/account/{accountId}/extension/{extensionId}/caller-blocking/phone-numbers`

## Request

- Base URL: `https://platform.ringcentral.com`
- URL: `https://platform.ringcentral.com/restapi/v1.0/account/{accountId}/extension/{extensionId}/caller-blocking/phone-numbers`
- 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/extension/:extensionId/caller-blocking/phone-numbers/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns the lists of blocked and allowed phone numbers.

## Path parameters

- `accountId` string, required
- `extensionId` string, required

## Query parameters

- `page` integer
- `perPage` integer
- `status` 'Blocked' | 'Allowed': Status of a phone number

## Response `200`

OK

- BlockedAllowedPhoneNumbersList: List of blocked or allowed phone numbers
  - `uri` string, uri: Link to a list of blocked/allowed phone numbers resource
  - `records` BlockedAllowedPhoneNumberInfo[]
    - `uri` string, uri: Link to a blocked/allowed phone number
    - `id` string: Internal identifier of a blocked/allowed phone number
    - `phoneNumber` string: A blocked/allowed phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format
    - `label` string: Custom name of a blocked/allowed phone number
    - `status` 'Blocked' | 'Allowed': Status of a phone number
  - `navigation` PageNavigationModel: Links to other pages of the current result set
    - `firstPage` PageNavigationUri
      - `uri` string, uri: Canonical URI to retrieve the particular page of the result set
    - `nextPage` PageNavigationUri
      - `uri` string, uri: Canonical URI to retrieve the particular page of the result set
    - `previousPage` PageNavigationUri
      - `uri` string, uri: Canonical URI to retrieve the particular page of the result set
    - `lastPage` PageNavigationUri
      - `uri` string, uri: Canonical URI to retrieve the particular page of the result set
  - `paging` EnumeratedPagingModel
    - `perPage` integer, required: Current page size, describes how many items are in each page. Matches "perPage" parameter from the request.
    - `page` integer: The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested)
    - `pageStart` integer: The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty
    - `pageEnd` integer: The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty
    - `totalPages` integer: The total number of pages in a dataset. May be omitted for some resources due to performance reasons
    - `totalElements` integer: The total number of elements in a dataset. May be omitted for some resource due to performance reasons

## Other responses

- `400`: General response with **HTTP 400 "Bad request"** status.<br> Reasons: unparsable request, path, query or body parameters are invalid. The error description may contain reference to particular parameter(s) which haven't passed the validation.
- `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)
