---
type: api
title: Update a conversation
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-updateconversation
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-updateconversation
products:
  - Kibana
---

# Update a conversation

- Server: `https://{kibana_url}`

## Paths

- `PUT` `/api/security_ai_assistant/current_user/conversations/{id}`
- `PUT` `/s/{space_id}/api/security_ai_assistant/current_user/conversations/{id}`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v8/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v8/authentication#basicauth)

#### Path Parameters

- `id` (string · min: 1)
  The conversation's `id` value.

## Description

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

Update an existing conversation using the conversation ID. This endpoint allows users to modify the details of an existing conversation.

## Request Body

`application/json`

- `apiConfig` ({}) — optional
  - `actionTypeId` (string) — required
    Action type ID
  - `connectorId` (string) — required
    Connector ID
  - `defaultSystemPromptId` (string) — optional
    Default system prompt ID
  - `model` (string) — optional
    Model
  - `provider` (enum) — optional
    Provider
    Values: `OpenAI`, `Azure OpenAI`, `Other`
- `category` (enum) — optional
  The conversation category.
  Values: `assistant`, `insights`
- `excludeFromLastConversationStorage` (boolean) — optional
  Exclude from last conversation storage.
- `id` (string · min: 1) — required
  A string that does not contain only whitespace characters.
- `messages` ([] object) — optional
  The conversation messages.
  - `content` (string) — required
    Message content.
  - `isError` (boolean) — optional
    Is error message.
  - `metadata` ({}) — optional
    Message metadata
    - `contentReferences` (object) — optional
      A union of all content reference types
  - `reader` (object) — optional
  - `refusal` (string) — optional
    Refusal reason returned by the model when content is filtered.
  - `role` (enum) — required
    Message role.
    Values: `system`, `user`, `assistant`
  - `timestamp` (string · min: 1) — required
    A string that represents a timestamp in ISO 8601 format and does not contain only whitespace characters.
  - `traceData` ({}) — optional
    Trace Data
    - `traceId` (string) — optional
      Could be any string, not necessarily a UUID
    - `transactionId` (string) — optional
      Could be any string, not necessarily a UUID
- `replacements` (object) — optional
  Replacements object used to anonymize/deanonymize messages
- `summary` ({}) — optional
  - `confidence` (enum) — optional
    The conversation confidence.
    Values: `low`, `medium`, `high`
  - `content` (string) — optional
    Summary text of the conversation over time.
  - `public` (boolean) — optional
    Define if summary is marked as publicly available.
  - `timestamp` (string · min: 1) — optional
    A string that represents a timestamp in ISO 8601 format and does not contain only whitespace characters.
- `title` (string) — optional
  The conversation title.

## Responses

#### `200`

Indicates a successful call. The conversation was updated successfully.

`application/json`

- `apiConfig` ({})
  - `actionTypeId` (string)
    Action type ID
  - `connectorId` (string)
    Connector ID
  - `defaultSystemPromptId` (string)
    Default system prompt ID
  - `model` (string)
    Model
  - `provider` (enum)
    Provider
    Values: `OpenAI`, `Azure OpenAI`, `Other`
- `category` (enum)
  The conversation category.
  Values: `assistant`, `insights`
- `createdAt` (string)
  The time conversation was created.
- `excludeFromLastConversationStorage` (boolean)
  Exclude from last conversation storage.
- `id` (string · min: 1)
  A string that does not contain only whitespace characters.
- `messages` ([] object)
  The conversation messages.
  Same fields as `messages`
- `namespace` (string)
  Kibana space
- `replacements` (object)
  Replacements object used to anonymize/deanonymize messages
- `summary` ({})
  - `confidence` (enum)
    The conversation confidence.
    Values: `low`, `medium`, `high`
  - `content` (string)
    Summary text of the conversation over time.
  - `public` (boolean)
    Define if summary is marked as publicly available.
  - `timestamp` (string · min: 1)
    A string that represents a timestamp in ISO 8601 format and does not contain only whitespace characters.
- `timestamp` (string · min: 1)
  A string that represents a timestamp in ISO 8601 format and does not contain only whitespace characters.
- `title` (string)
  The conversation title.
- `updatedAt` (string)
  The last time conversation was updated.
- `users` ([] object)
  - `id` (string)
    User id.
  - `name` (string)
    User name.
#### `400`

Generic Error. This response indicates an issue with the request, such as missing required parameters or incorrect data.

`application/json`

- `error` (string)
- `message` (string)
- `statusCode` (number)
## Code Examples

#### Console

```console
PUT /api/security_ai_assistant/current_user/conversations/{id}
```

#### curl

```curl
curl -X PUT "https://{kibana_url}/api/security_ai_assistant/current_user/conversations/{id}"
```

## Response Examples

#### 200

```json
{
  "apiConfig": {
    "actionTypeId": "09876",
    "connectorId": "54321"
  },
  "category": "insights",
  "createdAt": "2023-10-31T12:01:00Z",
  "excludeFromLastConversationStorage": true,
  "id": "abc123",
  "messages": [
    {
      "content": "The issue was resolved.",
      "role": "assistant",
      "timestamp": "2023-10-31T12:30:00Z"
    }
  ],
  "replacements": {},
  "title": "Updated Security Discussion",
  "updatedAt": "2023-10-31T12:31:00Z",
  "users": [
    {
      "id": "user1",
      "name": "John Doe"
    }
  ]
}
```

