Convenience endpoint that creates a new conversation and sends a message in a single request. Perfect for one-off queries or integrating Potpie into external tools.
Use Cases:
x-api-key header.
Request & Response
| Location | Field | Type | Required | Default | Description |
|---|---|---|---|---|---|
| Path | project_id | string | required | - | The ID of the project to query about |
| Query | hidden | boolean | optional | true | Whether to hide this conversation from the web UI |
| Body | content | string | required | - | The message content to send (your question about the codebase) |
| Body | agent_id | string | optional | codebase_qna_agent | The ID of the agent to use |
| Body | node_ids | array[object] | optional | - | Array of node context objects to focus the conversation |
| 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 |
400 Bad Request
content fieldcontent field401 Unauthorized
500 Internal Server Error
| Feature | Create Conversation + Message | Direct Message (This Endpoint) |
|---|---|---|
| API Calls | 2 separate calls | 1 combined call |
| Conversation ID | You manage it | Automatically managed |
| UI Visibility | Configurable | Hidden by default |
| Use Case | Multi-turn conversations | Quick queries |
| Complexity | Higher | Lower |
Project not ready
Response takes too long
API key authentication. Get your key from potpie settings page
The project ID to query about
Whether to hide this conversation from the web UI