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

# Create Device

> Create a device. Validates MAC uniqueness, phonebook/button-layout ownership, and writes default autoprovision values from the phone model template.



## OpenAPI

````yaml https://api.voxo.co/v2/docs/openapi.json post /v2/admin/devices/
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/:
    post:
      tags:
        - Devices
      summary: Create Device
      description: >-
        Create a device. Validates MAC uniqueness, phonebook/button-layout
        ownership, and writes default autoprovision values from the phone model
        template.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tenantId:
                  type: integer
                  exclusiveMinimum: 0
                  maximum: 9007199254740991
                  description: Tenant ID
                name:
                  type: string
                  maxLength: 255
                  description: Device name
                mac:
                  type: string
                  maxLength: 17
                  pattern: ^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$
                  description: MAC address
                deviceModelId:
                  type: integer
                  exclusiveMinimum: 0
                  maximum: 9007199254740991
                  description: Device model ID
                phonebookIds:
                  type: array
                  items:
                    type: integer
                    exclusiveMinimum: 0
                    maximum: 9007199254740991
                  description: Phonebook IDs to assign to the device
                phoneButtonLayoutIds:
                  description: >-
                    Button layout IDs to assign as phone layouts. Omit or send
                    an empty array for devices with no phone-side button
                    layouts.
                  type: array
                  items:
                    type: integer
                    exclusiveMinimum: 0
                    maximum: 9007199254740991
                sidecarButtonLayoutIds:
                  description: >-
                    Button layout IDs to assign as sidecar layouts (Yealink
                    only). Omit or send an empty array for non-Yealink devices.
                  type: array
                  items:
                    type: integer
                    exclusiveMinimum: 0
                    maximum: 9007199254740991
              required:
                - tenantId
                - name
                - mac
                - deviceModelId
                - phonebookIds
              additionalProperties: false
      responses:
        '200':
          description: Newly created 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

````