phoneconfiguration-name is required and must be unique in the domain. Use only letters, digits, spaces, and * . - _ ' in it, because the paths that read, change, and delete a template accept nothing else. Leave out phoneconfiguration-mac-address: a configuration with a MAC address is a phone configuration, created with POST /domains/{domain}/phoneconfiguration.GET /deviceprofiles/{brand}/{model}, in devicemodel.line button, or in the domain's dial plan when there is no line button. A queue_status button toggles the user's call queue availability: its target is ignored, and reads return it empty. A timeframe_status button toggles a time frame: its target is the time frame name, and Default means the default time frame. Add targetUser to the button's phoneconfiguration-extra to toggle another user's time frame. The dial rules appear with the dial plan's other dial rules.phoneconfiguration-domain in the body is ignored: the domain comes from the path. A template with the same name returns 409. A 202 means the change is accepted and already applied.Authorization: Bearer ********************curl --location 'https://awqacore01.crexendocloud.com/ns-api/v2/domains//phonetemplates' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"phoneconfiguration-name": "Front Desk WP826",
"phoneconfiguration-description": "Front desk layout with queue toggle",
"phoneconfiguration-brand": "Grandstream",
"phoneconfiguration-model": "WP826",
"phoneconfiguration-directory": {
"group": "All",
"group-type": "Standard",
"sort": "Extension",
"order": "asc",
"exclusions": [
{
"id": "1009@example.com",
"type": "onnet"
}
]
},
"phoneconfiguration-buttons": [
{
"phoneconfiguration-button-order": 1,
"phoneconfiguration-button-type": "line_only",
"phoneconfiguration-button-feature": "line",
"phoneconfiguration-button-target": "1001",
"phoneconfiguration-button-label": "Line 1",
"phoneconfiguration-button-locked": 0,
"phoneconfiguration-extra": {}
},
{
"phoneconfiguration-button-order": 2,
"phoneconfiguration-button-type": "line_only",
"phoneconfiguration-button-feature": "line",
"phoneconfiguration-button-target": "1001",
"phoneconfiguration-button-label": "Line 2",
"phoneconfiguration-button-locked": 0,
"phoneconfiguration-extra": {}
},
{
"phoneconfiguration-button-order": 4,
"phoneconfiguration-button-type": "mpk",
"phoneconfiguration-button-feature": "queue_status",
"phoneconfiguration-button-target": "",
"phoneconfiguration-button-label": "Queue",
"phoneconfiguration-button-locked": 1,
"phoneconfiguration-extra": {}
}
]
}'{
"code": 202,
"message": "Accepted"
}