Skip to content

Conversations API

GET /api/conversations

Returns all conversations in the current workspace.

Response 200 OK

[
{
"id": "conv_abc123",
"title": "Fix authentication bug",
"project_id": "proj_xyz789",
"model_id": "claude-sonnet-4-5",
"created_at": "2025-01-15T10:00:00Z"
}
]
POST /api/conversations

Request body

{
"title": "Optional title",
"model_id": "claude-sonnet-4-5"
}

Both fields are optional. If no title is provided, one will be auto-generated.

Response 201 Created

GET /api/conversations/{id}

Returns the conversation details.

PUT /api/conversations/{id}

Request body

{
"title": "Updated conversation title"
}
DELETE /api/conversations/{id}

Deletes the conversation and all its messages.

GET /api/conversations/{id}/messages

Returns all messages in the conversation.

Response 200 OK

[
{
"id": "msg_1",
"role": "user",
"content": "Fix the login form validation",
"created_at": "2025-01-15T10:00:00Z"
},
{
"id": "msg_2",
"role": "assistant",
"content": "I'll create a task to fix the login form validation...",
"input_tokens": 150,
"output_tokens": 200,
"created_at": "2025-01-15T10:00:05Z"
}
]

Note: Messages are sent via the real-time WebSocket connection to the agent, not via a REST endpoint. The messages endpoint is read-only for retrieving history.

GET /api/conversations/{id}/suggest

Returns contextual action suggestions based on the conversation state.

Response 200 OK

{
"suggestions": [
"Run the tests to verify the fix",
"Create a pull request for the changes",
"Add error handling for edge cases"
]
}