Skip to content
REST API

Update a subject

PATCH
/subjects/{subjectId}

Changes only the fields you send. archived and any name, teachers or period change are checked and written together, against the subject's final state.

Required scopes: subjects:update

Authorization

AuthorizationBearer <token>

In: header

Path Parameters

subjectId*string

Subject id, scoped to the key's user.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Send only the fields to change. An omitted field stays as it is.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/subjects/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
{  "data": {    "id": "5f0c1d2e-3a4b-4c5d-8e6f-7a8b9c0d1e2f",    "name": "Chemistry",    "teachers": [      "Dr. Curie"    ],    "period": "Year 12",    "archived": false  }}