Table of Contents

Add User

This API is used to add a new user.

  • API Route: https://api.enablex.io/ucaas/v1/users
  • HTTP Request: POST
  • Role Based Accessibility:
    • Reseller Admin: Accesses Users under Reseller and all Customers under it
    • EnableX Admin: Accesses Users of any Reseller / Customer under EnableX
    • Customer: Accesses own User Base

Headers Explanation:

  • Content-Type: To have application/json to notify that the body content is in JSON.

Request Example (OAuth2):

POST https://api.enablex.io/ucaas/v1/users
Content-Type: application/json
Authorization: Token ACCESS_TOTKEN

{
  "user_type": "String",
  "first_name": "String",
  "middle_name": "String",
  "last_name": "String",
  "email": "String",
  "password": "String",
  "status": "String",
  "department": "String",
  "designation": "String",
  "send_welcome_mail": "Boolean"
}

Raw Body JSON Payload Explanation:

Object/KeyData TypeRequiredDescription
user_typeStringRequiredEnumerated Values. Check App data.constant.php (AP)
first_nameStringRequiredFirst Name
middle_nameStringOptionalMiddle Name
last_nameStringOptionalLast Name
emailStringRequiredEmail should be unique
passwordStringOptionalIf not passed, password to be generated
statusStringOptionalEnum. Check data.constant.php.
If not passed, set it to active (A: Active, S: Suspend)
departmentStringOptional
designationStringOptional
send_welcome_mailBooleanOptionalIf true, send a mail with login details to user

Response Example (Success):

{
  "result": "Number",
  "user": {
    "user_id": "Number",
    "name": "String"
  }
}

Response Example (Error):

{
  "result": "Number",
  "msg": "String",
  "desc": "String"
}

Edit User

This API is used to update Contact Information. All Keys in JSON payload are optional. Use only the one which you want to edit.

  • API Route: https://api.enablex.io/ucaas/v1/users/{{$USER_ID}}
  • HTTP Request: PATCH
  • Role Based Accessibility:
    • Reseller Admin: Accesses Users under Reseller and all Customers under it
    • EnableX Admin: Accesses Users of any Reseller/Customer under EnableX
    • Customer: Accesses own User Base

Headers Explanation:

  • Content-Type: To have application/json to notify that the body content is in JSON.

Request Example (OAuth2):

PATCH https://api.enablex.io/ucaas/v1/users/{{$USER_ID}}
Content-Type: application/json
Authorization: Token ACCESS_TOTKEN

{
  "user_type": "String",
  "first_name": "String",
  "middle_name": "String",
  "last_name": "String",
  "status": "String",
  "designation": "String"
}

Raw Body JSON Payload Explanation:

Object/KeyData TypeRequiredDescription
first_nameStringOptionalFirst Name
middle_nameStringOptionalMiddle Name
last_nameStringOptionalLast Name
statusStringOptionalEnum. Check data.constant.php.
departmentStringOptional
designationStringOptional

Response Example:

{
  "result": "Number",
  "msg": "User $first_name $middle_name $last_name has been updated",
  "user": {
    "user_id": "Number",
    "name": "Sting"
  }
}

Get User Information

This API is used to get information for a given User ID.

  • API Route: https://api.enablex.io/ucaas/v1/users/{{$USER_ID}}
  • HTTP Request: GET
  • Role Based Accessibility:
    • Reseller Admin: Accesses Users under Reseller and all Customers under it
    • EnableX Admin: Accesses Users of any Reseller/Customer under EnableX
    • Customer: Accesses own User Base

Headers Explanation:

  • Content-Type: To have application/json to notify that the body content is in JSON.

Response Example:

GET https://api.enablex.io/ucaas/v1/users/{{$USER_ID}}
Content-Type: application/json
Authorization: Token ACCESS_TOTKEN

{
  "result": 1,
  "user": {
    "user_id": "String",
    "user_type": "String",
    "first_name": "String",
    "middle_name": "String",
    "last_name": "String",
    "email": "String",
    "status": "String",
    "designation": "String",
    "department": "String",
    "vc": {
      "access": "Boolean",
      "status": "String",
      "wef": "Date"
    },
    "wb": {
      "access": "Boolean",
      "status": "String",
      "wef": "Date"
    },
    "created_at": "Date",
    "updated_at": "Date",
    "activated_at": "Date",
    "suspended_at": "Date"
  }
}

Get User Listing

This API is used to search or get listing of all Users.

  • API Route: https://api.enablex.io/ucaas/v1/users, https://api.enablex.io/ucaas/v1/users?page={{$PAGE_NUM}}
  • HTTP Request: GET
  • Role Based Accessibility:
    • Reseller Admin: Accesses Users under Reseller and all Customers under it
    • EnableX Admin: Accesses Users of any Reseller / Customer under EnableX
    • Customer: Accesses own User Base

Headers Explanation:

  • Content-Type: To have application/json to notify that the body content is in JSON.

URL Placeholder Explanation::

Object/KeyDescription
pageData return requested for the Page. Default 1.
page_lengthTotal Records to include in a page. Default 10.
from_create_dtFrom Create Date Filter
to_create_dtTo Create Date Filter
search_byRequired if “search_string” is used.
Use any of the enumerated values:
o first_name: To search on first_name field
o last_name: To search on last_name field
o email: To search on email field
o status: To search by status constants
o user_type: To search by user-type constants
o vc: Boolean. To search for user with Meeting Access
o wb: Boolean. To search for users with Webinar Access
search_stringRequired with search_by.
order_byDatabase field names.
order_qualifyDefault “asc”. Enumerated values: asc, desc.

Request Example (HTTP Basic Authentication):

GET https://api.enablex.io/ucaas/v1/users, https://api.enablex.io/ucaas/v1/users?page={{$PAGE_NUM}}
Content-Type: application/json
Authorization: Basic BASE64_AUTH_STRING

Response Example:

{
  "result": 1,
  "search": {
    "page": "Number",
    "page_length": "Number",
    "from_create_dt": "Date",
    "to_create_dt": "Date",
    "search_by": "String",
    "search_string": "String",
    "order_by": "String",
    "order_qualify": "String"
  },
  "users": [
    {
      "user_id": "String",
      "user_type": "String",
      "first_name": "String",
      "middle_name": "String",
      "last_name": "String",
      "email": "String",
      "status": "String",
      "designation": "String",
      "department": "String",
      "vc": {
        "access": "Boolean",
        "status": "String",
        "wef": "Date"
      },
      "wb": {
        "access": "Boolean",
        "status": "String",
        "wef": "Date"
      },
      "created_at": "Date",
      "updated_at": "Date",
      "activated_at": "Date",
      "suspended_at": "Date"
    }
  ]
}

Assign App License to User

This API is used to assign license i.e. a Subscription-ID to a user to allow him access the related app.

  • API Route: https://api.enablex.io/ucaas/v1/users/{{$USER_ID}}
  • HTTP Request: PATCH
  • Role Based Accessibility:
    • Reseller Admin: Accesses Users under Reseller and all Customers under it
    • EnableX Admin: Accesses Users of any Reseller / Customer under EnableX
    • Customer: Accesses own User Base

Headers Explanation:

  • Content-Type: To have application/json to notify that the body content is in JSON.
  • X-License: assign

Request Example (HTTP Basic Authentication):

PATCH https://api.enablex.io/ucaas/v1/users/{{$USER_ID}}
Content-Type: application/json
Authorization: Basic BASE64_AUTH_STRING

{
  "app": "String",
  "subscription_id": "String",
  "send_access_mail": "Boolean"
}

Raw Body JSON Payload Explanation:

Object/KeyData TypeRequiredDescription
appStringRequiredEnumerated Values: vc, wb
subscription_idStringRequiredObject ID of subscription to be assigned
send_access_mailBooleanIf true, send mail to user with Permanent Room ID

Response Example:

{
  "result": "Number",
  "msg": "User $first_name $middle_name $last_name has been given access to Meeting Application",
  "user": {
    "user_id": "Number",
    "name": "Sting",
    "access": {
      "app": "String",
      "url": "String",
      "ppin": "String",
      "mpin": "String"
    }
  }
}

Revoke App License From User

This API is used to remove license from a user to bar him from using a app.

  • API Route: https://api.enablex.io/ucaas/v1/users/{{$USER_ID}}
  • HTTP Request: PATCH
  • Role Based Accessibility:
    • Reseller Admin: Accesses Users under Reseller and all Customers under it
    • EnableX Admin: Accesses Users of any Reseller / Customer under EnableX
    • Customer: Accesses own User Base

Headers Explanation:

  • Content-Type: To have application/json to notify that the body content is in JSON.
  • X-License: revoke

Request Example (HTTP Basic Authentication):

PATCH https://api.enablex.io/ucaas/v1/users/{{$USER_ID}}
Content-Type: application/json
Authorization: Basic BASE64_AUTH_STRING

{
  "app": "String"
}

Raw Body JSON Payload Explanation:

Object/KeyData TypeRequiredDescription
appStringRequiredEnumerated Values: vc, wb

Response Example:

{
  "result": "Number",
  "msg": "User $first_name $middle_name $last_name has been revoked access to Meeting Application",
  "user": {
    "user_id": "Number",
    "name": "Sting",
    "access": {
      "app": "String"
    }
  }
}

Error Codes

Error CodeDescription
1103The email has already been taken, put a unique email address
1105The email is a valid email
1106The selected email is invalid
1111The first name is required
1112First name must be a string
1115Middle name must be a string
1119Last name must be a string
1121The user password must be a string
1131Status must be a string (A: Active, S: Suspended)
1141Department must be a string
1145Designation must be a string
1152User type must be string (AP : User)
1153The User type entered is invalid
1161Send Welcome mail is Boolean (True: send mail with login details)
1191Status is invalid