> ## 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.

# Get User Information API

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

To retrieve user details.

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

| Field             | Value                                                                                                                            |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| **Method**        | POST                                                                                                                             |
| **Endpoint**      | `https://{{host}}/api/public/usersInfo`                                                                                          |
| **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: User Management > User 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/usersInfo \
  -H 'Content-Type: application/json' \
  -H 'auth: YOUR_JWT_ACCESS_TOKEN' \
  -d '{
    "emailIds": [
        "jane.doe@example.com",
        "john.doe@example.com"
    ],
    "status": "active"
}'
```

## Body Parameters

| Parameter           | Description                                                        |
| ------------------- | ------------------------------------------------------------------ |
| `emailIds`          | Array of email IDs of users whose information is sought.           |
| `status` (optional) | Filter by user status: `active`, `not active`, or `all` (default). |

## Sample Response

**Success:**

```json theme={null}
[
    {
       "canCreateBot": true,
        "isDeveloper": true,
        "userInfo": {
            "emailId": "john.doe@example.com",
            "userId": "u-575f16b0-c4c5-5f3c-a740-06288c6xxxxx",
            "firstName": "",
            "lastName": "",
            "status": "active",
            "lastLogin": "2023-08-08T05:55:56.698Z"
        },
        "roles": {
            "btRoles": [
                {
                    "roleId": "5d9d920dabdc1e6e8ec99342",
                    "roleName": "sample bot role 2",
                    "botId": "st-16511425-15c5-5cdf-b652-a796db7xxxxx",
                    "botName": "bot6ent"
                }
            ],
            "adminRoles": [
                {
                    "roleId": "5cd4081158217217cccxxxxx",
                    "roleName": "admin"
                }
            ]
        },
        "groups": [
            {
                "groupId": "e-06b41cdd-7678-5394-b958-40ca566xxxxx",
                "groupName": "group1"
            }
        ]
    }
]
```

**Failure:**

```json theme={null}
[
    {
        "userInfo": {
            "emailId": "a3q4",
            "status": "failure",
            "reason": {
                "errors": [
                    {
                        "msg": "User not found. Please check the provided email address.",
                        "code": 400
                    }
                ]
            }
        }
    }
]
```
