Address Contacts
Listing all contacts
This method allows you to retrieve a full list of all contacts in your unit.
URL
/api/v2/contacts/list
Supported Parameters
There are no supported parameters for this method.
Example JSON
{ "status":"success", "time":0.01, "flags":{}, "data": [ { "id":3247, "name":"Alex", "number_type":"mobile", "number":"0123456789", "created_at":"2015-08-20T13:10:58.000Z", "updated_at":"2015-08-26T12:53:11.000Z" } ] }
Get contact properties
This method allows you to retrieve information about a specific contact in your unit.
URL
/api/v2/contacts/info
Supported Parameters
id- the ID of the contact (required)
Example JSON
{ "status":"success", "time":0.01, "flags":{}, "data": { "id":3247, "name":"Alex", "number_type":"mobile", "number":"0123456789", "created_at":"2015-08-20T13:10:58.000Z", "updated_at":"2015-08-26T12:53:11.000Z" } }
Add or update a contact
This method allows you to add or update a contact in your unit.
URL
/api/v2/contacts/create - to add a new contact /api/v2/contacts/update - to update an existing contact
Supported Parameters
id- the ID of your contact (required if you're updating an existing contact)number- the telephone number for the contactname- the contact's namenumber_type- the contact number type, for example office, mobile or home
Example JSON
{ "status":"success", "time":0.13, "flags":{}, "data": { "id":3556, "name":"Telcom", "number_type":"office", "number":"01234912444" } }
Delete a contact
This method allows you to delete an existing contact from your unit.
URL
/api/v2/contacts/destroy
Supported Paramaters
id- the ID of the contact (required)
Example JSON
{ "status":"success", "time":0.04, "flags":{}, "data":true }