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

# Get included phone-number capacity for a country

> Returns included phone capacity for a country. Creating a phone is authoritative.



## OpenAPI

````yaml /api-reference/mobilerun-numbers.yaml get /numbers/phones/capacity
openapi: 3.1.0
info:
  title: Mobilerun Numbers
  version: v1
servers:
  - description: Droidrun Cloud API
    url: https://api.mobilerun.ai/v1
security:
  - bearerAuth: []
paths:
  /numbers/phones/capacity:
    get:
      tags:
        - Numbers
      summary: Get included phone-number capacity for a country
      description: >-
        Returns included phone capacity for a country. Creating a phone is
        authoritative.
      operationId: getPhoneCapacity
      parameters:
        - description: ISO 3166-1 alpha-2 country code from GET /numbers/phones/countries.
          in: query
          name: country
          required: true
          schema:
            description: >-
              ISO 3166-1 alpha-2 country code from GET
              /numbers/phones/countries.
            example: de
            maxLength: 2
            minLength: 2
            pattern: ^[a-z]{2}$
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/PhoneCapacityResponse'
                required:
                  - data
                type: object
          description: Capacity retrieved
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneCapacityError'
          description: Unsupported country
        '500':
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneCapacityUpstreamError'
          description: Capacity is temporarily unavailable.
        '503':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/NumberErrorResponse'
                  - $ref: '#/components/schemas/PhoneCapacityUpstreamError'
          description: The phone-number service or capacity information is unavailable.
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.numbers.capacity({ country: 'de' });

            console.log(response.data);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            response = client.numbers.capacity(
                country="de",
            )
            print(response.data)
components:
  schemas:
    PhoneCapacityResponse:
      properties:
        included:
          minimum: 0
          type: integer
        includedRemaining:
          deprecated: true
          description: >-
            Deprecated — always equal to `remaining`. Migrate to `remaining`;
            this field will be removed in a future revision.
          minimum: 0
          type: integer
        remaining:
          minimum: 0
          type: integer
        status:
          enum:
            - available
            - exhausted
            - not_included
          type: string
      required:
        - included
        - remaining
        - status
        - includedRemaining
      type: object
    PhoneCapacityError:
      properties:
        message:
          type: string
        reason:
          enum:
            - unsupported_country
          type: string
      required:
        - reason
        - message
      type: object
    PhoneCapacityUpstreamError:
      properties:
        message:
          type: string
        success:
          enum:
            - false
          type: boolean
      required:
        - success
        - message
      type: object
    NumberErrorResponse:
      properties:
        message:
          type: string
        reason:
          enum:
            - product_disabled
            - not_cancellable
          type: string
        success:
          enum:
            - false
          type: boolean
      required:
        - success
        - reason
        - message
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: Opaque
      description: Bearer token via Authorization header
      scheme: bearer
      type: http

````