---
title: "Update assignment | Aggiorna elaborato"
method: PATCH
path: "/courses/{courseId}/assignments/{assignmentId}"
tags: ["Courses"]
---

# Update assignment | Aggiorna elaborato

`PATCH /courses/{courseId}/assignments/{assignmentId}`

## Request

- Base URL: `https://app.didattica.polito.it/api`
- URL: `https://app.didattica.polito.it/api/courses/{courseId}/assignments/{assignmentId}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/polito/apis/polito-faculty-api/docs/courses/:courseId/assignments/:assignmentId/patch.ts> (a function with typed inputs; its response is checked against the schema)

Withdraws the assignment if `deletedAt` is set to a date, restores it if `deletedAt` is `null`.

## Path parameters

- `courseId` integer, required
- `assignmentId` integer, required

## Request body

- UpdateAssignmentRequest
  - `deletedAt` string, date-time, nullable, required: Set to a date to withdraw the assignment, `null` to restore it

## Response `204`

There is no content to send for this request, but the headers may be useful.

## Other responses

- `400`: The server could not understand the request due to invalid syntax.
- `500`: Server error

## Changes

- **2026-09-28** `b7eb050dcc99`: 1 breaking, 2 warning
  - added the new required request property `deletedAt`
  - removed the request property `delivery`
  - removed the request property `state`

[Operation history](https://skmtc.dev/polito/apis/polito-faculty-api/changes/courses/:courseId/assignments/:assignmentId/patch.md)

---

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