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

# Update a phone

> Changes the fields a customer may set on a dedicated phone the caller's org owns: its nickname. Returns the updated phone.

Minimum role required: Member


## OpenAPI

````yaml /api-reference/openapi-backend.json patch /phones/{phone_id}
openapi: 3.1.0
info:
  description: Axilio backend HTTP API.
  title: Axilio API
  version: 0.155.0
servers:
  - url: https://api.axilio.ai/api/v1
    description: Production
security: []
tags:
  - name: Agents
  - name: API Keys
  - name: Billing
  - name: Conversations
  - name: Files
  - name: Messages
  - name: Models
  - name: Organization
  - name: Phones
  - name: Runs
  - name: Sessions
  - name: Skill
  - name: Usage
  - name: Webhooks
paths:
  /phones/{phone_id}:
    patch:
      tags:
        - Phones
      summary: Update a phone
      description: >-
        Changes the fields a customer may set on a dedicated phone the caller's
        org owns: its nickname. Returns the updated phone.
      operationId: phones_update
      parameters:
        - description: device identifier
          in: path
          name: phone_id
          required: true
          schema:
            description: device identifier
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PhoneUpdatePhoneRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneSummary'
          description: OK
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/V2ErrorModel'
          description: Not Found
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/V2ErrorModel'
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/V2ErrorModel'
          description: Internal Server Error
      security:
        - apiKeyAuth: []
components:
  schemas:
    PhoneUpdatePhoneRequest:
      additionalProperties: false
      description: The fields to change on a dedicated phone.
      properties:
        nickname:
          description: New display name for the phone.
          maxLength: 100
          minLength: 1
          type: string
      required:
        - nickname
      type: object
    PhoneSummary:
      additionalProperties: false
      description: 'A phone in the fleet: display identity, status, and current allocation.'
      properties:
        created_at:
          description: When the phone record was created.
          format: date-time
          type: string
        current_session_id:
          description: Session currently holding the phone, if allocated.
          type:
            - string
            - 'null'
        last_heartbeat_at:
          description: Time of the phone's most recent heartbeat.
          format: date-time
          type:
            - string
            - 'null'
        last_interaction_at:
          description: Time of the most recent interaction on the phone.
          format: date-time
          type:
            - string
            - 'null'
        location:
          description: Physical hosting location of the phone.
          type:
            - string
            - 'null'
        messaging:
          $ref: '#/components/schemas/PhoneMessaging'
          description: >-
            Whether the phone can text, as it last reported, for a dedicated
            phone your organization rents: checked_at says when, and status
            whether it is reachable now. Absent for shared phones.
        model_id:
          description: Hardware model identifier.
          type:
            - string
            - 'null'
        model_name:
          description: Hardware model name.
          type:
            - string
            - 'null'
        nickname:
          description: User-assigned nickname.
          type:
            - string
            - 'null'
        owner_organization_id:
          description: Owning organization, for private phones.
          type:
            - string
            - 'null'
        ownership_type:
          description: '''shared'' for pool phones, ''private'' for dedicated rentals.'
          enum:
            - shared
            - private
          type: string
        phone_id:
          description: Phone identifier used by allocate and the phone APIs.
          type: string
        phone_name:
          description: Display name of the phone.
          type:
            - string
            - 'null'
        phone_number:
          description: >-
            The phone's own number in E.164, for a dedicated phone your
            organization rents: what its SIM reports, or else the number its
            latest received text was sent to. Null when neither is known, and
            for shared phones.
          type:
            - string
            - 'null'
        phone_type:
          description: Platform of the phone.
          enum:
            - android
            - iphone
            - unknown
          type:
            - string
            - 'null'
        rental_expires_at:
          description: When the current rental ends, for rented phones.
          format: date-time
          type:
            - string
            - 'null'
        status:
          description: >-
            Fleet status of the phone. Only active is allocatable. inactive:
            unreachable, back on its next heartbeat. maintenance: planned work
            that releases itself. suspended: an administrative hold. recovering:
            being repaired automatically. out_of_service: needs a repair at the
            rack. Treat unknown values as unavailable.
          enum:
            - active
            - inactive
            - maintenance
            - suspended
            - recovering
            - out_of_service
          type: string
        updated_at:
          description: When the phone record was last updated.
          format: date-time
          type: string
      required:
        - phone_id
        - phone_name
        - nickname
        - phone_number
        - phone_type
        - status
        - model_id
        - model_name
        - last_heartbeat_at
        - location
        - ownership_type
        - owner_organization_id
        - rental_expires_at
        - last_interaction_at
        - current_session_id
        - created_at
        - updated_at
      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
    PhoneMessaging:
      additionalProperties: false
      description: >-
        Whether a dedicated phone can send and receive texts, and whether the
        SIM it texts from is on the network, as the phone last reported.
      properties:
        checked_at:
          description: When the phone last reported its state. Null when it never has.
          format: date-time
          type:
            - string
            - 'null'
        receiving:
          description: >-
            Whether texts the phone receives reach you. unknown until the phone
            reports its policy. Treat a value you don't recognize as unknown.
          enum:
            - 'on'
            - 'off'
            - unknown
          type: string
        sending:
          description: >-
            Whether the phone may send texts. unknown until the phone reports
            its policy. Treat a value you don't recognize as unknown.
          enum:
            - 'on'
            - 'off'
            - unknown
          type: string
        service:
          description: >-
            Whether the SIM the phone texts from is on the network. no_service
            covers out of service and emergency calls only; unknown until the
            phone reports it. Treat a value you don't recognize as unknown.
          enum:
            - in_service
            - no_service
            - radio_off
            - no_sim
            - unknown
          type: string
      required:
        - sending
        - receiving
        - service
        - checked_at
      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
  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.