# User Provisioning APIs

The Aisera Gen AI platform includes 2 API calls that you can use to add or remove information about your Aisera application/bot users.

### Which Users Are We Talking About?

These provisioning APIs allow you to add or remove Aisera platform developer user information (people who use the Aisera Admin UI).

Note: Users for your Aisera tenant instance (people who use the Aisera Admin UI) can also be added with the **Settings > User Accounts** command in the Aisera Admin UI.&#x20;

{% hint style="info" %}
The **User Provisioning APIs** do not control information for the bot users. Application/Bot User information is stored in a Users table within your data source and is used to control user views and content access within the application/bot. You can see the list of application/bot users in the **Users** window of your Aisera Admin UI. This window is populated when you ingest data from a data source.
{% endhint %}

## Prerequisites

1. You need to know your Aisera tenant instance URL:\
   `https://<your_company_name>.login.aisera.cloud` \
   This is provided by your Aisera onboarding team and gives you access to the Aisera Admin UI (bot development tool). \
   \
   Your API calls will be made to this endpoint - to your instance of the Aisera Gen AI platform in the Aisera cloud.<br>
2. Gather the following input parameters before you make the API call.
   1. **Content-Type:** application/json
   2. **Authorization:** This can be Basic or Bearer, based on customer requirement. This value is provided by your Aisera team.
   3. **x-app-token:** The app token value is provided by your Aisera team.

## API Calls

There are 3 types of calls in the User Provisioning API:

1. **Provision**
2. **Update**
3. **De-Provision**

## Provision:

URL: https\://`<your_company_name>.login.aisera.cloud`/scim/provision-user

**Input Parameters:**

**Content-Type:** application/json

**Authorization:** Can be Basic Auth or Bearer Token&#x20;

**x-app-token:** App Token&#x20;

**Sample body:**

```
{ 
   "username": "platform.user",
   "firstName": "Platform",
   "lastName": "User", 
   "email": "platform_user@company.com", 
   "password": "*********",
   "role": "Administrator" 
 }
```

The values in the body of the **User Provisioning** call, shown above, correspond with the **New User Account** window in the Aisera Admin UI.

<div align="left"><figure><img src="/files/kwZ9GPQ6vMVm8DSQQxHj" alt=""><figcaption></figcaption></figure></div>

## Update:

URL: https\://`<your_company_name>.login.aisera.cloud`/scim/update-user/`<user_email>`

**Input Parameters:**

**Content-Type:** application/json

**Authorization:** Can be Basic Auth or Bearer Token&#x20;

**x-app-token:** App Token&#x20;

**Sample body:**

```
{ 
   "username": "platform user",
   "firstName": "Platform",
   "lastName": "User", 
   "password": "**********",
   "roles": ["Help Desk Agent", "IT Specialist"] 
 }
```

In this example, the roles for the Platform User account were updated from Administrator to Help Desk Agent and IT Specialist.

## De-provision:

URL: https\://`<your_company_name>.login.aisera.cloud`/scim/de-provision-user/`<user_email>`

**Input Param:**

**Content-Type:** application/json

**Authorization:** Can be Basic Auth or Bearer Token&#x20;

**x-app-token:** App Token (Token to be provided by Aisera)

{% hint style="info" %}
Note that the De-provisioning call does not need body parameters because the user is identified in the header URL and all parameters are removed.
{% endhint %}

In this example, the Platform User account is removed from the list of **Users** for the Aisera Admin UI.<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aisera.com/apis/apis/user-provisioning-apis.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
