API Version: 6.4
System-Admin
or Company-Admin
permissions.roleid
field may be specified as either the internal ID number, or the short lower-case string name of the role.roleid
field is included in the output of a user query, then an additional field of rolename
is output to represent the short lower-case string name of the role./rest/ops/create/
{
	"type": "user",
	"values": {
		"uname": "unique-login-name",
		"name": "Real Name",
		"password": "initial password or null for none",
		"pwhash": "initial blowfish hashed password or null for none (from version 6.3.23)",
		"company": "Company-ID or null for default",
		"owned_extension": "extension number",
		"owned_phoneid": "mac and port ID number",
		"can_hotdesk": bool or null for default,
		"can_forward": bool or null for default,
		"xmpp_flags_add": bool or null for default,
		"xmpp_flags_auth": bool or null for default,
		"can_webrtc": (-1 | 0 | 1),
		"email": "email address",
		"email_vm": bool to send email for voicemail,
		"email_vm_att": bool to attach message to email,
		"email_vm_del": bool to delete on emailing,
		"email_mon": bool to email call recordings,
		"email_mon_del": bool to delete on emailing,
		"vmail_mon": bool to store call recordings as voicemail,
		"call_by_all": bool to set user as linkable in other companies,
		"vacation": "number",
		"vacation_mode": "(off | all | myext | owned)",
		"admin_company: ["company-id", ...],
		"roleid": role-id or null for user-role
	}
}
{
"result": "success",
"values": {
"contact_id": new_contact_id,
"uname": "unique-login-name"
}
}
{
"type": "user",
"values": {
"uname": "newuser",
"name": "Mr New User",
"password": "Secur3passwordhere!",
}
}
{
"result": "success",
"values": {
"contact_id": 1992,
"uname": "newuser"
}
}
/rest/ops/read/
{
"type": "user",
"scope": {
"contact_id": "contact-id",
"uname": "unique-login-name",
...
"column-name": "column value"
},
"columns": ["column-name", ...]
}
{
"type": "user",
"scope": {
"company":"test"
},
"columns": ["uname","owned_phoneid"]}
}
{
"result": "success",
"values": [
{
"column": "column-value",
...
},
...
],
"numrows": number-of-rows
}
/rest/ops/update/
company
which is fixed. null
columns are left unchanged.'name', 'email', 'email_vm', 'email_vm_att', 'email_vm_del', 'email_mon', 'email_mon_del', 'vmail_mon'
if other fields are provided they will be silently ignored.{
"type": "user",
"scope": {
"contact_id": "contact-id",
},
"values": {
"uname": "unique-login-name",
"password": "password",
"pwhash": "blowfish hashed password (from version 6.3.23)",
...
"column-name": "column value"
}
}
{
"type": "user",
"scope": {
"contact_id":123
},
"values": {
"name":"My New Name"
}
}
{
"result": "success",
"numrows": number-of-rows
}
/rest/ops/delete/
contact_id
or uname
of a user, delete all records for the contact{
"type": "user",
"scope": {
"contact_id": "contact-id",
"uname": "unique-login-name" /* if contact_id not provided */
}
}
{
"type": "user",
"scope": {
"uname": "newuser"
}
}
/rest/ops/setpass/
contact_id
or uname
of a user, update their password.{
"type": "user",
"scope": {
"contact_id": "contact-id",
"uname": "unique-login-name" /* if contact_id not provided */
},
"values": {
"password": "new-password"
}
}
{
"type": "user",
"scope": {
"uname": "newuser"
},
"values": {
"password": "NewSecurepassw0rdhere!"
}
}