1. Home
  2. Docs
  3. API Documentation
  4. Users
  5. AddUser

AddUser

Route: https://kayran.live/api/AddUser

This function allow you to add a user to your server.

Note : if necessary, please refer to each role description and their differences.

Roles Required: Admin.

Request Syntax

{
    "apiKey": "String",
    "email": "String",
    "firstName": "String",
    "lastName": "String",
    "password": "String",
    "phone": "String",
    "role": "String",
    "projectName": "String"
    "title": "String"
}


Request Parameters

Parameters being used in the Request

Parameter Name :

apiKey

Parameter Usage and Options :

Your Kayran given API Key.

How do I get it ? :

Located in the “Profile” section.

Note : by default, the “API Status” is enabled, unless, the Admin has disabled it in the “Server Settings” section.

Type :

String

Is it Optional ? :

No.


Parameter Name :

email

Parameter Usage and Options :

The email of the account that is being used on Kayran.

Type :

String

Is it Optional ? :

No.


Parameter Name :

firstName

Parameter Usage and Options :

The first name of the person who will be using Kayran.

Type :

String

Is it Optional ? :

No.


Parameter Name :

lastName

Parameter Usage and Options :

The last name of the person who will be using Kayran.

Type :

String

Is it Optional ? :

No.


Parameter Name :

password

Parameter Usage and Options :

The password to the account of the user you are creating.

Type :

String

Is it Optional ? :

No.


Parameter Name :

phone

Parameter Usage and Options :

The phone number of the user using the new account.

Type :

String

Is it Optional ? :

No.


Parameter Name :

role

Parameter Usage and Options :

The role of the account that you wish to create.

Value :

user\admin\private user\viewer

Type :

String

Is it Optional ? :

No.


Parameter Name :

projectName

Parameter Usage and Options :

In case you wish to associate the user with a specific project.

How do I get it ? :

From the projects table in the “Projects” sub-section, or, use the “GetProjects” function

Type :

String

Is it Optional ? :

No.


Parameter Name :

title

Parameter Usage and Options :

In case you wish to attach a certain title to the user (Employee, Engineer etc.).

Type :

String

Is it Optional ? :

No.


Successful Response

{
    "Error": 0,
    "Function": "AddUser",
    "Data": "Message sent!"
}

Errors and their Possible Causes

For more information, please refer to the General Errors section.