Skip to main content
Use PATCH /v1/blocks/:id to update an existing study block. Only include the fields you want to change — all other fields remain unchanged. This is also how you mark a block as complete.

Endpoint

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

Path Parameters

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

Body Parameters

All body parameters are optional. Include only the fields you want to change.
subject_id
string
Reassign the block to a different subject by providing a new subject ID.
start
string
Updated start time in HH:MM format.
end
string
Updated end time in HH:MM format. Must be after start if both are provided.
done
boolean
Set to true to mark the block as complete, or false to mark it incomplete.
topic
string
Updated topic or syllabus item label. Pass an empty string to clear the existing topic.

Response

Returns the full updated block object inside the data field.
id
string
Unique identifier for the study block.
subject_id
string
The ID of the subject this block belongs to.
subject_name
string
The display name of the subject.
date
string
The date of the block in YYYY-MM-DD format.
start
string
The block’s start time in HH:MM format.
end
string
The block’s end time in HH:MM format.
topic
string
The topic label for this block, or null if none is set.
done
boolean
Whether the block has been marked as complete.
Example response
{
  "data": {
    "id": "blk_abc123",
    "subject_id": "sub_xyz",
    "subject_name": "JavaScript",
    "date": "2026-06-11",
    "start": "09:00",
    "end": "10:00",
    "topic": "Ch. 3 — Arrays",
    "done": true
  },
  "error": null,
  "meta": {
    "request_id": "req_abc123",
    "timestamp": "2026-06-11T09:00:00Z"
  }
}

Marking a Block as Done

To mark a block as complete, send a PATCH request with only { "done": true } in the body. Every other field on the block stays exactly as it was.
{
  "done": true
}

Examples

# Mark a block as complete
curl -X PATCH https://api.taketime.app/v1/blocks/blk_abc123 \
  -H "Authorization: Bearer tt_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"done": true}'
You can update start and end independently. If you update only one, the API validates the final pair — so ensure the resulting start is still before end.