Skip to main content
Use PATCH /v1/subjects/:id to modify an existing subject profile. Send only the fields you want to update — all other fields remain unchanged.

Endpoint

PATCH https://api.taketime.app/v1/subjects/:id

Path Parameters

id
string
required
The unique identifier of the subject you want to update.

Body Parameters

All body parameters are optional. Include only the fields you want to change.
name
string
Updated display name. Maximum 40 characters. Must be unique across your account.
color
string
Updated hex color code (e.g. #6366f1).
slots
array
A full replacement of the subject’s weekly slot schedule. The value you provide replaces the entire existing slots array — it is not merged. Send an empty array ([]) to remove all scheduled slots.
Changing the type of a subject after creation is not supported. If you need a different type, delete the existing subject and create a new one. Note that deleting a subject also removes all its associated blocks.

Response

Returns the full updated subject object inside the data field.
id
string
Unique identifier for the subject.
name
string
Display name of the subject.
type
string
The subject type. Unchanged by this endpoint.
color
string
Hex color code for this subject.
slots
array
The updated weekly time slots for this subject.
syllabus
array
Array of syllabus topic objects. Each item has title (string), duration (integer, minutes), and done (boolean). Unchanged by this endpoint.
Example response
{
  "data": {
    "id": "sub_xyz",
    "name": "JavaScript",
    "type": "study",
    "color": "#6366f1",
    "slots": [
      {
        "days": [1, 3, 5],
        "start": "09:00",
        "end": "10:00"
      }
    ],
    "syllabus": [
      { "title": "Arrays", "duration": 30, "done": false }
    ]
  },
  "error": null,
  "meta": {
    "request_id": "req_abc123",
    "timestamp": "2026-06-11T09:00:00Z"
  }
}

Examples

# Update color and reschedule slots
curl -X PATCH https://api.taketime.app/v1/subjects/sub_xyz \
  -H "Authorization: Bearer tt_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "color": "#6366f1",
    "slots": [
      {
        "days": [1, 3, 5],
        "start": "09:00",
        "end": "10:00"
      }
    ]
  }'
When you update slots, the new array fully replaces the old one. Any previously defined slots not included in the new array will be removed.