26.09 26.06 26.05 25.12
26.09 26.06 26.05 25.12 Russian English

Intercom settings (v2)

Intercom settings (v2)

PATCH  /api/v2/billing/intercoms/{intercom}/settings

Updates panel settings directly on the device. Only specified fields are sent. A field not supported by the panel is rejected with 422 and the field key (for sip_options the key is sip_options); supported fields are listed in features in the "Intercom capabilities (v2)" response.

JSON
{
    "collecting_keys": true,
    "door_open_time_general": 5,
    "sip_options": {
        "talk_duration": 120,
        "ring_duration": 30,
        "dtmf": [
            {
                "id": 1,
                "value": "1"
            }
        ]
    }
}

Method parameters

int intercom  required , Intercom ID (in the URL)


boolean collecting_keys, Automatic key collection (capability `collecting_keys`)


integer door_open_time_general, Door opening time in seconds: 1 to 60; 4 to 10 for Intersvyaz; 5 to 10 for Beward (capability `door_open_time`)


array sip_options, Additional SIP settings

object array

array sip_options.dtmf, DTMF door opening codes by relay (capability `dtmf`)


string sip_options.dtmf.  required , DTMF code value, up to 4 characters


string sip_options.dtmf.  required , DTMF code value, up to 4 characters


integer sip_options.ring_duration, Call duration, 0 to 999 (capability `sip_durations`)


integer sip_options.talk_duration, Conversation duration, 0 to 999 (capability `sip_durations`)


204  No Content

Successful response

404  Not Found

Intercom not found

422  Unprocessable Entity

Returns a JSON error object.

For more information, see General information > Validation.

JSON
{
    "message": "No informative message is provided here",
    "errors": {
        "any_key": [
            "The reason for the error is described here"
        ]
    }
}
cURL
Bash
curl -k --request PATCH \
	--url 'https://your-domain/api/v2/billing/intercoms/{intercom}/settings' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "intercom": 0,
    "collecting_keys": "boolean",
    "door_open_time_general": "integer",
    "sip_options": {
        "talk_duration": "integer",
        "ring_duration": "integer",
        "dtmf": {
            "": "string"
        }
    },
    "sip_options.talk_duration": "void",
    "sip_options.ring_duration": "void",
    "sip_options.dtmf": "void",
    "sip_options.dtmf.": "void"
}'
PHP
PHP
$data = array (
  'intercom' => 0,
  'collecting_keys' => 'boolean',
  'door_open_time_general' => 'integer',
  'sip_options' => 
  array (
    'talk_duration' => 'integer',
    'ring_duration' => 'integer',
    'dtmf' => 
    array (
      '' => 'string',
    ),
  ),
  'sip_options.talk_duration' => 'void',
  'sip_options.ring_duration' => 'void',
  'sip_options.dtmf' => 'void',
  'sip_options.dtmf.' => 'void',
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'PATCH',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/v2/billing/intercoms/{intercom}/settings', false, $context);