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

> Sparse update: only keys present in the body are touched. Returns the updated model with its parsed autoprovision field schema.



## OpenAPI

````yaml https://api.voxo.co/v2/docs/openapi.json patch /v2/admin/device-models/{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/device-models/{id}:
    patch:
      tags:
        - Device-Models
      summary: Update Device Model
      description: >-
        Sparse update: only keys present in the body are touched. Returns the
        updated model with its parsed autoprovision field schema.
      parameters:
        - schema:
            type: string
            pattern: ^[1-9]\d*$
          in: path
          name: id
          required: true
          description: Device model ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Device model name
                mac:
                  type: string
                  maxLength: 4294967295
                  description: Autoprovision template
                startLine:
                  type: number
                  description: First line slot
                endLine:
                  type: number
                  description: Last line slot
                directory:
                  description: Directory template
                  type: string
                  maxLength: 4294967295
                remotePost:
                  description: Remote-post template
                  type: string
                  maxLength: 4294967295
                remotePostUrl:
                  description: Remote-post URL
                  type: string
                remotePostUser:
                  description: Remote-post username
                  type: string
                remotePostPassword:
                  description: Remote-post password
                  type: string
                remotePostDeregister:
                  description: Remote-post deregister template
                  type: string
                  maxLength: 4294967295
              additionalProperties: false
      responses:
        '200':
          description: Updated device model with autoprovision field schema
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: number
                    description: Device model ID
                  name:
                    type: string
                    description: Device model name
                  startLine:
                    type: number
                    description: First line slot
                  endLine:
                    type: number
                    description: Last line slot
                  mac:
                    type: string
                    description: Autoprovision template
                  remotePostDeregister:
                    type: string
                    description: Remote-post deregister template
                  remotePost:
                    type: string
                    description: Remote-post template
                  directory:
                    type: string
                    description: Directory template
                  description:
                    type: string
                    description: Description
                  remotePostUrl:
                    description: Remote-post URL
                    type: string
                  remotePostUser:
                    description: Remote-post username
                    type: string
                  remotePostPassword:
                    description: Remote-post password
                    type: string
                  autoprovisionFields:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: >-
                            Template field name (matches
                            al_autoprovisionlabels.al_value and the devices
                            config[].name)
                        label:
                          type: string
                          description: >-
                            Human-readable label from
                            al_autoprovisionlabels.al_label, falling back to the
                            field name
                        type:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: >-
                            Field type from the template (select, bool,
                            checkbox, radio, text, ...)
                        defaultValue:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: Default value declared in the template
                        outsideLoop:
                          type: boolean
                          description: >-
                            True for device-level fields (av_type 'PHONE');
                            false for per-line fields written inside a template
                            loop
                        options:
                          anyOf:
                            - type: array
                              items:
                                type: object
                                properties:
                                  value:
                                    type: string
                                    description: Stored value persisted on the device
                                  label:
                                    type: string
                                    description: Human-readable label for the value
                                required:
                                  - value
                                  - label
                                additionalProperties: false
                            - type: 'null'
                          description: >-
                            Allowed value->label options for mapping fields
                            (select/bool/checkbox/radio); null for free-form
                            fields
                      required:
                        - name
                        - label
                        - type
                        - defaultValue
                        - outsideLoop
                        - options
                      additionalProperties: false
                    description: >-
                      Parsed autoprovision field schema for this model: which
                      fields exist, their type, default, and (for mapping
                      fields) the allowed value->label options. Join to the
                      devices config[] by `name` to interpret/edit a device's
                      current values.
                required:
                  - id
                  - name
                  - startLine
                  - endLine
                  - mac
                  - remotePostDeregister
                  - remotePost
                  - directory
                  - description
                  - remotePostUrl
                  - remotePostUser
                  - remotePostPassword
                  - autoprovisionFields
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````