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

# Update Device

> Sparse update at the top level: only keys present in the body are touched. Each present key is treated literally (full replacement of that collection). Extensions also rewrite the device's LINE-type autoprovision values for peername and sip_password.



## OpenAPI

````yaml https://api.voxo.co/v2/docs/openapi.json patch /v2/admin/devices/{id}
openapi: 3.1.0
info:
  title: VOXO API
  description: VOXO Communication Platform API
  version: 2.0.0
servers:
  - url: https://api.voxo.co
security:
  - bearerAuth: []
paths:
  /v2/admin/devices/{id}:
    patch:
      tags:
        - Devices
      summary: Update Device
      description: >-
        Sparse update at the top level: only keys present in the body are
        touched. Each present key is treated literally (full replacement of that
        collection). Extensions also rewrite the device's LINE-type
        autoprovision values for peername and sip_password.
      parameters:
        - schema:
            type: string
            pattern: ^[1-9]\d*$
          in: path
          name: id
          required: true
          description: Device ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 255
                  description: Device name
                extensions:
                  description: >-
                    Full replacement of the device's line extensions. When
                    present, all 26 line slots are rewritten from this list
                    (omitted slots are cleared). Also rewrites the device's
                    LINE-type autoprovision values (peername + sip_password).
                  type: array
                  items:
                    type: object
                    properties:
                      lineNumber:
                        type: integer
                        minimum: 0
                        maximum: 25
                        description: Line slot index on the device (0-25)
                      id:
                        type: integer
                        exclusiveMinimum: 0
                        maximum: 9007199254740991
                        description: Extension ID
                    required:
                      - lineNumber
                      - id
                    additionalProperties: false
                phonebookIds:
                  description: >-
                    Full replacement of the device's phonebook associations.
                    Order in the array is preserved.
                  type: array
                  items:
                    type: integer
                    exclusiveMinimum: 0
                    maximum: 9007199254740991
                phoneButtonLayoutIds:
                  description: >-
                    Full replacement of the device's PHONE button layout
                    assignments. If either this or sidecarButtonLayoutIds is
                    present, BOTH sets are rewritten from whatever is sent (omit
                    = clear).
                  type: array
                  items:
                    type: integer
                    exclusiveMinimum: 0
                    maximum: 9007199254740991
                sidecarButtonLayoutIds:
                  description: >-
                    Full replacement of the device's SIDECAR button layout
                    assignments (Yealink only).
                  type: array
                  items:
                    type: integer
                    exclusiveMinimum: 0
                    maximum: 9007199254740991
                config:
                  description: >-
                    Partial upsert of the device's outside-loop autoprovision
                    overrides (av_type = 'PHONE'). Each entry overwrites the
                    value for that field; fields not included are left
                    untouched. Names must match outside-loop fields in the
                    phone-model template. Send an empty array to reset every
                    outside-loop override back to the phone-model template
                    defaults.
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        minLength: 1
                        description: >-
                          Field name from the phone-model template (matches
                          al_autoprovisionlabels.al_value)
                      value:
                        type: string
                        description: Override value to persist for this field
                    required:
                      - name
                      - value
                    additionalProperties: false
              additionalProperties: false
      responses:
        '200':
          description: Updated device with full settings profile
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: number
                    description: Device ID
                  name:
                    type: string
                    description: Device name
                  mac:
                    type: string
                    description: MAC address
                  tenant:
                    type: object
                    properties:
                      id:
                        type: number
                      name:
                        type: string
                    required:
                      - id
                      - name
                    additionalProperties: false
                    description: Owning tenant
                  deviceModel:
                    type: object
                    properties:
                      id:
                        type: number
                      name:
                        type: string
                    required:
                      - id
                      - name
                    additionalProperties: false
                    description: Phone model
                  extensions:
                    type: array
                    items:
                      type: object
                      properties:
                        lineNumber:
                          type: number
                        id:
                          type: number
                        name:
                          type: string
                        number:
                          type: string
                        peerName:
                          type: string
                      required:
                        - lineNumber
                        - id
                        - name
                        - number
                        - peerName
                      additionalProperties: false
                    description: Assigned line extensions
                  buttonLayouts:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: number
                        type:
                          type: string
                        name:
                          type: string
                        startKey:
                          type: number
                        endKey:
                          type: number
                      required:
                        - id
                        - type
                        - name
                        - startKey
                        - endKey
                      additionalProperties: false
                    description: Assigned button layouts
                  phonebooks:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: number
                        name:
                          type: string
                      required:
                        - id
                        - name
                      additionalProperties: false
                    description: Assigned phonebooks
                  config:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        label:
                          type: string
                        value:
                          type: string
                        displayValue:
                          type: string
                      required:
                        - name
                        - label
                        - value
                        - displayValue
                      additionalProperties: false
                    description: >-
                      Device-level configurable fields. One entry per
                      `av_autoprovisionvalues` row of `av_type = 'PHONE'` for
                      this device, joined to its `al_autoprovisionlabels` row
                      for the human-readable label. `displayValue` is the mapped
                      label for `select`/`bool`/`checkbox`/`radio` fields (per
                      the template's options); equals `value` otherwise.
                  userAgent:
                    type: string
                    description: >-
                      SIP user agent of the device's primary line (phLine1ExId).
                      Empty string when no primary line is set or the phone is
                      not currently registered.
                required:
                  - id
                  - name
                  - mac
                  - tenant
                  - deviceModel
                  - extensions
                  - buttonLayouts
                  - phonebooks
                  - config
                  - userAgent
                additionalProperties: false
        '400':
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                  message:
                    type: string
                  code:
                    type: number
                  validationErrors:
                    type: array
                    items:
                      type: string
                required:
                  - name
                  - message
                  - code
                additionalProperties: false
        '403':
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                  message:
                    type: string
                  code:
                    type: number
                  validationErrors:
                    type: array
                    items:
                      type: string
                required:
                  - name
                  - message
                  - code
                additionalProperties: false
        '404':
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                  message:
                    type: string
                  code:
                    type: number
                  validationErrors:
                    type: array
                    items:
                      type: string
                required:
                  - name
                  - message
                  - code
                additionalProperties: false
        '409':
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                  message:
                    type: string
                  code:
                    type: number
                  validationErrors:
                    type: array
                    items:
                      type: string
                required:
                  - name
                  - message
                  - code
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````