Close Conversation
Conversation
Close conversation
Close an active conversation with an end user
POST
Close Conversation
Documentation Index
Fetch the complete documentation index at: https://docs.jelou.ai/llms.txt
Use this file to discover all available pages before exploring further.
Description
Closes an active conversation in the external support panel. Allows specifying a closing message to send to the user and the reason for closing. Upon execution, Jelou emits theconversation.close event to the webhook configured in the integration.
Endpoint
Path parameters
Unique identifier of the Jelou project from which the conversation is closed.
Body parameters
Identifier of the Jelou bot associated with the conversation.
Identifier of the end user whose conversation you want to close.
Message to be sent to the user at the time of closing the conversation.
type— Message type:textoredge.text— Text of the closing message (whentypeistext).
Authentication
All requests must include thex-api-key header with your Jelou project API key.
Request example
The following example closes the conversation for userUSER_ID and includes a closing message:
cURL
Responses
| Code | Status | Description |
|---|---|---|
| 200 | OK | Conversation closed successfully. |
| 401 | Unauthorized | Invalid or missing authentication credentials. |
| 404 | Not Found | Bot or user not found. |
| 422 | Unprocessable Entity | Fields sent contain invalid values or fail validations. |
| 500 | Internal Server Error | Internal server error. |
Response example
Webhook event conversation.close
When this resource is executed, Jelou will emit the conversation.close event to the webhook configured in the integration. The payload includes the close reason and the message sent to the user.
Payload fields
| Field | Type | Description |
|---|---|---|
event | string | Event name: conversation.close |
timestamp | number | Unix timestamp in milliseconds at the time of the event. |
project_id | string | Jelou project identifier. |
room_id | string | Conversation room identifier. |
contact.id | string | End user identifier. |
contact.name | string | End user name. |
conversation.id | string | Unique identifier of the closed conversation. |
bot.id | string | Associated bot identifier. |
bot.name | string | Associated bot name. |
value.reason | string | Close reason: closed_by_operator. |
value.redirectPayload.type | string | Closing message type: text or edge. |
value.redirectPayload.text | string | Text of the message sent to the user upon closing (optional). |
Authorizations
Basic authentication using Base64 encoded clientId:clientSecret
Path Parameters
Unique identifier of the Jelou project
Response
Conversation closed successfully