---
title: "Each course's project: the one already linked, or the student's likely existing project for it"
method: POST
path: "/integration/canvas/import-preview"
tags: ["canvas-import"]
---

# Each course's project: the one already linked, or the student's likely existing project for it

`POST /integration/canvas/import-preview`

## Request

- Base URL: `https://api.focusbear.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.focusbear.io/integration/canvas/import-preview`
- Auth: HTTP bearer

## Request body

- CanvasImportPreviewDto
  - `courses` CanvasCourseInputDto[], required
    - `course_id` string, required: Canvas's course id (from `/courses/<id>` in the event link), or whatever named the course.
    - `name` string, required: The name the course's project gets: its code ("COMP1010") or Canvas's category.
  - `feed_host` string, required: The school's Canvas host, e.g. `school.instructure.com`.

## Response `200`

- CanvasImportPreviewResponseDto
  - `courses` CanvasCoursePreviewDto[], required
    - `course_id` string, required
    - `name` string, required
    - `linked_project` CanvasProjectRefDto
      - `id` string, required
      - `name` string, required
    - `suggestion` CanvasCourseMatchDto
      - `project_id` string, required
      - `project_name` string, required
      - `confidence` number, required
      - `reason` 'exact' | 'same_code' | 'same_name' | 'similar_name', required
    - `default_action` 'use_linked' | 'use_existing' | 'create' | 'skip_deleted', required

---

[API](https://skmtc.dev/focusbear/apis/focusbear-api.md) - [All operations](https://skmtc.dev/focusbear/apis/focusbear-api/llms.txt) - [OpenAPI document](https://skmtc.dev/focusbear/apis/focusbear-api/revisions/3a83a3b9a811?raw)
