---
schema_version: "1"
id: 5d9722ff28a28b467f2fd878f89dccd67739c5fbc3679335769ca99d9b492d57
title: Conversation Toolkit API
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/lightning-base-components/lightning-design-system/guides/lwc/components/lightning/conversationToolkitApi/lightning-conversation-toolkit-api.md
canonical_url: https://developer.salesforce.com/docs/platform/lightning-component-reference/guide/lightning-conversation-toolkit-api.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 9695d6869c51c7ce5a67d8859ceed8c1d2dfeb6fca54097059ed2079781e4a21
products:
  - Lightning Component Reference
---
# Conversation Toolkit API

**`lightning/conversationToolkitApi`**

Conversation Toolkit API is a collection of front-end API methods for interacting with the MIAW or Enhanced Messaging product using the `lightning/conversationToolkitApi` module. The `lightning/conversationToolkitApi` module requires API version 60.0 or later.

**For Use In**

Lightning Experience

::::::tabset{tabs='[ "Develop", "Specifications"]'}

:::::tab

All the methods in the `lightning/conversationToolkitApi` module return a promise. Required method parameters are explicitly passed as individual arguments. Optional parameters are passed into an object as the last argument of the method.

To use the Conversation Toolkit API in your component, import the functions in your component's JavaScript file.

```js
import {
  endConversation,
  getConversationLog,
  setAgentInput,
  sendTextMessage,
  setMessagingComponent,
  sendMessagingComponent,
  inactivateConversation,
} from "lightning/conversationToolkitApi";
```

**note:** Using Conversation Toolkit API in markup via the `lightning-conversation-toolkit-api` component is deprecated. Use the imported functions instead. Some functions are available only by import.

For this module's documentation, see [LWC Methods for Enhanced Messaging in Lightning Experience](https://developer.salesforce.com/docs/atlas.en-us.api_console.meta/api_console/sforce_api_console_methods_enhanced_lightning_conversationtoolkitapi_lwc.htm) in the Console Developer Guide.


:::::

:::::tab
::component-specification{component="conversationToolkitApi" model="lwc" namespace="lightning"}

:::::

::::::
