---
title: "Create conversation"
method: POST
path: "/api/agent_builder/conversations"
tags: ["agent builder"]
---

# Create conversation

`POST /api/agent_builder/conversations`

**Spaces method and path for this operation:**

<div><span class="operation-verb post">post</span>&nbsp;<span class="operation-path">/s/{space_id}/api/agent_builder/conversations</span></div>

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Create an empty conversation without sending a message. Returns the created conversation immediately. Use this to obtain a conversation ID before starting a chat session. To learn more about agent conversations, refer to the [agent chat documentation](https://www.elastic.co/docs/explore-analyze/ai-features/agent-builder/chat).<br/><br/>[Required authorization] Route required privileges: agentBuilder:read.

## Headers

- `kbn-xsrf` string, required

## Request body

- object
  - `access_control` object — Optional access control settings. Defaults to private.
    - `access_mode` 'private' | 'public', required — Access-control mode: `private` (only the owner and the listed members can read and continue the conversation), `public` (any user with access to the conversation's agent can read and continue it).
    - `entries` object[] — Members to share the conversation with. The list replaces the stored one; submit an empty list to unshare. Entries naming the owner are ignored. Must be empty when `access_mode` is `public`; repeated ids are rejected.
      - `id` string, required — Stable identifier of the user to share the conversation with: a Kibana user profile uid. Users without a profile cannot be granted access.
      - `role` 'member', required — Role granted to the principal. `member` is the only role: it grants read and converse access to the conversation.
      - `type` 'user', required
  - `agent_id` string — The ID of the agent to associate with the conversation. Defaults to the default Elastic AI agent.
  - `conversation_id` string — Optional client-supplied UUID for the conversation. Server-generated if omitted.
  - `title` string — Title for the conversation. Defaults to "New conversation".

## Response `200`

Indicates a successful response

---

[API](https://skmtc.net/elastic/apis/kibana-apis.md) · [All operations](https://skmtc.net/elastic/apis/kibana-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/kibana-apis/revisions/cb1b8cff3a4d/schema)
