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.
Back to API List
Notifies Agent AI when a conversation terminates, triggering configured post-conversation actions such as cleanup and state reset. Invoke this API only once at the final termination of the call — whether it ends normally or unexpectedly — to ensure accurate event handling and prevent duplicate processing.
API Details
Field Value Method POSTEndpoint https://{{host}}/agentai/api/v1/hooks/{{botId}}Content Type application/jsonAuthorization auth: {{JWT}} — See How to generate the JWT Token
Path Parameters
Parameter Required Description hostYes The environment URL. For example, https://platform.kore.ai. botIdYes AI Agent ID or Stream ID. Available on the General Settings page of the AI Agent.
Sample Request
curl --location 'https://{{host}}/agentai/api/v1/hooks/st-56fbfece-0293-55a3-9154-7e3e19xxxxxx' \
--header 'token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
--header 'Content-Type: application/json' \
--data '{
"botId": "st-56fbfece-0293-55a3-9154-7e3e19xxxxxx",
"conversationId": "atesta-mlxxxxxx",
"events": [{
"name": "END_OF_CONVERSATION",
"reason": "agent_initiated",
"language": "en",
"experience": "voice",
"participant": {
"identity": "agent1",
"name": "Agent AI",
"type": "agent",
"customFields": {
"agentEmail": "qqqqqq",
"queueId": "1694",
"queueName": "queue11"
}
}
}]
}'
Body Parameters
Parameter Required Description conversationIdYes Unique identifier of the conversation. botIdYes Unique identifier of the bot. eventsYes List of events to trigger. events[].nameYes Name of the event. For example, "END_OF_CONVERSATION". events[].reasonYes Reason for ending the conversation. For example, agent_initiated. events[].languageYes Language of the conversation. For example, en. events[].experienceYes Interaction type. For example, voice or chat. events[].participantYes Participant details associated with the event. events[].participant.identityYes Unique participant identifier. events[].participant.nameYes Display name of the participant. events[].participant.typeYes Participant type. For example, agent. events[].participant.customFieldsNo Custom metadata associated with the participant. events[].participant.customFields.agentEmailNo Agent email identifier. events[].participant.customFields.queueIdNo Queue identifier. events[].participant.customFields.queueNameNo Queue name.
Sample Response