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 Parameter | Data Type | Description | Required |
|---|---|---|---|
| name | String | The organization's name. Example: "ShikshaLokam" | True |
| code | String | Unique code for the organization. Example: "shiksha20" | True |
| description | String | Description of the organization. Example: "Empowering educational leadership" | True |
| domains | Array 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_email | String | Email ID to which the organization administrator would receive the invite. Example: "admin@shikshalokam.com" | False |
Request Header
| Key | Value | Description | Required |
|---|---|---|---|
X-auth-token |
| The access_token received from the login response. | True |
accept-language |
| 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 Parameter | Data Type | Description |
|---|---|---|
| responseCode | String | A success response. |
| message | String | A success message. |
| result | Object |
|
| meta | Object |
|
Obtaining Organizations' Details
System administrators or organization administrators can obtain an organization's details such as organization ID, name, and code.
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 Parameter | Data Type | Description | Required |
|---|---|---|---|
| page | Integer | The page number. Example: page=2 If not provided, a default page number 1 is applied. | False |
| limit | Integer | The number of records (entries of organizations) per page. Example: limit=10 If not provided, a default limit of 100 is applied. | False |
| search | String | 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
| Key | Value | Description | Required |
|---|---|---|---|
X-auth-token |
| The access_token received from the login response. | True |
accept-language |
| 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 Parameter | Data Type | Description |
|---|---|---|
| responseCode | String | A success response. |
| message | String | A success message. |
| result | Object | It contains the following:
|
Obtaining Users' Details
System administrators or organization administrators can obtain the list of users and their details such as name, user ID, and email.
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 Parameter | Data Type | Description | Required |
|---|---|---|---|
| type | String | The role (mentor or mentee) of the user whose ID you want to obtain. Example: type=mentor | True |
| page | Integer | The page number. Example: page=2 If not provided, a default page number 1 is applied. | False |
| limit | Integer | The number of records (user entries) per page. Example: limit=10 If not provided, a default limit of 100 is applied. | False |
| search | String | Specify the user's name to obtain the user ID of a specific user. Example: search=John | False |
Request Body
If you have specified the user's role in the request path, you do not have to provide a request body.
| Payload Parameter | Data Type | Description | Required |
|---|---|---|---|
| id | String | 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
| Key | Value | Description | Required |
|---|---|---|---|
X-auth-token |
| The access_token received from the login response. | True |
accept-language |
| 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 Parameter | Data Type | Description |
|---|---|---|
| responseCode | String | A success response. |
| message | String | A success message. |
| result | Object |
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. |
| meta | Object |
|
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 Parameter | Data Type | Description | Required |
|---|---|---|---|
| String | 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_id | Integer | 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_id | Integer | ID of the organization to which the organization administrator should be assigned. Example: "12" | True |
Request Header
| Key | Value | Description | Required |
|---|---|---|---|
X-auth-token |
| The access_token received from the login response. | True |
accept-language |
| 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 Parameters | Data Type | Description |
|---|---|---|
| responseCode | String | A success response. |
| message | String | A success message. |
| result | Object |
note A mentee (default) role is assigned to organization administrators who were invited to new organizations. |
| meta | Object |
|