curl --request POST \
--url https://gateway.jelou.ai/jelouapi/v1/external-support/{projectId}/conversations/close \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"botId": "<string>",
"userId": "<string>",
"redirectPayload": {
"type": "<string>",
"text": "<string>"
}
}
'{
"message": "<string>",
"statusMessage": "<string>",
"status": 123,
"error": {
"code": "<string>",
"key": "<string>",
"description": "<string>",
"developerMessages": {},
"clientMessages": {}
},
"validationError": {}
}Close an active conversation with an end user
curl --request POST \
--url https://gateway.jelou.ai/jelouapi/v1/external-support/{projectId}/conversations/close \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"botId": "<string>",
"userId": "<string>",
"redirectPayload": {
"type": "<string>",
"text": "<string>"
}
}
'{
"message": "<string>",
"statusMessage": "<string>",
"status": 123,
"error": {
"code": "<string>",
"key": "<string>",
"description": "<string>",
"developerMessages": {},
"clientMessages": {}
},
"validationError": {}
}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.
conversation.close event to the webhook configured in the integration.
POST https://gateway.jelou.ai/jelouapi/v1/external-support/{projectId}/conversations/close
type — Message type: text or edge.text — Text of the closing message (when type is text).x-api-key header with your Jelou project API key.
x-api-key: API_KEY
USER_ID and includes a closing message:
curl --request POST \
--url https://gateway.jelou.ai/jelouapi/v1/external-support/PROJECT_ID/conversations/close \
--header 'x-api-key: API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"botId": "BOT_ID",
"userId": "USER_ID",
"redirectPayload": {
"type": "text",
"text": "Conversation closing message"
}
}'
| 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. |
{
"message": [
"Conversation closed successfully"
],
"statusMessage": "success",
"status": 1,
"data": {
"conversationId": "CONVERSATION_ID",
"status": "closed",
"endedReason": "closed_by_operator"
}
}
conversation.closeconversation.close event to the webhook configured in the integration. The payload includes the close reason and the message sent to the user.
{
"event": "conversation.close",
"timestamp": 1777992928697,
"field": "conversation",
"object": "conversation_event",
"event_type": "close",
"project_id": "PROJECT_ID",
"room_id": "ROOM_ID",
"contact": {
"id": "USER_ID",
"name": "USER_NAME"
},
"conversation": {
"id": "CONVERSATION_ID"
},
"bot": {
"id": "BOT_ID",
"name": "BOT_NAME"
},
"value": {
"reason": "closed_by_operator",
"redirectPayload": {
"type": "text",
"text": "Conversation closing message"
}
}
}
| 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). |
Basic authentication using Base64 encoded clientId:clientSecret
Unique identifier of the Jelou project
Conversation closed successfully
Was this page helpful?