> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hyperleap.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Conversations Overview

> Overview of the Conversations API endpoints

The Conversations API allows you to create and manage AI conversations. You can create general or persona conversations, continue existing conversations, and manage conversation metadata.

## Available Endpoints

## Creating Conversations

#### [Create a General Conversation](/api-reference/conversations/create-a-general-conversation)

Create a new general conversation with a specified AI system and model.

```
POST /conversations
```

**Basic Request Format:**

```json theme={null}
{
  "system": "string",
  "model": "string",
  "externalUserId": "string"
}
```

#### [Create a Persona Conversation](/api-reference/conversations/create-a-persona-conversation)

Create a new conversation with a specific persona, which has predefined characteristics and behavior.

```
POST /conversations/persona
```

**Basic Request Format:**

```json theme={null}
{
  "personaId": "string",
  "externalUserId": "string"
}
```

<Tip>
  When creating a conversation, store the `conversationId` from the response.
  You'll need this ID for continuing the conversation and managing its metadata
  in subsequent API calls.
</Tip>

### Continuing Conversations

#### [Continue Chat (Non-streaming)](/api-reference/conversations/continue-chat)

Continue an existing conversation and get the complete response in a single API call.

```
POST /conversations/{conversationId}/continue
```

#### [Continue Chat (HTTP/2 Streaming)](/api-reference/conversations/continue-http2-streaming)

Continue an existing conversation and stream the response using HTTP/2 protocol.

```
POST /conversations/{conversationId}/continue-stream
```

**Basic Request Format:**

```json theme={null}
{
  "message": "string"
}
```

#### [Continue Chat (SSE Streaming)](/api-reference/conversations/continue-sse-streaming)

Continue an existing conversation and stream the response using Server-Sent Events (SSE) protocol.

```
POST /conversations/{conversationId}/continue-sse
```

**Basic Request Format:**

```json theme={null}
{
  "message": "string"
}
```

### Retrieving Conversations

#### [Get All Conversations](/api-reference/conversations/get-all-conversations)

Retrieve all conversations for the organization.

```
GET /conversations
```

#### [Get User Conversations](/api-reference/conversations/get-user-conversations)

Retrieve all conversations for the current user.

```
GET /conversations/user/{externalUserId}
```

#### [Get All Conversations with a Persona](/api-reference/conversations/get-all-conversations-with-a-persona)

Retrieve all conversations with a specific persona.

```
GET /conversations/persona/{personaId}
```

#### [Get Specific Conversation](/api-reference/conversations/get-specific-conversation)

Retrieve a specific conversation by ID.

```
GET /conversations/{conversationId}
```

### Managing Conversations

#### [Set Conversation as Active](/api-reference/conversations/set-conversation-as-active)

Mark a conversation as active.

```
PATCH /conversations/{conversationId}/set-active
```

#### [Set Conversation's Metadata](/api-reference/conversations/set-conversations-metadata)

Update the metadata for a conversation.

```
PATCH /conversations/{conversationId}/set-metadata
```

#### [Set Conversation's Name](/api-reference/conversations/set-conversations-name)

Update the name of a conversation.

```
PATCH /conversations/{conversationId}/set-conversation-name
```

#### [Set Conversation's Status](/api-reference/conversations/set-conversations-status)

Update the status of a conversation.

```
PATCH /conversations/{conversationId}/set-conversation-status
```

<RequestExample>
  ```js ENDPOINTS theme={null}
  // Creating Conversations
  POST / conversations;
  POST / conversations / persona;

  // Continuing Conversations
  PATCH / conversations / { conversationId } / chat;
  PATCH / conversations / { conversationId } / chat - http2;
  PATCH / conversations / { conversationId } / chat - sse;

  // Retrieving Conversations
  GET / conversations;
  GET / conversations / user / { externalUserId };
  GET / conversations / persona / { personaId };
  GET / conversations / { conversationId };

  // Managing Conversations
  PATCH / conversations / { conversationId } / set - active;
  PATCH / conversations / { conversationId } / set - metadata;
  PATCH / conversations / { conversationId } / set - conversation - name;
  PATCH / conversations / { conversationId } / set - conversation - status;
  ```
</RequestExample>
