> For the complete documentation index, see [llms.txt](https://developerdocs.instructure.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developerdocs.instructure.com/services/canvas/resources/ai_conversations.md).

# AI Conversations

API for managing conversations with AI Experiences.

## [Show conversation](#method.ai_conversations.show) <a href="#method.ai_conversations.show" id="method.ai_conversations.show"></a>

[AiConversationsController#show](https://github.com/instructure/canvas-lms/blob/master/app/controllers/ai_conversations_controller.rb)

#### `GET /api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id`

**Scope:** `url:GET|/api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id`

Get a specific conversation by ID (for teachers viewing student conversations)

## [Get active conversation](#method.ai_conversations.active_conversation) <a href="#method.ai_conversations.active_conversation" id="method.ai_conversations.active_conversation"></a>

[AiConversationsController#active\_conversation](https://github.com/instructure/canvas-lms/blob/master/app/controllers/ai_conversations_controller.rb)

#### `GET /api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations`

**Scope:** `url:GET|/api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations`

Get the active conversation for the current user and AI experience

## [Create AI conversation](#method.ai_conversations.create) <a href="#method.ai_conversations.create" id="method.ai_conversations.create"></a>

[AiConversationsController#create](https://github.com/instructure/canvas-lms/blob/master/app/controllers/ai_conversations_controller.rb)

#### `POST /api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations`

**Scope:** `url:POST|/api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations`

Initialize a new conversation with the AI experience

## [Post message to conversation](#method.ai_conversations.post_message) <a href="#method.ai_conversations.post_message" id="method.ai_conversations.post_message"></a>

[AiConversationsController#post\_message](https://github.com/instructure/canvas-lms/blob/master/app/controllers/ai_conversations_controller.rb)

#### `POST /api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id/messages`

**Scope:** `url:POST|/api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id/messages`

Send a message to an existing conversation and get the AI response

#### Request Parameters:

| Parameter | Type              | Description                          |
| --------- | ----------------- | ------------------------------------ |
| `message` | Required `string` | The user's message to send to the AI |

## [Delete AI conversation](#method.ai_conversations.destroy) <a href="#method.ai_conversations.destroy" id="method.ai_conversations.destroy"></a>

[AiConversationsController#destroy](https://github.com/instructure/canvas-lms/blob/master/app/controllers/ai_conversations_controller.rb)

#### `DELETE /api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id`

**Scope:** `url:DELETE|/api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id`

End the current conversation session

## [Get conversation evaluation](#method.ai_conversations.evaluation) <a href="#method.ai_conversations.evaluation" id="method.ai_conversations.evaluation"></a>

[AiConversationsController#evaluation](https://github.com/instructure/canvas-lms/blob/master/app/controllers/ai_conversations_controller.rb)

#### `GET /api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id/evaluation`

**Scope:** `url:GET|/api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id/evaluation`

Fetch evaluation data for a conversation from the llm-conversation service

## [Create feedback on a conversation message](#method.ai_conversations.create_feedback) <a href="#method.ai_conversations.create_feedback" id="method.ai_conversations.create_feedback"></a>

[AiConversationsController#create\_feedback](https://github.com/instructure/canvas-lms/blob/master/app/controllers/ai_conversations_controller.rb)

#### `POST /api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id/messages/:message_id/feedback`

**Scope:** `url:POST|/api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id/messages/:message_id/feedback`

Submit a like or dislike vote on an AI-generated message.

Ownership: load\_conversation gates this action — only the conversation owner or a course manager reaches here. Sub-resource (message\_id within the conversation) scoping is delegated to llma.

#### Request Parameters:

| Parameter          | Type              | Description                   |
| ------------------ | ----------------- | ----------------------------- |
| `vote`             | Required `string` | "liked" or "disliked"         |
| `message_id`       | Required `string` | llm-conversation message UUID |
| `feedback_message` | `string`          | optional text for dislike     |

## [Delete feedback on a conversation message](#method.ai_conversations.delete_feedback) <a href="#method.ai_conversations.delete_feedback" id="method.ai_conversations.delete_feedback"></a>

[AiConversationsController#delete\_feedback](https://github.com/instructure/canvas-lms/blob/master/app/controllers/ai_conversations_controller.rb)

#### `DELETE /api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id/messages/:message_id/feedback/:feedback_id`

**Scope:** `url:DELETE|/api/v1/courses/:course_id/ai_experiences/:ai_experience_id/conversations/:id/messages/:message_id/feedback/:feedback_id`

Remove a previously submitted vote (toggling off like/dislike).

Ownership: load\_conversation gates this action — only the conversation owner or a course manager reaches here. Sub-resource (message\_id, feedback\_id within the conversation) scoping is delegated to llma.

***

This documentation is generated directly from the Canvas LMS source code, available [on Github](https://github.com/instructure/canvas-lms).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developerdocs.instructure.com/services/canvas/resources/ai_conversations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
