Skip to main content
POST
/
v2
/
admin
/
device-models
/
Create Device Model
curl --request POST \
  --url https://api.voxo.co/v2/admin/device-models/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "mac": "<string>"
}
'
{
  "id": 123,
  "name": "<string>",
  "startLine": 123,
  "endLine": 123,
  "mac": "<string>",
  "remotePostDeregister": "<string>",
  "remotePost": "<string>",
  "directory": "<string>",
  "description": "<string>",
  "remotePostUrl": "<string>",
  "remotePostUser": "<string>",
  "remotePostPassword": "<string>",
  "autoprovisionFields": [
    {
      "name": "<string>",
      "label": "<string>",
      "type": "<string>",
      "defaultValue": "<string>",
      "outsideLoop": true,
      "options": [
        {
          "value": "<string>",
          "label": "<string>"
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required

Device model name

mac
string
required

Autoprovision template

Maximum string length: 4294967295
startLine
number
default:1

First line slot

endLine
number
default:24

Last line slot

directory
string

Directory template

Maximum string length: 4294967295
remotePost
string

Remote-post template

Maximum string length: 4294967295
remotePostUrl
string

Remote-post URL

remotePostUser
string

Remote-post username

remotePostPassword
string

Remote-post password

remotePostDeregister
string

Remote-post deregister template

Maximum string length: 4294967295

Response

200 - application/json

Newly created device model with autoprovision field schema

id
number
required

Device model ID

name
string
required

Device model name

startLine
number
required

First line slot

endLine
number
required

Last line slot

mac
string
required

Autoprovision template

remotePostDeregister
string
required

Remote-post deregister template

remotePost
string
required

Remote-post template

directory
string
required

Directory template

description
string
required

Description

remotePostUrl
string
required

Remote-post URL

remotePostUser
string
required

Remote-post username

remotePostPassword
string
required

Remote-post password

autoprovisionFields
object[]
required

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.