Users

Create User

Creates a new user and returns the created record.

When to use. Add a user to your account. If a user with the same username already exists, that existing user is returned and no new user is created.

Required fields. username, email and sip_option.

Notes. If you omit password, a temporary password is generated for the user. When sip_option is set to Custom URI, sip_uri is required. You can also assign roles and desks by passing their IDs. See the request schema for the full list of accepted fields.

Returns. 201 Created with { "users": [ { ... } ] }.

Example.

{
  "username": "demo",
  "email": "test@example.com",
  "sip_option": 0
}
post/{sub_domain}/api/users

Request

  • Base URL
    https://api.commpeak.com/dialer
  • URL
    https://api.commpeak.com/dialer/{sub_domain}/api/users
  • Auth
    API key in header Authorization

Path parameters

sub_domainstring required

Dialer Name (subdomain)

Request body

usernamestring required

Username.

emailstring required

Email address.

passwordstring nullable

Password for the user account.

sip_optioninteger required

SIP option (0 - WebRTC, 2 - Custom URI (needs sip_uri), 3 - Built in PBX).

is_activeinteger nullable

Whether the user is active (1/0).

is_clockedinstring nullable

Timestamp the user clocked in.

sip_uristring nullable

SIP URI (required when sip_option is Custom URI).

auto_dialinteger nullable

Auto-dial status (1/0).

is_deletedinteger nullable

Whether the user is deleted (1/0).

use_extended_ip_aclinteger nullable

Use extended IP ACL (1 - yes, 0 - no).

is_predictive_clockedinstring nullable

Timestamp the user clocked in for predictive dialing.

predictive_dynamic_extensionstring nullable

Predictive dynamic extension.

timezone_idinteger nullable

Timezone ID.

first_namestring nullable

First name.

last_namestring nullable

Last name.

virtual_extensionstring nullable

Virtual extension.

default_languagestring nullable

Default language (e.g. en_US, es_ES, pt_BR).

max_session_timestring nullable

Maximum session time.

max_concurrent_sessionsstring nullable

Maximum concurrent sessions.

twofa_typestring nullable

Two-factor authentication type (default, disabled, email, google).

member_all_skill_groupsstring nullable

Member of all skill groups (1/0).

member_all_desksstring nullable

Member of all desks (1/0).

user_regionstring nullable

PBX region (0 - default).

desksinteger[] nullable

IDs of desks associated with the user.

rolesinteger[] nullable

IDs of roles assigned to the user.

skill_groupsinteger[] nullable

IDs of skill groups assigned to the user.

Response

Successful Response

Example response

{
  "users": [
    {
      "email": "test@example.com",
      "first_name": "John",
      "id": 2,
      "last_name": "Doe",
      "username": "demo",
      "virtual_extension": 1001
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.