> ## 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.

# Pool-device capacity hint for the BYO upload flow

> Reports whether a free device is currently available, for pre-checking the import flow before upload. This is a hint only, not a reservation — `POST /esims/import` re-checks availability at submit time.



## OpenAPI

````yaml /api-reference/mobilerun-numbers.yaml get /numbers/esims/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/esims/capacity:
    get:
      tags:
        - Esims
      summary: Pool-device capacity hint for the BYO upload flow
      description: >-
        Reports whether a free device is currently available, for pre-checking
        the import flow before upload. This is a hint only, not a reservation —
        `POST /esims/import` re-checks availability at submit time.
      operationId: getEsimCapacity
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/EsimCapacityResponse'
                required:
                  - data
                type: object
          description: Capacity hint
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EsimErrorResponse'
          description: >-
            Service Unavailable — esims are disabled for this deployment (see
            `reason`)
      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.esims.capacity();

            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.esims.capacity()
            print(response.data)
components:
  schemas:
    EsimCapacityResponse:
      properties:
        available:
          type: boolean
        freeDevices:
          minimum: 0
          type: integer
      required:
        - available
        - freeDevices
      type: object
    EsimErrorResponse:
      properties:
        message:
          type: string
        reason:
          enum:
            - out_of_stock
            - owner_esim_cap
            - byo_disabled
            - byo_esim_cap
            - byo_daily_import_limit
            - byo_failed_limit
            - esim_not_owned
            - device_pool_empty
            - device_claim_cap
            - operator_resolution_required
            - idempotency_conflict
            - byo_awaiting_payment_cap
            - operator_review_required
            - byo_not_reassignable
            - product_disabled
          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

````