Send a message to an existing conversation. The AI agent will respond based on the conversation context and your codebase knowledge graph.
x-api-key header.
Request & Response
| Location | Field | Type | Required | Default | Description |
|---|---|---|---|---|---|
| Path | conversation_id | string | required | - | The unique identifier of the conversation (obtained from Create Conversation endpoint) |
| Query | stream | boolean | optional | true | Stream response in real-time. Set to false for complete response. |
| Query | session_id | string | optional | null | Session ID for reconnection to existing streaming session |
| Query | prev_human_message_id | string | optional | null | Previous message ID for deterministic session handling |
| Query | cursor | string | optional | null | Stream cursor position for replay functionality |
| Form | content | string | required | - | Your message or question. Cannot be empty or whitespace-only. |
| Form | node_ids | string | optional | - | JSON-encoded array of NodeContext objects to reference specific code nodes |
| Form | tunnel_url | string | optional | - | VS Code extension tunnel URL for local server routing |
| File | images | file[] | optional | - | Image attachments to include with your message |
| Response | message | string | - | - | AI agent’s response content |
| Response | citations | array[string] | - | - | Source code references used in the response |
| Response | tool_calls | array | - | - | Tool invocations made by the agent during response generation |
node_ids helps the agent focus on specific parts of your codebase. Because the endpoint uses multipart/form-data, pass node_ids as a JSON-encoded string in the form field:
400 Bad Request
content fieldcontent field entirely401 Unauthorized
402 Payment Required
404 Not Found
conversation_id in URL path500 Internal Server Error
stream=true (the default), the endpoint returns a streaming response via Server-Sent Events. Each event chunk contains a partial or complete agent response. When stream=false, the endpoint returns a single JSON object with the complete response:
API key authentication. Get your key from potpie settings page
The conversation ID to send the message to
Whether to stream the response
Your message or question. Cannot be empty or whitespace-only.
1JSON-encoded array of NodeContext objects to reference specific code nodes. Example: [{"node_id":"node_123","name":"AuthService"}]
VS Code extension tunnel URL for local server routing
Image attachments to include with your message