API Version: 6.5

Opt in-out

Permissions

Requires System-Admin, Company-Admin or User permissions. Permission level affects which users' opt status can be changed.

command 'update'

Path: /rest/dialplan/update/
Update opt-in or out settings for one or more extensions on a specified handset.
{    
    "type": "opt",
    "scope": {
        "mac": "0123456789ab0",
        "contact_id": optional-contact-id
    },
    "values": {
        "ext": "in" or "out",
        ...
    }
}
Note that the mac value is the handset identifier which is it's mac address and it's 'port' number combined. for most devices, the port number is a '0'.
contact_id will default to the contact-id of the currently logged-in user. Administrative users may specify a different user to be modified.
For example:
{
    "type": "opt",
    "scope": {
        "mac": "0123456789ab0"
    },
    "values": {
        "201": "in",
        "202": "out"
    }
}