# Conversations

> SDK methods for the Conversations module, accessed via `soat.conversations`. See the [Conversations module docs](/docs/modules/conversations) for permissions and data model, and each method's REST page for the full request/response schema.

# Conversations

SDK methods for the Conversations module, accessed via `soat.conversations`. See the [Conversations module docs](/docs/modules/conversations) for permissions and data model, and each method's REST page for the full request/response schema.

### `soat.conversations.listConversations()`

List conversations

- Method: `GET`
- Path: `/api/v1/conversations`

```ts
await soat.conversations.listConversations({
  query: { /* + optional */ },
});
```

→ [Request & response schema](/docs/api/conversations/list-conversations)

### `soat.conversations.createConversation()`

Create a conversation

- Method: `POST`
- Path: `/api/v1/conversations`

```ts
await soat.conversations.createConversation({
  body: { /* + optional */ },
});
```

→ [Request & response schema](/docs/api/conversations/create-conversation)

### `soat.conversations.getConversation()`

Get a conversation by ID

- Method: `GET`
- Path: `/api/v1/conversations/{conversation_id}`

```ts
await soat.conversations.getConversation({
  path: { conversation_id },
});
```

→ [Request & response schema](/docs/api/conversations/get-conversation)

### `soat.conversations.updateConversation()`

Update a conversation

- Method: `PATCH`
- Path: `/api/v1/conversations/{conversation_id}`

```ts
await soat.conversations.updateConversation({
  path: { conversation_id },
  body: { /* + optional */ },
});
```

→ [Request & response schema](/docs/api/conversations/update-conversation)

### `soat.conversations.deleteConversation()`

Delete a conversation

- Method: `DELETE`
- Path: `/api/v1/conversations/{conversation_id}`

```ts
await soat.conversations.deleteConversation({
  path: { conversation_id },
});
```

→ [Request & response schema](/docs/api/conversations/delete-conversation)

### `soat.conversations.listConversationMessages()`

List conversation messages

- Method: `GET`
- Path: `/api/v1/conversations/{conversation_id}/messages`

```ts
await soat.conversations.listConversationMessages({
  path: { conversation_id },
  query: { /* + optional */ },
});
```

→ [Request & response schema](/docs/api/conversations/list-conversation-messages)

### `soat.conversations.addConversationMessage()`

Add a message to a conversation

- Method: `POST`
- Path: `/api/v1/conversations/{conversation_id}/messages`

```ts
await soat.conversations.addConversationMessage({
  path: { conversation_id },
  body: { message, role, /* + optional */ },
});
```

→ [Request & response schema](/docs/api/conversations/add-conversation-message)

### `soat.conversations.generateConversationMessage()`

Generate the next message in a conversation

- Method: `POST`
- Path: `/api/v1/conversations/{conversation_id}/generate`

```ts
await soat.conversations.generateConversationMessage({
  path: { conversation_id },
  query: { /* + optional */ },
  body: { agent_id, /* + optional */ },
});
```

→ [Request & response schema](/docs/api/conversations/generate-conversation-message)

### `soat.conversations.removeConversationMessage()`

Remove a message from a conversation

- Method: `DELETE`
- Path: `/api/v1/conversations/{conversation_id}/messages/{document_id}`

```ts
await soat.conversations.removeConversationMessage({
  path: { conversation_id, document_id },
});
```

→ [Request & response schema](/docs/api/conversations/remove-conversation-message)

### `soat.conversations.getConversationTags()`

Get conversation tags

- Method: `GET`
- Path: `/api/v1/conversations/{conversation_id}/tags`

```ts
await soat.conversations.getConversationTags({
  path: { conversation_id },
});
```

→ [Request & response schema](/docs/api/conversations/get-conversation-tags)

### `soat.conversations.replaceConversationTags()`

Replace conversation tags

- Method: `PUT`
- Path: `/api/v1/conversations/{conversation_id}/tags`

```ts
await soat.conversations.replaceConversationTags({
  path: { conversation_id },
  body,
});
```

→ [Request & response schema](/docs/api/conversations/replace-conversation-tags)

### `soat.conversations.mergeConversationTags()`

Merge conversation tags

- Method: `PATCH`
- Path: `/api/v1/conversations/{conversation_id}/tags`

```ts
await soat.conversations.mergeConversationTags({
  path: { conversation_id },
  body,
});
```

→ [Request & response schema](/docs/api/conversations/merge-conversation-tags)
