> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.canvas.assignments.CreateAssignment

- Component: `appmixer.canvas.assignments.CreateAssignment`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.canvas 1.1.4](https://connectors.appmixer.com/connector/appmixer.canvas/1.1.4.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.canvas/1.1.4/component/appmixer.canvas.assignments.CreateAssignment>

Create new assignment.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Course ID (`courseId`) | text | The course this assignment will belong to. |
| Assignment group ID (`assignmentGroupId`) | text | The assignment group id to put the assignment in. Defaults to the top assignment group in the course. |
| Name (`name`) | text | The name of the assignment. |
| Description (`description`) | textarea | The assignment's description, supports HTML. |
| Position (`position`) | number | The position of this assignment in the group when displaying assignment lists. |
| Submission types (`submissionTypes`) | multiselect | The allowed submission types for the assignment. |
| Due at (`dueAt`) | date-time | The due datetime for this assignment. Must be between the lock dates if there are lock dates. |
| Lock at (`lockAt`) | date-time | The day/time the assignment is locked after. Must be after the due date if there is a due date. |
| Unlock at (`unlockAt`) | date-time | The day/time the assignment is unlocked. Must be before the due date if there is a due date. |
| Allowed extensions (`allowedExtensions`) | text | Comma separated list of allowed file extensions - e.g. docx,ppt,pdf. Only used if online_upload is enabled. |
| Enable Turnitin (`turnitinEnabled`) | toggle | Only applies when the Turnitin plugin is enabled for a course and the submission_types array includes “online_upload”. Toggles Turnitin submissions for the assignment. Will be ignored if Turnitin is not available for the course. |
| Turnitin settings (`turnitinSettings`) | text | Settings to send along to turnitin. |
| Enable VeriCite (`vericiteEnabled`) | toggle | Only applies when the VeriCite plugin is enabled for a course and the submission_types array includes “online_upload”. Toggles VeriCite submissions for the assignment. Will be ignored if VeriCite is not available for the course. |
| Enable peer reviews (`peerReviews`) | toggle | If submission_types does not include external_tool,discussion_topic, online_quiz, or on_paper, determines whether or not peer reviews will be turned on for the assignment. |
| Automatically assign peer reviews (`autoPeerReviews`) | toggle | Whether peer reviews will be assigned automatically by Canvas or if teachers must manually assign peer reviews. Does not apply if peer reviews are not enabled. |
| Notify updates (`notifyUpdates`) | toggle | If true, Canvas will send a notification to students in the class notifying them that the content has changed. |
| Points possible (`pointsPossible`) | number | The maximum points possible on the assignment. |
| Grading type (`gradingType`) | select | The strategy used for grading the assignment. |
| Omit from final grade (`omitFromFinalGrade`) | toggle | Whether this assignment is counted towards a student's final grade. |
| Anonymous grading (`anonymousGrading`) | toggle | If true, graders cannot see student identities. |
| Allowed attempts (`allowedAttempts`) | number | The number of submission attempts allowed for this assignment. Set to -1 for unlimited attempts. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| `id` | integer | - |
| Created at (`created_at`) | string | - |
| Name (`name`) | string | - |
| Course ID (`course_id`) | integer | - |
| Submission Types (`submission_types`) | array | - |
| Description (`description`) | string,null | - |
| Due at (`due_at`) | string,null | - |
| Unlock at (`unlock_at`) | string,null | - |
| Lock at (`lock_at`) | string,null | - |
| Points possible (`points_possible`) | number,null | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.canvas.assignments.CreateAssignment",
  "author": "Camilo Manrique <camilo@client.io>",
  "description": "Create new assignment.",
  "auth": {
    "service": "appmixer:canvas"
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "courseId": {
            "type": "number"
          },
          "assignmentGroupId": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "position": {
            "type": "number"
          },
          "submissionTypes": {
            "type": [
              "array",
              "string"
            ]
          },
          "dueAt": {
            "type": "string"
          },
          "lockAt": {
            "type": "string"
          },
          "unlockAt": {
            "type": "string"
          },
          "allowedExtensions": {
            "type": "array"
          },
          "turnitinEnabled": {
            "type": "boolean"
          },
          "turnitinSettings": {
            "type": "string"
          },
          "vericiteEnabled": {
            "type": "boolean"
          },
          "peerReviews": {
            "type": "boolean"
          },
          "autoPeerReviews": {
            "type": "boolean"
          },
          "notifyUpdates": {
            "type": "boolean"
          },
          "pointsPossible": {
            "type": "number"
          },
          "gradingType": {
            "type": "string"
          },
          "omitFromFinalGrade": {
            "type": "boolean"
          },
          "anonymousGrading": {
            "type": "boolean"
          },
          "allowedAttempts": {
            "type": "number"
          }
        }
      },
      "inspector": {
        "inputs": {
          "courseId": {
            "type": "text",
            "index": 1,
            "label": "Course ID",
            "tooltip": "The course this assignment will belong to.",
            "source": {
              "url": "/component/appmixer/canvas/courses/ListCourses?outPort=out",
              "data": {
                "transform": "./ListCourses#toSelectArray"
              }
            }
          },
          "assignmentGroupId": {
            "type": "text",
            "index": 1,
            "label": "Assignment group ID",
            "tooltip": "The assignment group id to put the assignment in. Defaults to the top assignment group in the course.",
            "source": {
              "url": "/component/appmixer/canvas/courses/ListAssignmentGroups?outPort=out",
              "data": {
                "messages": {
                  "in/courseId": "inputs/in/courseId"
                },
                "transform": "./ListAssignmentGroups#toSelectArray"
              }
            }
          },
          "name": {
            "type": "text",
            "index": 2,
            "label": "Name",
            "tooltip": "The name of the assignment."
          },
          "description": {
            "type": "textarea",
            "index": 2,
            "label": "Description",
            "tooltip": "The assignment's description, supports HTML."
          },
          "position": {
            "type": "number",
            "index": 3,
            "label": "Position",
            "tooltip": "The position of this assignment in the group when displaying assignment lists."
          },
          "submissionTypes": {
            "type": "multiselect",
            "index": 4,
            "label": "Submission types",
            "tooltip": "The allowed submission types for the assignment.",
            "options": [
              {
                "label": "Online quiz",
                "value": "online_quiz"
              },
              {
                "label": "On paper",
                "value": "on_paper"
              },
              {
                "label": "Discussion topic",
                "value": "discussion_topic"
              },
              {
                "label": "External tool",
                "value": "external_tool"
              },
              {
                "label": "Online upload",
                "value": "online_upload"
              },
              {
                "label": "Online text entry",
                "value": "online_text_entry"
              },
              {
                "label": "Online url",
                "value": "online_url"
              },
              {
                "label": "Media recording",
                "value": "media_recording"
              },
              {
                "label": "Student annotation",
                "value": "student_annotation"
              }
            ]
          },
          "dueAt": {
            "type": "date-time",
            "index": 5,
            "label": "Due at",
            "tooltip": "The due datetime for this assignment. Must be between the lock dates if there are lock dates."
          },
          "lockAt": {
            "type": "date-time",
            "index": 5,
            "label": "Lock at",
            "tooltip": "The day/time the assignment is locked after. Must be after the due date if there is a due date."
          },
          "unlockAt": {
            "type": "date-time",
            "index": 5,
            "label": "Unlock at",
            "tooltip": "The day/time the assignment is unlocked. Must be before the due date if there is a due date."
          },
          "allowedExtensions": {
            "type": "text",
            "index": 5,
            "label": "Allowed extensions",
            "tooltip": "Comma separated list of allowed file extensions - e.g. docx,ppt,pdf. Only used if online_upload is enabled."
          },
          "turnitinEnabled": {
            "type": "toggle",
            "index": 6,
            "label": "Enable Turnitin",
            "defaultValue": false,
            "tooltip": "Only applies when the Turnitin plugin is enabled for a course and the submission_types array includes “online_upload”. Toggles Turnitin submissions for the assignment. Will be ignored if Turnitin is not available for the course."
          },
          "turnitinSettings": {
            "when": {
              "eq": {
                "./turnitinEnabled": true
              }
            },
            "type": "text",
            "index": 6,
            "label": "Turnitin settings",
            "tooltip": "Settings to send along to turnitin."
          },
          "vericiteEnabled": {
            "type": "toggle",
            "index": 7,
            "label": "Enable VeriCite",
            "defaultValue": false,
            "tooltip": "Only applies when the VeriCite plugin is enabled for a course and the submission_types array includes “online_upload”. Toggles VeriCite submissions for the assignment. Will be ignored if VeriCite is not available for the course."
          },
          "peerReviews": {
            "type": "toggle",
            "index": 7,
            "label": "Enable peer reviews",
            "defaultValue": false,
            "tooltip": "If submission_types does not include external_tool,discussion_topic, online_quiz, or on_paper, determines whether or not peer reviews will be turned on for the assignment."
          },
          "autoPeerReviews": {
            "when": {
              "eq": {
                "./peerReviews": true
              }
            },
            "type": "toggle",
            "index": 7,
            "label": "Automatically assign peer reviews",
            "defaultValue": false,
            "tooltip": "Whether peer reviews will be assigned automatically by Canvas or if teachers must manually assign peer reviews. Does not apply if peer reviews are not enabled."
          },
          "notifyUpdates": {
            "type": "toggle",
            "index": 7,
            "label": "Notify updates",
            "defaultValue": false,
            "tooltip": "If true, Canvas will send a notification to students in the class notifying them that the content has changed."
          },
          "pointsPossible": {
            "type": "number",
            "index": 8,
            "label": "Points possible",
            "tooltip": "The maximum points possible on the assignment."
          },
          "gradingType": {
            "type": "select",
            "index": 9,
            "label": "Grading type",
            "tooltip": "The strategy used for grading the assignment.",
            "defaultValue": "points",
            "options": [
              {
                "label": "Pass/Fail",
                "value": "pass_fail"
              },
              {
                "label": "Percent",
                "value": "percent"
              },
              {
                "label": "Letter grade",
                "value": "letter_grade"
              },
              {
                "label": "GPA Scale",
                "value": "gpa_scale"
              },
              {
                "label": "Points",
                "value": "points"
              },
              {
                "label": "Not Graded",
                "value": "not_graded"
              }
            ]
          },
          "omitFromFinalGrade": {
            "type": "toggle",
            "index": 7,
            "label": "Omit from final grade",
            "defaultValue": false,
            "tooltip": "Whether this assignment is counted towards a student's final grade."
          },
          "anonymousGrading": {
            "type": "toggle",
            "index": 7,
            "label": "Anonymous grading",
            "defaultValue": false,
            "tooltip": "If true, graders cannot see student identities."
          },
          "allowedAttempts": {
            "type": "number",
            "index": 7,
            "label": "Allowed attempts",
            "tooltip": "The number of submission attempts allowed for this assignment. Set to -1 for unlimited attempts."
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "options": [
        {
          "label": "id",
          "value": "id",
          "schema": {
            "type": "integer",
            "example": 5521
          }
        },
        {
          "label": "Created at",
          "value": "created_at",
          "schema": {
            "type": "string",
            "example": "2026-09-10T08:30:00Z"
          }
        },
        {
          "label": "Name",
          "value": "name",
          "schema": {
            "type": "string",
            "example": "Lab report 3"
          }
        },
        {
          "label": "Course ID",
          "value": "course_id",
          "schema": {
            "type": "integer",
            "example": 312
          }
        },
        {
          "label": "Submission Types",
          "value": "submission_types",
          "schema": {
            "type": "array",
            "example": [
              "online_upload"
            ]
          }
        },
        {
          "label": "Description",
          "value": "description",
          "schema": {
            "type": [
              "string",
              "null"
            ],
            "example": "<p>Upload your lab report as a PDF.</p>"
          }
        },
        {
          "label": "Due at",
          "value": "due_at",
          "schema": {
            "type": [
              "string",
              "null"
            ],
            "example": "2026-09-20T23:59:00Z"
          }
        },
        {
          "label": "Unlock at",
          "value": "unlock_at",
          "schema": {
            "type": [
              "string",
              "null"
            ],
            "example": null
          }
        },
        {
          "label": "Lock at",
          "value": "lock_at",
          "schema": {
            "type": [
              "string",
              "null"
            ],
            "example": null
          }
        },
        {
          "label": "Points possible",
          "value": "points_possible",
          "schema": {
            "type": [
              "number",
              "null"
            ],
            "example": 100
          }
        }
      ]
    }
  ],
  "icon": "(data URI omitted)"
}
```
