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

# Create an Agent API

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

Use this API to add an agent with the given stream ID.

| **Method**        | POST                                                                                                                           |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **Endpoint**      | `https://{{host}}/agentassist/api/v1/public/{{streamId}}/agents`                                                               |
| **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**     | SmartAssist Analytics                                                                                                          |

## Path Parameters

| Parameter  | Description                                                                     | Type             |
| ---------- | ------------------------------------------------------------------------------- | ---------------- |
| `host`     | Environment URL, for example, `https://platform.kore.ai`                        | String, required |
| `streamId` | Bot identifier or Stream identifier. You can get it from the App Settings page. | String, required |

## Sample Request

```bash expandable=true theme={null}
curl --location 'https://{{host}}/agentassist/api/v1/public/{{streamId}}/agents' \
--header 'accept: application/json' \
--header 'auth: {{JWT_TOKEN}}' \
--header 'Content-Type: application/json' \
--header 'accountid: {{accountId}}' \
--data-raw '{
    "emailId": "john.doe@example.com",
    "firstName": "nov05",
    "lastName": "agent3",
    "nickName": "agent three",
    "phoneNumber": "13456*****982",
    "agentGroupId": "ag-c57b602-151a-41c8-8630-a1eae433xxxx",
    "IsAgentConsoleLanding": true,
    "canSupportChat": true,
    "maxChatSupport": 5,
    "canSupportVoice": true,
    "customId" : "A..Zxyz09!'\'''\'''\''()*+,-./:;<=>?@[]^_`{|}",
    "roleId": "67654be356840f366e79xxxx",
    "chatLanguageSupport": [
        {
            "language": "en",
            "proficiency": "expert",
            "isActive": true
        }
    ],
    "voiceLanguageSupport": [
        {
            "language": "en",
            "proficiency": "expert",
            "isActive": true
        }
    ],
    "skills": [],
    "desktopLayouts": [],
    "queues": [
        {
            "id": "qu-854eaa2-b0b6-4327-9008-723d7519xxxx",
            "isPreferredAgent": false
        }
    ],
    "createDefaultLayoutAndAssign": true
}'
```

## Body Parameters

| Parameter                          | Description                                                                | Type              |
| ---------------------------------- | -------------------------------------------------------------------------- | ----------------- |
| `emailId`                          | Email address of the agent. Must be unique.                                | String, required  |
| `firstName`                        | First name of the agent.                                                   | String, required  |
| `lastName`                         | Last name of the agent.                                                    | String, required  |
| `nickName`                         | Nickname of the agent.                                                     | String, optional  |
| `phoneNumber`                      | Contact number of the agent.                                               | String, optional  |
| `agentGroupId`                     | Unique identifier of the agent group the agent belongs to.                 | String, optional  |
| `canSupportChat`                   | Defines if the agent can handle chat interactions.                         | Boolean, optional |
| `maxChatSupport`                   | Maximum number of simultaneous chats the agent can support.                | Integer, optional |
| `canSupportVoice`                  | Defines if the agent can handle voice interactions.                        | Boolean, optional |
| `customId`                         | Custom identifier for the agent. Supports special characters except space. | String, optional  |
| `IsAgentConsoleLanding`            | Indicates if the agent should be directed to the agent console upon login. | Boolean, optional |
| `roleId`                           | Identifier for the role assigned to the agent.                             | String, required  |
| `chatLanguageSupport`              | List of languages and proficiency levels supported for chat.               | Array, optional   |
| `chatLanguageSupport.language`     | Language code (for example, `"en"`).                                       | String, required  |
| `chatLanguageSupport.proficiency`  | Proficiency level (for example, `"expert"`).                               | String, required  |
| `chatLanguageSupport.isActive`     | Indicates if the language is active for the agent.                         | Boolean, optional |
| `voiceLanguageSupport`             | List of languages and proficiency levels supported for voice.              | Array, optional   |
| `voiceLanguageSupport.language`    | Language code (for example, `"en"`).                                       | String, required  |
| `voiceLanguageSupport.proficiency` | Proficiency level (for example, `"expert"`).                               | String, required  |
| `voiceLanguageSupport.isActive`    | Indicates if the language is active for the agent.                         | Boolean, optional |
| `skills`                           | List of skills assigned to the agent.                                      | Array, optional   |
| `desktopLayouts`                   | List of desktop layouts assigned to the agent.                             | Array, optional   |
| `queues`                           | List of queues assigned to the agent.                                      | Array, optional   |
| `queues.id`                        | Identifier of the queue.                                                   | String, required  |
| `queues.isPreferredAgent`          | Defines if the agent is the preferred agent for the queue.                 | Boolean, optional |
| `createDefaultLayoutAndAssign`     | Indicates whether to create and assign a default desktop layout.           | Boolean, optional |

## Sample Response

```json expandable=true theme={null}
{
  "emailId": "john.doe@example.com",
  "firstName": "John",
  "lastName": "Doe",
  "nickName": "john",
  "phoneNumber": 13456782345,
  "profImage": "5ff233123124xxxx",
  "agentGroupId": "ag-3234fsdf2131241xxxx",
  "canSupportChat": true,
  "maxChatSupport": 5,
  "canSupportVoice": true,
  "IsAgentConsoleLanding": true,
  "attachmentsEnabled": true,
  "emojisEnabled": true,
  "roleId": "6ff233123124xxxx",
  "chatLanguageSupport": [
    { "language": "en", "proficiency": "expert", "isActive": true }
  ],
  "voiceLanguageSupport": [
    { "language": "es", "proficiency": "expert", "isActive": true }
  ],
  "skills": [
    {
      "skillId": "s-2122xxxx",
      "proficiencyLevel": "expert",
      "userId": "u-f9e37b9c-66d5-5525-9df1-da0edbeaxxxx",
      "name": "Default Skill",
      "skillGroupName": "Default SkillGroup",
      "skillGroupColor": "#D2000D"
    }
  ],
  "desktopLayouts": [
    { "id": "ly-de35d82-7323-4420-b893-c35b5175xxxx", "isDefault": true }
  ],
  "queues": [
    { "id": "qu-80ac056-57db-420b-b937-9581dd20xxxx", "isPreferredAgent": true }
  ],
  "createDefaultLayoutAndAssign": true,
  "orgId": "o-89381108-2ea3-53a2-a422-b8992bbaxxxx",
  "userId": "u-021655cc-4cd6-524b-b42a-1bed8b5cxxxx",
  "callRegion": "JP",
  "maxDigitalChatSupport": 5,
  "maxEmailChatSupport": 5,
  "maxMessagingChatSupport": 5
}
```

## Response Parameters

| Parameter                          | Type    | Description                                                                        |
| ---------------------------------- | ------- | ---------------------------------------------------------------------------------- |
| `emailId`                          | String  | Email address of the agent.                                                        |
| `firstName`                        | String  | First name of the agent.                                                           |
| `lastName`                         | String  | Last name of the agent.                                                            |
| `nickName`                         | String  | Nickname or display name of the agent.                                             |
| `phoneNumber`                      | Number  | Contact phone number of the agent.                                                 |
| `profImage`                        | String  | Unique identifier of the agent's profile image.                                    |
| `agentGroupId`                     | String  | Unique identifier of the agent group assigned to the agent.                        |
| `canSupportChat`                   | Boolean | Indicates whether the agent can handle chat interactions.                          |
| `maxChatSupport`                   | Integer | Maximum number of concurrent chat conversations the agent can handle.              |
| `canSupportVoice`                  | Boolean | Indicates whether the agent can handle voice interactions.                         |
| `attachmentsEnabled`               | Boolean | Indicates whether file attachments are enabled for the agent.                      |
| `emojisEnabled`                    | Boolean | Indicates whether emoji support is enabled for the agent.                          |
| `roleId`                           | String  | Unique identifier of the role assigned to the agent.                               |
| `chatLanguageSupport`              | Array   | List of languages supported for chat interactions.                                 |
| `chatLanguageSupport.language`     | String  | Language code supported for chat interactions.                                     |
| `chatLanguageSupport.proficiency`  | String  | Proficiency level of the agent in the specified chat language.                     |
| `chatLanguageSupport.isActive`     | Boolean | Indicates whether the chat language support is active.                             |
| `voiceLanguageSupport`             | Array   | List of languages supported for voice interactions.                                |
| `voiceLanguageSupport.language`    | String  | Language code supported for voice interactions.                                    |
| `IsAgentConsoleLanding`            | Boolean | Indicates if the agent should be directed to the agent console upon login.         |
| `voiceLanguageSupport.proficiency` | String  | Proficiency level of the agent in the specified voice language.                    |
| `voiceLanguageSupport.isActive`    | Boolean | Indicates whether the voice language support is active.                            |
| `skills`                           | Array   | List of skills assigned to the agent.                                              |
| `skills.skillId`                   | String  | Unique identifier of the skill.                                                    |
| `skills.proficiencyLevel`          | String  | Proficiency level of the agent for the skill.                                      |
| `skills.userId`                    | String  | Unique identifier of the user associated with the skill assignment.                |
| `skills.name`                      | String  | Name of the skill.                                                                 |
| `skills.skillGroupName`            | String  | Name of the skill group to which the skill belongs.                                |
| `skills.skillGroupColor`           | String  | Hex color code associated with the skill group.                                    |
| `desktopLayouts`                   | Array   | List of desktop layouts assigned to the agent.                                     |
| `desktopLayouts.id`                | String  | Unique identifier of the desktop layout.                                           |
| `desktopLayouts.isDefault`         | Boolean | Indicates whether the layout is the default layout for the agent.                  |
| `queues`                           | Array   | List of queues assigned to the agent.                                              |
| `queues.id`                        | String  | Unique identifier of the queue.                                                    |
| `queues.isPreferredAgent`          | Boolean | Indicates whether the agent is marked as a preferred agent for the queue.          |
| `createDefaultLayoutAndAssign`     | Boolean | Indicates whether a default desktop layout is automatically created and assigned.  |
| `orgId`                            | String  | Unique identifier of the organization.                                             |
| `userId`                           | String  | Unique identifier of the agent.                                                    |
| `callRegion`                       | String  | Region code used for voice calling services.                                       |
| `maxDigitalChatSupport`            | Integer | Maximum number of concurrent digital channel conversations the agent can handle.   |
| `maxEmailChatSupport`              | Integer | Maximum number of concurrent email conversations the agent can handle.             |
| `maxMessagingChatSupport`          | Integer | Maximum number of concurrent messaging channel conversations the agent can handle. |
