Skip to main content
Version: Mentor 2.6

Creating a New Organization

System administrators can do the following actions:

  • Create an organization.

  • Invite an organization administrator to the new organization. After receiving the email invite, the Organization Administrator user can sign up using the application's link provided in the email.

HTTP Request

Method: POST

{{url}}/user/v1/organization/create

Request Body

Payload ParameterData TypeDescriptionRequired
nameString

The organization's name.

Example: "ShikshaLokam"

True
codeString

Unique code for the organization.

Example: "shiksha20"

True
descriptionString

Description of the organization.

Example: "Empowering educational leadership"

True
domainsArray of strings

One or more organizational domains.

Example: ["shikshalokam.com"]

tip
You must configure the organizational domains so that when users sign up to the application, their organizations are detected based on the organizational domain in their email IDs. To learn more, see Assigning Users to an Organization.

True
admin_emailString

Email ID to which the organization administrator would receive the invite.

Example: "admin@shikshalokam.com"

False

Request Header

KeyValueDescriptionRequired

X-auth-token

bearer {{access_token}}

The access_token received from the login response.

True

accept-language

{{hi}}

The response obtained will be in Hindi. If not provided, the response will be in English (default).

False

Response

If successful, this method returns a 200 OK response code. If the organization already exists, this method returns a 400 Bad Request response code.

Response ParameterData TypeDescription
responseCodeStringA success response.
messageStringA success message.
resultObject
  • Contains the organization's ID.
  • Details in the request body such as name and code.
metaObject
  • The formsVersion key specifies the versions of User service forms.
  • The correlation key specifies the API request ID.

Obtaining Organizations' Details

System administrators or organization administrators can obtain an organization's details such as organization ID, name, and code.

note

For actions such as assigning an organization administrator and setting policies, the request body must include the organization ID.

HTTP Request

Method: GET


{{url}}/user/v1/organization/list?page={page}&limit={limit}&search={search}

Path ParameterData TypeDescriptionRequired
pageInteger

The page number.

Example: page=2

If not provided, a default page number 1 is applied.

False
limitInteger

The number of records (entries of organizations) per page.

Example: limit=10

If not provided, a default limit of 100 is applied.

False
searchString

Specify the organization's name to obtain the details for a specific organization.

Example: search=ShikshaLokam

False

Request Body

This method does not require a request body.

Request Header

KeyValueDescriptionRequired

X-auth-token

bearer {{access_token}}

The access_token received from the login response.

True

accept-language

{{hi}}

The response obtained will be in Hindi. If not provided, the response will be in English (default).

False

Response

If successful, this method returns a 200 OK response code.

Response ParameterData TypeDescription
responseCodeStringA success response.
messageStringA success message.
resultObjectIt contains the following:
  • The organization's details such as ID, name, and code.
  • The policies configured for the organization.
  • The total number of organization entries.

Obtaining Users' Details

System administrators or organization administrators can obtain the list of users and their details such as name, user ID, and email.

note

For actions such as assigning Organization Administrator privileges to a registered user and deactivating users at an organization, the request body must include the user ID or email.

HTTP Request

Method: GET


{{url}}/user/v1/account/list?type={type}&page={page}&limit={limit}&search={search}

Path ParameterData TypeDescriptionRequired
typeString

The role (mentor or mentee) of the user whose ID you want to obtain.

Example: type=mentor

True
pageInteger

The page number.

Example: page=2

If not provided, a default page number 1 is applied.

False
limitInteger

The number of records (user entries) per page.

Example: limit=10

If not provided, a default limit of 100 is applied.

False
searchString

Specify the user's name to obtain the user ID of a specific user.

Example: search=John

False

Request Body

note

If you have specified the user's role in the request path, you do not have to provide a request body.

Payload ParameterData TypeDescriptionRequired
idString

Instead of specifying the user's role in the request path, you can also specify the user's ID to obtain details such as name and email.

Example: 1

True

Request Header

KeyValueDescriptionRequired

X-auth-token

bearer {{access_token}}

The access_token received from the login response.

True

accept-language

{{hi}}

The response obtained will be in Hindi. If not provided, the response will be in English (default).

False

Response

If successful, this method returns a 200 OK response code.

Response ParameterData TypeDescription
responseCodeStringA success response.
messageStringA success message.
resultObject
  • The key for the first alphabet in the user's name.
  • The user's details such as user ID, name, and email.
  • The total number of user entries.
  • tip

    If the response is empty or does not include the specific user's details, you may want to recheck the role specified in the request path.

metaObject
  • The formsVersion key specifies the versions of User service forms.
  • The correlation key specifies the API request ID.

Assigning Organization Administrators

After creating organizations, system administrators can add Organization Administrator users to an organization in one of the following ways:

  • Invite an organization administrator to a new organization. After receiving the email invite, the Organization Administrator user can sign up using the application's link provided in the email.

  • Assign Organization Administrator privileges to a registered user.

HTTP Request

Method: POST

{{url}}/user/v1/admin/addOrgAdmin

Request Body

Payload ParameterData TypeDescriptionRequired
emailString

Email ID of the Organization Administrator user who is invited to the new organization or of the user who is assigned Organization Administrator privileges.

Example: "john@shikshalokam.org"

True
user_idInteger

Instead of the user's email ID, you can also specify the ID of the user who is assigned Organization Administrator privileges.

Example: "1"

True
organization_idInteger

ID of the organization to which the organization administrator should be assigned.

Example: "12"

True

Request Header

KeyValueDescriptionRequired

X-auth-token

bearer {{access_token}}

The access_token received from the login response.

True

accept-language

{{hi}}

The response obtained will be in Hindi. If not provided, the response will be in English (default).

False

Response

If successful, this method returns a 200 OK response code.

Response ParametersData TypeDescription
responseCodeStringA success response.
messageStringA success message.
resultObject
  • The organization ID and user ID.
  • The user_roles key specifies the following:
    • Mentor or mentee role and its associated ID.
    • note

      A mentee (default) role is assigned to organization administrators who were invited to new organizations.

    • Organization administrator role and its associated ID.
metaObject
  • The formsVersion key specifies the versions of User service forms.
  • The correlation key specifies the API request ID.