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

# Phone availability summary

> Returns a capacity snapshot to check before POST /phones:allocate: shared-pool availability broken down by phone type and by location, plus the caller org's dedicated phones with how many are idle (claimable right now). Optional phone_type and location filters narrow every count. Advisory only - availability can change between this read and an allocate, so allocation remains the authority and can still refuse.



## OpenAPI

````yaml /api-reference/openapi-backend.json get /phones/availability
openapi: 3.1.0
info:
  description: Axilio backend HTTP API.
  title: Axilio API
  version: 0.85.0
servers:
  - url: https://api.axilio.ai/api/v1
    description: Production
security: []
tags:
  - name: API Keys
  - name: Billing
  - name: Files
  - name: Organization
  - name: Phones
  - name: Runs
  - name: Skill
  - name: Usage
  - name: Workflows
paths:
  /phones/availability:
    get:
      tags:
        - Phones
      summary: Phone availability summary
      description: >-
        Returns a capacity snapshot to check before POST /phones:allocate:
        shared-pool availability broken down by phone type and by location, plus
        the caller org's dedicated phones with how many are idle (claimable
        right now). Optional phone_type and location filters narrow every count.
        Advisory only - availability can change between this read and an
        allocate, so allocation remains the authority and can still refuse.
      operationId: phones_availability
      parameters:
        - description: Only count phones of this platform.
          explode: false
          in: query
          name: phone_type
          schema:
            description: Only count phones of this platform.
            enum:
              - android
              - iphone
            type: string
        - description: Only count phones at this location slug.
          explode: false
          in: query
          name: location
          schema:
            description: Only count phones at this location slug.
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneAvailabilityResponse'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/V2ErrorModel'
          description: Error
      security:
        - apiKeyAuth: []
components:
  schemas:
    PhoneAvailabilityResponse:
      additionalProperties: false
      description: >-
        Phone availability summary: shared-pool capacity plus the caller org's
        dedicated idle counts. An advisory snapshot - allocation is the
        authority and can still refuse.
      properties:
        dedicated:
          $ref: '#/components/schemas/PhoneDedicatedAvailability'
          description: The caller org's dedicated phones.
        shared:
          $ref: '#/components/schemas/PhoneSharedAvailability'
          description: Shared-pool availability, fleet-wide.
      required:
        - shared
        - dedicated
      type: object
    V2ErrorModel:
      additionalProperties: false
      description: >-
        Error response, following RFC 9457 (Problem Details for HTTP APIs).
        Returned with a application/problem+json content type.
      properties:
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/V2ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
      type: object
    PhoneDedicatedAvailability:
      additionalProperties: false
      description: The caller org's dedicated-phone availability summary.
      properties:
        by_type:
          description: Counts per phone type.
          items:
            $ref: '#/components/schemas/PhoneDedicatedTypeAvailabilityEntry'
          type:
            - array
            - 'null'
        idle:
          description: Dedicated phones claimable right now.
          format: int64
          type: integer
        total:
          description: Active dedicated phones with a usable rental.
          format: int64
          type: integer
      required:
        - idle
        - total
        - by_type
      type: object
    PhoneSharedAvailability:
      additionalProperties: false
      description: Shared-pool availability summary.
      properties:
        available:
          description: >-
            Shared phones free to allocate right now, across every type and
            location in the response.
          format: int64
          type: integer
        by_location:
          description: >-
            Counts per active location; locations with zero shared phones still
            appear.
          items:
            $ref: '#/components/schemas/PhoneLocationAvailabilityEntry'
          type:
            - array
            - 'null'
        by_type:
          description: Counts per phone type.
          items:
            $ref: '#/components/schemas/PhoneTypeAvailabilityEntry'
          type:
            - array
            - 'null'
        total:
          description: >-
            Active shared phones, across every type and location in the
            response.
          format: int64
          type: integer
      required:
        - available
        - total
        - by_type
        - by_location
      type: object
    V2ErrorDetail:
      additionalProperties: false
      description: >-
        One specific problem within an error response, locating the offending
        part of the request.
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    PhoneDedicatedTypeAvailabilityEntry:
      additionalProperties: false
      description: The caller org's dedicated phones for one phone type.
      properties:
        idle:
          description: >-
            Phones claimable right now: active, unallocated, rental still
            usable.
          format: int64
          type: integer
        phone_type:
          description: Phone platform (android/iphone).
          type: string
        total:
          description: Active dedicated phones of this type with a usable rental.
          format: int64
          type: integer
      required:
        - phone_type
        - idle
        - total
      type: object
    PhoneLocationAvailabilityEntry:
      additionalProperties: false
      description: Shared-pool availability at a single location.
      properties:
        available:
          description: Phones free to allocate at this location right now.
          format: int64
          type: integer
        city:
          description: City name for this location.
          type: string
        location:
          description: Location slug identifier.
          type: string
        region:
          description: Broader geographic region label.
          type: string
        state:
          description: State or region name for this location.
          type: string
        total:
          description: Active shared phones at this location.
          format: int64
          type: integer
      required:
        - location
        - city
        - state
        - region
        - available
        - total
      type: object
    PhoneTypeAvailabilityEntry:
      additionalProperties: false
      description: Shared-pool availability for one phone type.
      properties:
        available:
          description: Phones free to allocate right now.
          format: int64
          type: integer
        phone_type:
          description: Phone platform (android/iphone).
          type: string
        total:
          description: Active phones of this type in the shared pool.
          format: int64
          type: integer
      required:
        - phone_type
        - available
        - total
      type: object
  securitySchemes:
    apiKeyAuth:
      description: Customer API key (axl_ prefix).
      in: header
      name: X-Axilio-Api-Key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.