Skip to main content
POST
/
api
/
v1
/
integration
/
conversations
/
join-conversation
cURL
curl -X POST 'https://app-be.thesis.io/api/v1/integration/conversations/join-conversation' \
  -H 'Authorization: Bearer YOUR_SPACE_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "conversation_id": "conv_abc123def456",
    "user_prompt": "Please review the code we discussed earlier",
    "research_mode": "deep_research"
  }' --no-buffer
"<string>"

Authorizations

Authorization
string
header
required

Enter your API token in the format: Bearer <your_token_here>

Body

application/json
conversation_id
string | null

ID of the existing conversation to join

Example:

"conv_abc123def456"

user_prompt
string | null

Message to send when joining the conversation

Example:

"Please review the code we discussed earlier"

research_mode
enum<string> | null

Research mode to use in the conversation. Must be one of: chat, deep_research, follow_up

Available options:
chat,
deep_research,
follow_up
Example:

"deep_research"

latest_event_id
integer | null

ID of the latest event to resume from

Example:

123

x_device_id
string | null

Device ID to use for the conversation

Example:

"123"

Response

Successfully joined conversation with streaming response

Server-Sent Events stream with real-time conversation updates. Events are serialized using event_to_dict() and sent as SSE format.

Examples:
{
"type": "oh_event",
"data": {
"id": 1,
"timestamp": "2024-01-15T10:45:00.123Z",
"source": "user",
"message": "Please review this code",
"action": "message",
"args": {
"content": "Please review this code",
"wait_for_response": false
}
}
}
{
"type": "oh_event",
"data": {
"id": 2,
"timestamp": "2024-01-15T10:45:30.456Z",
"source": "agent",
"message": "I'll analyze the code for you...",
"action": "message",
"args": {
"content": "I'll analyze the code for you. Let me start by examining the structure...",
"wait_for_response": false
}
}
}
{
"type": "oh_event",
"data": {
"id": 3,
"timestamp": "2024-01-15T10:45:35.789Z",
"source": "agent",
"observation": "agent_state_changed",
"content": "",
"extras": {
"agent_state": "RUNNING",
"reason": "Starting code analysis"
},
"success": true
}
}