Create Conversation
Create a new conversation with AI agents. Conversations maintain context across multiple messages and allow for interactive discussions about your codebase.
Use Cases
- Start a new debugging session
- Begin a code review conversation
- Ask questions about specific parts of your codebase
- Generate test plans for a feature
- Request code changes or improvements
Authentication
This endpoint requires API key authentication via thex-api-key header.
Request & Response
Request & Response
| Location | Field | Type | Required | Default | Description |
|---|---|---|---|---|---|
| Query | hidden | boolean | optional | true | Controls visibility in the web UI. Set to false to show the conversation in your dashboard. |
| Body | project_ids | array[string] | required | - | List of project UUIDs to include in the conversation context |
| Body | agent_ids | array[string] | required | - | List of agent identifiers to enable (e.g., ["codebase_qna_agent"]) |
| Response | message | string | - | - | Confirmation message indicating successful creation |
| Response | conversation_id | string | - | - | Unique identifier for the conversation. Use this ID to send messages. |
Complete Workflow
Error Responses
401 Unauthorized
401 Unauthorized
402 Payment Required
402 Payment Required
- You have reached the maximum number of conversations for your current plan
- Your subscription has expired
- Usage limits have been exceeded
- Upgrade your subscription plan to increase limits
- Delete unused conversations to free up capacity
- Contact support to review your usage limits
500 Internal Server Error
500 Internal Server Error
- Database connection failures
- Invalid project or agent IDs
- Service unavailability
Troubleshooting
Empty response or missing conversation_id
Empty response or missing conversation_id
conversation_id.Solution:- Check the HTTP status code (should be 200 for success)
- Verify the response body is valid JSON
- Ensure all required fields are included in the request
- Check server logs if you have access
Invalid project_ids or agent_ids
Invalid project_ids or agent_ids
- Verify project IDs are valid UUIDs from successful parse operations
- Use the List Projects endpoint to confirm project IDs
- Use the List Available Agents endpoint to get valid agent IDs
- Ensure at least one project and one agent are specified
Authorizations
API key authentication. Get your key from potpie settings page
Query Parameters
Whether to hide this conversation from the web UI
Body
User identifier. The server uses the authenticated user ID from the API key.
Name for the conversation. Pass "Untitled" to auto-generate a name from the project.
Initial conversation status. Use "active" for a standard new conversation.
active, archived, deleted List of project IDs to include in the conversation
List of agent IDs to use in the conversation

