Close a conversation
PATCH
/v2/health-navigator/conversations/close
const url = 'https://client-api.abi.ai/v2/health-navigator/conversations/close';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"userId":"abi12345"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://client-api.abi.ai/v2/health-navigator/conversations/close \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "userId": "abi12345" }'Close an active Health Navigator chat session. Sessions are also closed automatically after 2 hours without a user message; once closed, no further input is allowed.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
userId
required
Abi user identifier whose active conversation should be closed.
string
Example
abi12345Example
{ "userId": "abi12345"}Responses
Section titled “Responses”Conversation closed. No further messages can be sent to the closed session.
Media typeapplication/json
object
userId
Abi user identifier for the conversation.
string
conversationInfo
object
id
Conversation identifier.
string
status
Current conversation lifecycle status.
string
Example
{ "userId": "abi12345", "conversationInfo": { "id": "01HK8GGQ123456789ABCDEFGHI", "status": "CLOSED" }}Request could not be completed.
Media typeapplication/json
object
code
Short machine-readable error code.
string
message
Human-readable explanation of the error.
string
Examplegenerated
{ "code": "example", "message": "example"}Request could not be completed.
Media typeapplication/json
object
code
Short machine-readable error code.
string
message
Human-readable explanation of the error.
string
Examplegenerated
{ "code": "example", "message": "example"}