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

# Agent Transfer Integration API

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

Use the Agent Transfer Integration API to enable, update, and reset Agent Integrations for an app. The API supports Custom (Botkit), Kore, Genesys Web Messaging, ServiceNow, and Salesforce MIAW integrations.

| Field | Value |
| - | - |
| **Method** | `POST` – Enables a new Agent Integration.<br />`PUT` – Updates an existing Agent Integration.<br />`DELETE` – Resets an existing Agent Integration configuration. |
| **Endpoint** | `https://{{host}}/api/public/bot/{{botId}}/agentintegrations/chat/{{integration}}` |
| **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** | `agent_integrations:read` and `agent_integrations:write` |

All supported Agent Integrations are chat integrations. Use `chat` as the integration type in the endpoint.

### Path Parameters

| Parameter | Required | Description |
| - | - | - |
| `botId` | Required | ID of the app. Access it through **App Settings** → **App Profile**. |
| `integration` | Required | Identifier of the Agent Integration to configure. Supported integrations are `custom`, `genesys`, `kore`, `servicenow`, and `salesforce`. |

### Query Parameters

| Parameter | Required | Type | Description |
| - | - | - | - |
| `setAsDefault` | Optional | Boolean | Sets the Agent Integration as the default when set to `true`. Only one Agent Integration can be the default at a time. |

<Note>Do not use `isDefault` in the request body.</Note>

### Body Parameters

For `POST` and `PUT`, provide the configuration fields required for the selected Agent Integration.

| Parameter | Required | Type | Description |
| - | - | - | - |
| `<integration-specific-fields>` | Conditional | Object | Configuration fields required for the selected Agent Integration. |

### Sample Request for POST

Use `POST` to enable an Agent Integration.

```bash theme={null}
curl --location --request POST 'https://{{host}}/api/public/bot/{{botId}}/agentintegrations/chat/{{integration}}' \
--header 'auth: {{jwt-token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
  <integration-specific-fields>
}'
```

To enable the integration and set it as the default:

```bash theme={null}
curl --location --request POST 'https://{{host}}/api/public/bot/{{botId}}/agentintegrations/chat/{{integration}}?setAsDefault=true' \
--header 'auth: {{jwt-token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
  <integration-specific-fields>
}'
```

### Sample Request for PUT

Use `PUT` to update an existing Agent Integration. Provide the complete configuration.

```bash theme={null}
curl --location --request PUT 'https://{{host}}/api/public/bot/{{botId}}/agentintegrations/chat/{{integration}}' \
--header 'auth: {{jwt-token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
  <complete-integration-configuration>
}'
```

### Sample Request for DELETE

Use `DELETE` to reset an Agent Integration.

```bash theme={null}
curl --location --request DELETE 'https://{{host}}/api/public/bot/{{botId}}/agentintegrations/chat/{{integration}}' \
--header 'auth: {{jwt-token}}' \
--header 'Content-Type: application/json'
```

### Request Body Examples

**Custom Botkit**

Use `custom` as the `integration` value.

```json theme={null}
{
  "sdkClientId": "<sdkClientId>",
  "sdkHostUri": "<sdkHostUri>",
  "PIIMaskingDisabledForAgentTransfer": false,
  "connectorEnabled": false
}
```

**Genesys Web Messaging**

Use `genesys` as the `integration` value.

```json theme={null}
{
  "apiType": "webMessagingAPI",
  "baseURL": "<baseURL>",
  "organizationId": "<organizationId>",
  "deploymentId": "<deploymentId>",
  "queueName": "<queueName>",
  "webSocketURL": "<webSocketURL>",
  "disableEndMessage": false
}
```

**Kore**

Use `kore` as the `integration` value.

```json theme={null}
{
  "conversationType": "livechat",
  "isAgentAssistRequired": "yes",
  "isAgentAssistSendBtnEnabled": "yes"
}
```

**ServiceNow**

Use `servicenow` as the `integration` value.

```json theme={null}
{
  "host": "<host>",
  "authType": "basic",
  "userId": "<userId>",
  "password": "<password>",
  "VAApi": false,
  "queueId": "<queueId>"
}
```

**Salesforce**

Use `salesforce` as the `integration` value.

```json theme={null}
{
  "integrationType": "salesforcemiaw",
  "organizationId": "<organizationId>",
  "liveAgentUrl": "<liveAgentUrl>",
  "esDeveloperName": "<esDeveloperName>"
}
```

### Sample Response for POST

```json theme={null}
{
  "state": "configured",
  "requiresPublish": true
}
```

### Sample Response for PUT

```json theme={null}
{
  "state": "configured",
  "requiresPublish": true
}
```

### Sample Response for DELETE

```json theme={null}
{
  "status": "deleted",
  "integration": "<integration>"
}
```
