Create conversation

Base URL
https://{kibana_url}
  • POST /api/agent_builder/conversations
  • POST /s/{space_id}/api/agent_builder/conversations
Auth

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.

Required authorization

Privileges agentBuilder:read

Path parameters

space_id string optional

An identifier for the space. If space_id is not provided in the URL, the default space is used. Refer to Spaces for more information.

Header parameters

kbn-xsrf string required

A required header to protect against CSRF attacks

Request body

access_control object

Optional access control settings. Defaults to private.

access_mode enum 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).

Values: private public
entries object[] · max items: 100

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 · min length: 1 · max length: 1024 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 enum required

Role granted to the principal. member is the only role: it grants read and converse access to the conversation.

Values: member
type enum required
Values: user
agent_id string · max length: 64

The ID of the agent to associate with the conversation. Defaults to the default Elastic AI agent.

conversation_id string · max length: 256

Optional client-supplied UUID for the conversation. Server-generated if omitted.

metadata map string to string | number | boolean | string[]

Initial metadata values. Each key must be declared by the referenced template; each value is validated against the field definition (type, options, min/max, regex, max_length). Requires template_id.

template_id string · min length: 1 · max length: 256

Optional ID of a conversation template to apply. When set, the template seeds default metadata and any caller-supplied metadata is validated against the template field definitions.

title string · max length: 500

Title for the conversation. Defaults to "New conversation".

Response

200

Indicates a successful response

application/json
Base URL
https://{kibana_url}