> For the complete documentation index, see [llms.txt](https://docs.ibexa.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ibexa.ai/developers/rest-api/conversations/create-conversation.md).

# Create Conversation

Create a new (empty) conversation for an agent.

Users can only create conversations for agents within their organisation. No message is sent here — send the first message (optionally with attached files) via `POST /conversations/{id}/messages`.

```json
{"openapi":"3.1.0","info":{"title":"Ibexa Agentic Marketing Platform","version":"0.1.0"},"security":[{"OAuth2PasswordBearer":[]}],"components":{"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/v1/login/access-token"}}}},"schemas":{"CreateConversationPayloadSchema":{"properties":{"agent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Id","description":"ID of the agent for this conversation. Defaults to the organisation's default assistant agent when omitted."},"subject":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Subject","description":"Optional subject"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context","description":"Optional context the assistant works within, as a free-form mapping (e.g. {\"report_id\": 67})."}},"type":"object","title":"CreateConversationPayloadSchema","description":"Pydantic schema for creating a conversation shell.\n\nCreation no longer sends the first message — create the conversation, then\nsend messages via ``POST /conversations/{id}/messages``.\n\n``agent_id`` is optional.  When omitted (or explicitly ``null``) the service\nfalls back to the organisation's default assistant agent.  If no default is\nconfigured a ``400 Bad Request`` is returned."},"ConversationResponseSchema":{"properties":{"id":{"type":"integer","title":"Id"},"agent_id":{"type":"integer","title":"Agent Id"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"feedback_rate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Feedback Rate"},"parent_conversation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Conversation Id","description":"ID of the parent conversation when this is a sub-agent conversation, otherwise null."}},"type":"object","required":["id","agent_id","created_by"],"title":"ConversationResponseSchema","description":"Pydantic schema for conversation response."}}},"paths":{"/api/v1/conversations/":{"post":{"tags":["conversations","public"],"summary":"Create Conversation","description":"Create a new (empty) conversation for an agent.\n\nUsers can only create conversations for agents within their organisation.\nNo message is sent here — send the first message (optionally with attached\nfiles) via ``POST /conversations/{id}/messages``.","operationId":"conversations-create_conversation","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConversationPayloadSchema"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationResponseSchema"}}}},"400":{"description":"Invalid request payload or parameters","content":{"application/json":{}}},"401":{"description":"User not authenticated","content":{"application/json":{}}},"403":{"description":"User lacks permission","content":{"application/json":{}}},"404":{"description":"Resource not found or user has no permission to access it","content":{"application/json":{}}}}}}}}
```
