> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Update User Access API

<Badge icon="arrow-left" color="gray">[Back to API List](/ai-for-service/apis/automation/api-list)</Badge>

To add or remove the ability to access App Builder to create new bots.

<Note>
  This API requires JWT generated by an application created only from the Admin Console.
</Note>

| Field             | Value                                                                                                                           |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| **Method**        | POST                                                                                                                            |
| **Endpoint**      | `https://{{host}}/api/public/useraccess`                                                                                        |
| **Content Type**  | `application/json`                                                                                                              |
| **Authorization** | `auth: {{JWT}}` See [How to generate the JWT Token](/ai-for-service/apis/automation/api-introduction#generating-the-jwt-token). |
| **API Scope**     | App Builder: Not Applicable; Admin Console: Profile Management > Role Management                                                |

## Path Parameters

| Parameter | Description                                              |
| --------- | -------------------------------------------------------- |
| `host`    | Environment URL, for example, `https://platform.kore.ai` |

## Sample Request

```json theme={null}
curl -X POST 'https://{{host}}/api/public/useraccess' \
  -H 'Content-Type: application/json' \
  -H 'auth: YOUR_JWT_ACCESS_TOKEN' \
  -d '{
"emailIds":["john.doe@example.com"],
"canCreateBot":true,
"isDeveloper":true,
"hasDataTableAndViewAccess": true
}'
```

## Body Parameters

| Parameter                   | Description                                                                                                                               |
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `emailIds`                  | The array of user email IDs whose access permissions have to be changed, for example, `["john.doe@example.com", "jane.doe@example.com"]`. |
| `canCreateBot`              | Determines if the specified users can create AI Agents in their App Builder accounts. Set to `true` or `false`.                           |
| `isDeveloper`               | Determines if the specified users can have access to App Builder. Set to `true` or `false`.                                               |
| `hasDataTableAndViewAccess` | Determines if the specified users can create tables and views. Set to `true` or `false`.                                                  |

## Sample Response

**Success:**

```json theme={null}
[
  "SUCCESS"
]
```

**Invalid input combination (`canCreateBot: true`, `isDeveloper: false`):**

```json theme={null}
{
  "errors": [
      {
        "msg": "Invalid values in the body",
        "code": 403
      }
  ]
}
```

**No email addresses provided (`emailIds` is empty):**

```json theme={null}
{
  "errors": [
      { "msg": "emailIds cannot be empty",
        "code": 400 }
   ]
}
```

**Invalid email ID or email not present in the account:**

```json theme={null}
{
  "errors": [
    { "msg": "One or more entered emails not found",
      "code": 400 }
  ]
}
```

**One or more emailIds belong to other accounts:**

```json theme={null}
{
  "errors": [
    { "msg": "Emails << jane.doe@example.com >> not associated with your account",
      "code": 400 }
  ]
}
```
