Conversations

Initiate Email

Initiates conversation with the email integration

post
/v1/integration/email/{emailIntegrationId}/initiate

Authorization

ChatBotKit API Secret * Required

HTTP Authorization Scheme: bearer

Request Body * Required

Request Body Schema: application/json

emailstring

The email address to use for the conversation

subjectstring

The subject of the email

textstring

The text instruction to use to initiate the conversation

import { ChatBotKit } from '@chatbotkit/sdk'

const cbk = new ChatBotKit({

secret: process.env.CHATBOTKIT_API_KEY!

})

const response = await cbk.integration.email.initiate(

emailIntegrationId,
{
"email":"string",
"subject":"string",
"text":"string"
}
)
{
"id":"string"
}
The email integration was successfully initiated