End Conversations

Changed on

End multiple running conversations by marking them in Redis for the LiveKit agent to terminate.

This endpoint:

  1. Checks that each test result exists and is in RUNNING status
  2. Writes control objects to Redis for the LiveKit agent to pick up
  3. Schedules a 30-second fallback watchdog for each conversation
  4. Returns which conversations were successfully marked for ending and which failed

The fallback watchdog ensures that if LiveKit fails to respond, the conversation status will be updated after 30 seconds to prevent it from appearing stuck forever.

post/v1/end-conversations

Request

  • Base URL
    https://api.getbluejay.ai
  • URL
    https://api.getbluejay.ai/v1/end-conversations
  • Auth
    HTTPBearer (a scheme the document does not define)

Headers

X-Organization-Idstring
X-API-Keystring required

API key required to authenticate requests.

Request body

test_result_idsinteger[] required

List of conversation IDs to end

Response

Successful Response

successboolean required

Whether the operation was successful

ended_countinteger required

Number of conversations marked for ending

test_result_idsinteger[] required

Conversation IDs that were processed

failed_idsinteger[] nullable

Conversation IDs that failed to process (if any)

messagestring required

Status message

Changes