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": {}
}Encerra uma conversa ativa com um usuário final
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 para o webhook configurado na integração.
POST https://gateway.jelou.ai/jelouapi/v1/external-support/{projectId}/conversations/close
type — Tipo de mensagem: text ou edge.text — Texto da mensagem de encerramento (quando type é text).x-api-key com a API key do projeto Jelou.
x-api-key: API_KEY
USER_ID e inclui uma mensagem de encerramento:
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": "Mensagem de encerramento da conversa"
}
}'
| Código | Status | Descrição |
|---|---|---|
| 200 | OK | Conversa encerrada com sucesso. |
| 401 | Unauthorized | Credenciais de autenticação inválidas ou ausentes. |
| 404 | Not Found | Bot ou usuário não encontrado. |
| 422 | Unprocessable Entity | Os campos enviados contêm valores inválidos ou não passam nas validações. |
| 500 | Internal Server Error | Erro interno do servidor. |
{
"message": [
"Conversation closed successfully"
],
"statusMessage": "success",
"status": 1,
"data": {
"conversationId": "CONVERSATION_ID",
"status": "closed",
"endedReason": "closed_by_operator"
}
}
conversation.closeconversation.close ao webhook configurado na integração. O payload inclui o motivo do encerramento e a mensagem enviada ao usuário.
{
"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": "Mensagem de encerramento da conversa"
}
}
}
| Campo | Tipo | Descrição |
|---|---|---|
event | string | Nome do evento: conversation.close |
timestamp | number | Marca de tempo Unix em milissegundos do momento do evento. |
project_id | string | Identificador do projeto Jelou. |
room_id | string | Identificador da sala de conversa. |
contact.id | string | Identificador do usuário final. |
contact.name | string | Nome do usuário final. |
conversation.id | string | Identificador único da conversa encerrada. |
bot.id | string | Identificador do bot associado. |
bot.name | string | Nome do bot associado. |
value.reason | string | Motivo do encerramento: closed_by_operator. |
value.redirectPayload.type | string | Tipo da mensagem de encerramento: text ou edge. |
value.redirectPayload.text | string | Texto da mensagem enviada ao usuário ao encerrar (opcional). |
Basic authentication using Base64 encoded clientId:clientSecret
Unique identifier of the Jelou project
Conversation closed successfully
Esta página foi útil?