> 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/peer_reviews.md).

# Peer Reviews

#### A PeerReview object looks like: <a href="#peerreview" id="peerreview"></a>

```js
{
  // The assessors user id
  "assessor_id": 23,
  // The id for the asset associated with this Peer Review
  "asset_id": 13,
  // The type of the asset
  "asset_type": "Submission",
  // The id of the Peer Review
  "id": 1,
  // The user id for the owner of the asset
  "user_id": 7,
  // The state of the Peer Review, either 'assigned' or 'completed'
  "workflow_state": "assigned",
  // the User object for the owner of the asset if the user include parameter is
  // provided (see user API) (optional)
  "user": "User",
  // The User object for the assessor if the user include parameter is provided
  // (see user API) (optional)
  "assessor": "User",
  // The submission comments associated with this Peer Review if the
  // submission_comment include parameter is provided (see submissions API)
  // (optional)
  "submission_comments": "SubmissionComment"
}
```

## [Get all Peer Reviews](#method.peer_reviews_api.index) <a href="#method.peer_reviews_api.index" id="method.peer_reviews_api.index"></a>

[PeerReviewsApiController#index](https://github.com/instructure/canvas-lms/blob/master/app/controllers/peer_reviews_api_controller.rb)

#### `GET /api/v1/courses/:course_id/assignments/:assignment_id/peer_reviews`

**Scope:** `url:GET|/api/v1/courses/:course_id/assignments/:assignment_id/peer_reviews`

#### `GET /api/v1/sections/:section_id/assignments/:assignment_id/peer_reviews`

**Scope:** `url:GET|/api/v1/sections/:section_id/assignments/:assignment_id/peer_reviews`

#### `GET /api/v1/courses/:course_id/assignments/:assignment_id/submissions/:submission_id/peer_reviews`

**Scope:** `url:GET|/api/v1/courses/:course_id/assignments/:assignment_id/submissions/:submission_id/peer_reviews`

#### `GET /api/v1/sections/:section_id/assignments/:assignment_id/submissions/:submission_id/peer_reviews`

**Scope:** `url:GET|/api/v1/sections/:section_id/assignments/:assignment_id/submissions/:submission_id/peer_reviews`

Get a list of all Peer Reviews for this assignment

#### Request Parameters:

| Parameter   | Type     | Description                                                                                 |
| ----------- | -------- | ------------------------------------------------------------------------------------------- |
| `include[]` | `string` | Associations to include with the peer review. Allowed values: `submission_comments`, `user` |

Returns a list of [PeerReview](#peerreview) objects.

## [Create Peer Review](#method.peer_reviews_api.create) <a href="#method.peer_reviews_api.create" id="method.peer_reviews_api.create"></a>

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

#### `POST /api/v1/courses/:course_id/assignments/:assignment_id/submissions/:submission_id/peer_reviews`

**Scope:** `url:POST|/api/v1/courses/:course_id/assignments/:assignment_id/submissions/:submission_id/peer_reviews`

#### `POST /api/v1/sections/:section_id/assignments/:assignment_id/submissions/:submission_id/peer_reviews`

**Scope:** `url:POST|/api/v1/sections/:section_id/assignments/:assignment_id/submissions/:submission_id/peer_reviews`

Create a peer review for the assignment

#### Request Parameters:

| Parameter | Type               | Description                                       |
| --------- | ------------------ | ------------------------------------------------- |
| `user_id` | Required `integer` | user\_id to assign as reviewer on this assignment |

Returns a [PeerReview](#peerreview) object.

## [Delete Peer Review](#method.peer_reviews_api.destroy) <a href="#method.peer_reviews_api.destroy" id="method.peer_reviews_api.destroy"></a>

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

#### `DELETE /api/v1/courses/:course_id/assignments/:assignment_id/submissions/:submission_id/peer_reviews`

**Scope:** `url:DELETE|/api/v1/courses/:course_id/assignments/:assignment_id/submissions/:submission_id/peer_reviews`

#### `DELETE /api/v1/sections/:section_id/assignments/:assignment_id/submissions/:submission_id/peer_reviews`

**Scope:** `url:DELETE|/api/v1/sections/:section_id/assignments/:assignment_id/submissions/:submission_id/peer_reviews`

Delete a peer review for the assignment

#### Request Parameters:

| Parameter | Type               | Description                                       |
| --------- | ------------------ | ------------------------------------------------- |
| `user_id` | Required `integer` | user\_id to delete as reviewer on this assignment |

Returns a [PeerReview](#peerreview) object.

## [Allocate Peer Review](#method.peer_reviews_api.allocate) <a href="#method.peer_reviews_api.allocate" id="method.peer_reviews_api.allocate"></a>

[PeerReviewsApiController#allocate](https://github.com/instructure/canvas-lms/blob/master/app/controllers/peer_reviews_api_controller.rb)

#### `POST /api/v1/courses/:course_id/assignments/:assignment_id/allocate`

**Scope:** `url:POST|/api/v1/courses/:course_id/assignments/:assignment_id/allocate`

Allocates a submission for the current user to peer review

Returns a [PeerReview](#peerreview) object.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developerdocs.instructure.com/services/canvas/resources/peer_reviews.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
