> ## Documentation Index
> Fetch the complete documentation index at: https://dialnexa.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List Phone Country Rules

> List DialNexa phone country rules, calling codes, number lengths, and dialing prefixes for destination validation.

<span data-api-safety-label="read-only"><Badge color="gray" size="sm" shape="pill">Read only</Badge></span>

List phone country rules to read the destination countries known to DialNexa. Each active rule includes the ISO country code, calling code, optional maximum number length, and configured prefixes.

## When to list phone country rules

* Build a destination country selector.
* Normalize calling codes before submitting outbound numbers.
* Compare global country data with the network groups enabled for your workspace.

<Note>
  This operation returns the global country catalog. It does not mean every country or prefix is enabled for your workspace. Use [List Enabled Network Groups](/docs/api-reference/v1/phone-numbers/list-enabled-network-groups) for workspace-specific availability.
</Note>

## Verify the result

Match the destination's `country_iso` and `calling_code`. If `prefixes` is non-empty, use it as reference data only and still rely on the workspace-specific network group response before placing a call.

## Errors and recovery

* `401 Unauthorized` means the API key is missing or invalid.
* An empty array means no active country rules are currently available. Do not infer support from a stale local copy.

## Related endpoints

* [List Enabled Network Groups](/docs/api-reference/v1/phone-numbers/list-enabled-network-groups): read workspace-specific destination availability.
* [List Phone Number Pricing](/docs/api-reference/v1/phone-numbers/list-pricing): compare rental pricing by provider and country.
* [Create Call](/docs/api-reference/v1/calls/create): start an outbound call after validating the destination.


## OpenAPI

````yaml GET /v1/phone-country-rules/countries
openapi: 3.0.0
info:
  title: DialNexa API
  description: Public `/v1` REST API for the DialNexa voice AI platform.
  version: 1.0.0
servers:
  - url: https://api.dialnexa.com
    description: DialNexa production API
security:
  - bearer: []
tags:
  - name: Agents
  - name: Batch Calls
  - name: Calls
  - name: Knowledge Base
  - name: Languages
  - name: LLMs
  - name: Phone Numbers
  - name: Transcribers
  - name: Webhooks
  - name: Voices
  - name: Workflows
  - name: Workflow Leads
paths:
  /v1/phone-country-rules/countries:
    get:
      tags:
        - Phone Numbers
      summary: List Phone Country Rules
      description: >-
        Returns the active global country catalog with calling codes, number
        lengths, and prefixes.
      operationId: listPhoneCountryRules
      responses:
        '200':
          description: Active phone country rules returned successfully.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PhoneCountryRule'
        '401':
          description: Unauthorized - missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearer: []
components:
  schemas:
    PhoneCountryRule:
      type: object
      properties:
        id:
          type: string
          example: pcr_abc123xyz789
        country_iso:
          type: string
          minLength: 2
          maxLength: 2
          example: IN
        country_name:
          type: string
          example: India
        calling_code:
          type: string
          example: '91'
        max_length:
          type: integer
          nullable: true
          example: 10
        prefixes:
          type: array
          items:
            type: string
          example:
            - '98'
            - '99'
        is_deleted:
          type: boolean
          example: false
      required:
        - id
        - country_iso
        - country_name
        - calling_code
        - prefixes
        - is_deleted
    ErrorResponse:
      type: object
      properties:
        statusCode:
          type: integer
          example: 400
        message:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
          example: phone_number must be a valid E.164 phone number
        error:
          type: string
          example: Bad Request
      required:
        - statusCode
        - message
        - error
  securitySchemes:
    bearer:
      scheme: bearer
      type: http

````