Assignment Webhooks
Detailed information about assignment and submission webhook events including assignment.created, assignment.updated, submission.submitted, submission.returned and submission.completed.
assignment.created
The assignment.created event is triggered when a teacher creates a new assignment in a course.
Event Properties
| Property | Type | Description |
|---|---|---|
| id | string | Unique identifier for the assignment (UUID) |
| name | string | Name of the assignment |
| description | string | Description of the assignment |
| published | boolean | Indicates whether the assignment is published |
| due_at | string | Due date of the assignment (may be absent) |
| created_at | string | Timestamp when the assignment was created |
| updated_at | string | Timestamp when the assignment was last updated |
| course | object | The course this assignment belongs to (id, name, slug) |
Example Payload
All timestamps are in ISO 8601 format and include a timezone offset (e.g. +08:00). Properties with empty values are omitted from the payload.
{
"type": "assignment.created",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Week 1 Homework",
"description": "Complete the exercises from chapter 1.",
"published": true,
"due_at": "2024-03-28T13:45:30+08:00",
"created_at": "2024-03-21T13:45:30+08:00",
"updated_at": "2024-03-21T13:45:30+08:00",
"course": {
"id": "660e8400-e29b-41d4-a716-446655440111",
"name": "Introduction to Programming",
"slug": "intro-to-programming"
}
}
}assignment.updated
The assignment.updated event is triggered when an existing assignment is modified. The payload shape is identical to assignment.created.
{
"type": "assignment.updated",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Week 1 Homework (extended deadline)",
"description": "Complete the exercises from chapter 1.",
"published": true,
"due_at": "2024-04-04T13:45:30+08:00",
"created_at": "2024-03-21T13:45:30+08:00",
"updated_at": "2024-03-25T09:00:00+08:00",
"course": {
"id": "660e8400-e29b-41d4-a716-446655440111",
"name": "Introduction to Programming",
"slug": "intro-to-programming"
}
}
}submission.submitted
The submission.submitted event is triggered when a student submits their work for an assignment.
A submission that was returned by the teacher can be re-submitted, so you may receive multiple submission.submitted events for the same submission id. Use submitted_at to distinguish attempts.
A teacher can also undo a returned or completed grading action, which moves the submission back to the submitted state without emitting a webhook event. If your integration mirrors submission states, treat the event stream as eventually consistent and reconcile periodically via the Admin API.
Submission events are delivered asynchronously with independent retries, so they may arrive out of order, and the data payload reflects the submission at delivery time — data.state can differ from the event type if the submission changed in between. Treat data.state and the timestamps (submitted_at, checked_at, updated_at) as authoritative rather than the arrival order.
Event Properties
| Property | Type | Description |
|---|---|---|
| id | string | Unique identifier for the submission (UUID) |
| state | string | Current state of the submission (submitted) |
| title | string | Title of the submission |
| content | string | Text content of the submission |
| submitted_at | string | Timestamp when the student submitted |
| checked_at | string | Timestamp when grading was completed (absent until completed) |
| created_at | string | Timestamp when the submission was created |
| updated_at | string | Timestamp when the submission was last updated |
| assignment | object | The assignment being submitted to (id, name, course_id) |
| student | object | The submitting student (id, name, email) |
Example Payload
{
"type": "submission.submitted",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"state": "submitted",
"title": "My Week 1 Homework",
"content": "Here is my answer to the exercises...",
"submitted_at": "2024-03-22T10:30:00+08:00",
"created_at": "2024-03-22T10:29:00+08:00",
"updated_at": "2024-03-22T10:30:00+08:00",
"assignment": {
"id": "660e8400-e29b-41d4-a716-446655440111",
"name": "Week 1 Homework",
"course_id": "770e8400-e29b-41d4-a716-446655440222"
},
"student": {
"id": "880e8400-e29b-41d4-a716-446655440333",
"name": "Test Student",
"email": "student@example.com"
}
}
}submission.returned
The submission.returned event is triggered when a teacher returns a submission to the student for revision. In addition to all submission.submitted properties, the payload may include the current rating.
Additional Properties
| Property | Type | Description |
|---|---|---|
| rate | object | The rating given by the teacher (score, comment); absent if not rated |
Example Payload
{
"type": "submission.returned",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"state": "returned",
"title": "My Week 1 Homework",
"content": "Here is my answer to the exercises...",
"submitted_at": "2024-03-22T10:30:00+08:00",
"created_at": "2024-03-22T10:29:00+08:00",
"updated_at": "2024-03-23T08:00:00+08:00",
"assignment": {
"id": "660e8400-e29b-41d4-a716-446655440111",
"name": "Week 1 Homework",
"course_id": "770e8400-e29b-41d4-a716-446655440222"
},
"student": {
"id": "880e8400-e29b-41d4-a716-446655440333",
"name": "Test Student",
"email": "student@example.com"
},
"rate": {
"score": 2.5,
"comment": "Please revise question 3 and resubmit."
}
}
}submission.completed
The submission.completed event is triggered when a teacher finishes grading a submission. In addition to all submission.submitted properties, the payload may include the rating and the grader.
Additional Properties
| Property | Type | Description |
|---|---|---|
| rate | object | The rating given by the teacher (score, comment); absent if not rated |
| grader | object | The teacher who graded the submission (id, name); absent if not graded |
Example Payload
{
"type": "submission.completed",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"state": "checked",
"title": "My Week 1 Homework",
"content": "Here is my answer to the exercises...",
"submitted_at": "2024-03-22T10:30:00+08:00",
"checked_at": "2024-03-24T15:00:00+08:00",
"created_at": "2024-03-22T10:29:00+08:00",
"updated_at": "2024-03-24T15:00:00+08:00",
"assignment": {
"id": "660e8400-e29b-41d4-a716-446655440111",
"name": "Week 1 Homework",
"course_id": "770e8400-e29b-41d4-a716-446655440222"
},
"student": {
"id": "880e8400-e29b-41d4-a716-446655440333",
"name": "Test Student",
"email": "student@example.com"
},
"rate": {
"score": 4.5,
"comment": "Great work!"
},
"grader": {
"id": "990e8400-e29b-41d4-a716-446655440444",
"name": "Test Teacher"
}
}
}