Create Contact Entity
You can create contacts with the next types:
regular
- for monitors, intercom SIP numbers, etc.individual
- for individual panelsmulti
- for multiapartment panels
Contact number can take two formats:
inner protocol
SIP
For inner protocol
contact numbers with different type must match different pattern:
regular
like [building]-[unit]-[floor]-[apartment], for example '0001-01-11-11'individual
like [building]-[unit]-[floor]-[apartment]-[device number], for example '001-01-11-11-1'multi
like [building]-[unit]-[device number], for example '0001-01-01'
regular | individual | multi | |
---|---|---|---|
building | 0001 - 9999 | 001 - 999 | 0001 - 9999 |
unit | 00 - 99 | 00 - 99 | 00 - 99 |
floor | 00 - 98 | 00 - 98 | |
apartment | 00 - 99 | 00 - 99 | |
device | 1 - 9 | 01 - 99 |
For SIP
contact numbers regex is sip:[0-9A-Za-z+\-_.]+@((((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?(?:\:\d{1,5})?)(\.|$)){4}\b)|([0-9]*[A-Za-z+\-_]+[0-9]*)(\.([0-9]*[A-Za-z+\-_]+[0-9]*))+)
, for example sip:[email protected]
or sip:[email protected]
If you want the device to receive all calls from some numbers without sound, you can add it to the blacklist using the in_black_list property. The call will be displayed in the Records.
If you want the device to immediately receive a call from the specified number use property auto_answer
.
Two parameters: auto_answer
and in_black_list
cannot be true
at the same time.
Maximum number of contacts - 300
- application/json
Request Body required
- name string required
Possible values:
non-empty
and<= 30 characters
Contact name
- type string required
Possible values: [
regular
,individual
,multi
]Contact number type
- number string required
There is two format: inner number and SIP number
Inner number for different devices:
regular
like [building]-[unit]-[floor]-[apartment], for example '0001-01-11-11'individual
like [building]-[unit]-[floor]-[apartment]-[device number], for example '001-01-11-11-1'multi
like [building]-[unit]-[device number], for example '0001-01-01'
regular individual multi building 0001 - 9999 001 - 999 0001 - 9999 unit 00 - 99 00 - 99 00 - 99 floor 00 - 98 00 - 98 apartment 00 - 99 00 - 99 device 1 - 9 01 - 99 SIP number format: sip:[0-9A-Za-z+-.]+@((((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?(?::\d{1,5})?)(.|$)){4}\b)|([0-9]*[A-Za-z+-]+[0-9])(.([0-9][A-Za-z+-_]+[0-9]*))+), for example
sip:[email protected]
orsip:[email protected]
- is_favorite boolean required
Favorite contacts will be displayed at the top of the list
- auto_answer boolean required
If true device will answer immediatelly when received call from this contact.
auto_answer
andin_black_list
cannot be true at the same time - in_black_list boolean required
If true device will skip incoming call from this contact.
auto_answer
andin_black_list
cannot be true at the same time
- 200
- 400
- 401
The uid
value returned in the response can be used as the entityUid
parameter in next requests:
GET/PUT/DELETE /contacts/{entityUid}
- to get info about contact, update or delete it
- application/json
- Schema
- Example (from schema)
- Example
Schema
- uid integer
UID for entities references
{
"uid": 3
}
{
"uid": 3
}
Bad Request
- application/json
- Schema
- Example (from schema)
Schema
error object
Describes the base error user might get
code stringPossible values: [
invalid_authentication
,permission_denied
,not_valid
,system_error
]Error code
message stringError message
data object
Did not pass validation parameters. Can be represented as an object, which can include field names, arrays, query parameters etc.
param stringDescribes the parameter that did not pass a validation
{
"error": {
"code": "not_valid",
"message": "Data validation error",
"data": {
"param": "must be an string"
}
}
}
Please log in
- application/json
- Schema
- Example (from schema)
- Example
Schema
error object
Describes the base error user might get
code stringPossible values: [
invalid_authentication
,permission_denied
,not_valid
,system_error
]Error code
message stringError message
data object
Did not pass validation parameters. Can be represented as an object, which can include field names, arrays, query parameters etc.
param stringDescribes the parameter that did not pass a validation
{
"error": {
"code": "not_valid",
"message": "Data validation error",
"data": {
"param": "must be an string"
}
}
}
{
"error": {
"code": "invalid_authentication",
"message": "Log In"
}
}