Tasks
Irreversible; returns how many were deleted. Use only when the user asks to clear or clean up completed tasks.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
program_id*Program IdProgram id
application/json- body
list_id?|Only completed tasks of this list
term_id?|Only completed tasks of this term
course_id?|Only completed tasks of this course
Successful Response
application/json- response
deleted*Deletedcurl -X POST 'https://example.com/programs/string/tasks:clear-completed' \ -H 'Content-Type: application/json' \ -d '{}'{ "deleted": 0}Completing a task never changes grades, even if it came from an assessment.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
task_id*Task IdTask id
application/json- body
completed?CompletedFalse reopens the task
trueSuccessful Response
application/json- response
id*Idprogram_id*Program Idterm_id*string|nullcourse_id*string|nulllist_id*|Null for the Program's inbox
title*Titlenotes*Notesdue_date*|nulldue_time*|Wall-clock time in the Program's time zone
priority*Priority"none""low""medium""high""urgent"flagged*Flaggedcompleted_at*|nulloverdue*OverdueUnfinished and past its due moment (Program time zone)
position*Positionsource_kind*|nullsource_ref*string|nullassessment_id*|The gradebook assessment this task stands for: its title, due date and course follow the assessment, and it is deleted with it
created_at*Created Atdate-timeupdated_at*Updated Atdate-timecurl -X POST 'https://example.com/tasks/string:complete' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "program_id": "string", "term_id": "string", "course_id": "string", "list_id": "string", "title": "string", "notes": "string", "due_date": "2019-08-24", "due_time": "14:15:22Z", "priority": "none", "flagged": true, "completed_at": "2019-08-24T14:15:22Z", "overdue": true, "position": 0, "source_kind": "lms", "source_ref": "string", "assessment_id": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Cheap overview: today, overdue, scheduled, all, inbox, flagged and completed.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
program_id*Program IdProgram id
term_id?|Only this term's tasks and those that belong to no term
course_id?|Only this course's tasks
Successful Response
application/json- response
today*TodayUnfinished tasks due today or overdue
overdue*Overduescheduled*Scheduledall*Allinbox*Inboxflagged*Flaggedcompleted*Completedlists*Unfinished tasks per list id
courses*Unfinished tasks per course id
curl -X GET 'https://example.com/programs/string/task-counts'{ "today": 0, "overdue": 0, "scheduled": 0, "all": 0, "inbox": 0, "flagged": 0, "completed": 0, "lists": { "property1": 0, "property2": 0 }, "courses": { "property1": 0, "property2": 0 }}Use for 'what do I have to do'. today includes overdue tasks. For questions
about what is due this week prefer calendar.occurrence.list, which merges tasks with assessment
deadlines and classes. Filter with list_id, term_id, course_id, search and due_from/due_to;
completed tasks are hidden unless the view is completed or completed is include or only.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
program_id*Program IdProgram id
view?Viewtoday = due today or overdue; scheduled = has a due date; all; completed; inbox = no list; flagged
"all""today""scheduled""all""completed""inbox""flagged"list_id?|Only this list
term_id?|Only this term's tasks and those that belong to no term
course_id?|Only this course
search?|Fuzzy match on title and notes
due_from?|Due on or after this date
due_to?|Due on or before this date
completed?CompletedCompleted tasks the view would show: leave out, add, or return only them (ignored by the completed view)
"exclude""exclude""include""only"sort?SortOrder of the result
"manual""manual""due""priority""created""title"fields?array<>|Agent/MCP only: return just these fields of each task (and its id)
cursor?|next_cursor of the previous page
limit?LimitPage size
200Successful Response
application/json- response
items*array<>next_cursor*string|nulltotal*TotalHow many tasks match, over all pages
curl -X GET 'https://example.com/programs/string/tasks'{ "items": [ { "id": "string", "program_id": "string", "term_id": "string", "course_id": "string", "list_id": "string", "title": "string", "notes": "string", "due_date": "2019-08-24", "due_time": "14:15:22Z", "priority": "none", "flagged": true, "completed_at": "2019-08-24T14:15:22Z", "overdue": true, "position": 0, "source_kind": "lms", "source_ref": "string", "assessment_id": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "next_cursor": "string", "total": 0}Always pass the course and due date when the user's words or the current scope give them. Dates are in the Program's time zone; a time needs a date. The term is inferred from the course and due date. Omit list_id to put the task in the inbox. Use tasks.item.create_many for several tasks.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
program_id*Program IdProgram id
application/json- body
title*TitleWhat to do
1 <= length <= 300notes?NotesNotes
length <= 20000""due_date?|Due date (Program time zone)
due_time?|Due time of day; needs a due date. Seconds are dropped.
priority?|Priority; omit for the Program's default
flagged?FlaggedFlag the task
falseterm_id?|Term; inferred from the course and due date when omitted
course_id?|Course the task is for
list_id?|List; omit for the inbox
source_kind?Source KindWhere the task came from. The assistant may only use agent (its default), syllabus or manual; lms tasks are made by the app itself
"manual""lms""syllabus""agent""manual"source_ref?|Id of the source item; makes batch imports idempotent
Successful Response
application/json- response
id*Idprogram_id*Program Idterm_id*string|nullcourse_id*string|nulllist_id*|Null for the Program's inbox
title*Titlenotes*Notesdue_date*|nulldue_time*|Wall-clock time in the Program's time zone
priority*Priority"none""low""medium""high""urgent"flagged*Flaggedcompleted_at*|nulloverdue*OverdueUnfinished and past its due moment (Program time zone)
position*Positionsource_kind*|nullsource_ref*string|nullassessment_id*|The gradebook assessment this task stands for: its title, due date and course follow the assessment, and it is deleted with it
created_at*Created Atdate-timeupdated_at*Updated Atdate-timecurl -X POST 'https://example.com/programs/string/tasks' \ -H 'Content-Type: application/json' \ -d '{ "title": "string"}'{ "id": "string", "program_id": "string", "term_id": "string", "course_id": "string", "list_id": "string", "title": "string", "notes": "string", "due_date": "2019-08-24", "due_time": "14:15:22Z", "priority": "none", "flagged": true, "completed_at": "2019-08-24T14:15:22Z", "overdue": true, "position": 0, "source_kind": "lms", "source_ref": "string", "assessment_id": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Use for a list of tasks the user dictates or pastes; tasks in a document go through imports.session.create. Items whose source_kind and source_ref match an existing task are skipped and returned with that task's id, so repeating an import does not duplicate them.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
program_id*Program IdProgram id
application/json- body
items*array<>Tasks to create
1 <= items <= 200Successful Response
application/json- response
created*array<>skipped*array<>curl -X POST 'https://example.com/programs/string/tasks:batch' \ -H 'Content-Type: application/json' \ -d '{ "items": [ { "title": "string" } ]}'{ "created": [ { "id": "string", "program_id": "string", "term_id": "string", "course_id": "string", "list_id": "string", "title": "string", "notes": "string", "due_date": "2019-08-24", "due_time": "14:15:22Z", "priority": "none", "flagged": true, "completed_at": "2019-08-24T14:15:22Z", "overdue": true, "position": 0, "source_kind": "lms", "source_ref": "string", "assessment_id": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "skipped": [ { "index": 0, "task_id": "string" } ]}Use when you need the full details of a task you already know the id of.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
task_id*Task IdTask id
Successful Response
application/json- response
id*Idprogram_id*Program Idterm_id*string|nullcourse_id*string|nulllist_id*|Null for the Program's inbox
title*Titlenotes*Notesdue_date*|nulldue_time*|Wall-clock time in the Program's time zone
priority*Priority"none""low""medium""high""urgent"flagged*Flaggedcompleted_at*|nulloverdue*OverdueUnfinished and past its due moment (Program time zone)
position*Positionsource_kind*|nullsource_ref*string|nullassessment_id*|The gradebook assessment this task stands for: its title, due date and course follow the assessment, and it is deleted with it
created_at*Created Atdate-timeupdated_at*Updated Atdate-timecurl -X GET 'https://example.com/tasks/string'{ "id": "string", "program_id": "string", "term_id": "string", "course_id": "string", "list_id": "string", "title": "string", "notes": "string", "due_date": "2019-08-24", "due_time": "14:15:22Z", "priority": "none", "flagged": true, "completed_at": "2019-08-24T14:15:22Z", "overdue": true, "position": 0, "source_kind": "lms", "source_ref": "string", "assessment_id": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Partial update: only the fields that are sent change; null clears the nullable ones (due_date, due_time, course_id, list_id, term_id). Use tasks.item.complete to finish a task and tasks.item.move to reorder it. A task with source_kind assessment takes its title, due date and course from the assessment: changing those is refused (tasks.managed_by_assessment); change the assessment instead.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
task_id*Task IdTask id
application/json- body
title?|Title
notes?|Notes
due_date?|Due date; null clears date and time
due_time?|Due time; null clears it
priority?|Priority
flagged?|Flag
term_id?|Term; null clears it
course_id?|Course; null clears it
list_id?|List; null moves to the inbox
Successful Response
application/json- response
id*Idprogram_id*Program Idterm_id*string|nullcourse_id*string|nulllist_id*|Null for the Program's inbox
title*Titlenotes*Notesdue_date*|nulldue_time*|Wall-clock time in the Program's time zone
priority*Priority"none""low""medium""high""urgent"flagged*Flaggedcompleted_at*|nulloverdue*OverdueUnfinished and past its due moment (Program time zone)
position*Positionsource_kind*|nullsource_ref*string|nullassessment_id*|The gradebook assessment this task stands for: its title, due date and course follow the assessment, and it is deleted with it
created_at*Created Atdate-timeupdated_at*Updated Atdate-timecurl -X PATCH 'https://example.com/tasks/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "program_id": "string", "term_id": "string", "course_id": "string", "list_id": "string", "title": "string", "notes": "string", "due_date": "2019-08-24", "due_time": "14:15:22Z", "priority": "none", "flagged": true, "completed_at": "2019-08-24T14:15:22Z", "overdue": true, "position": 0, "source_kind": "lms", "source_ref": "string", "assessment_id": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Irreversible. To finish a task use tasks.item.complete instead; delete only when the user asks to remove it. A task made from an assessment comes back when the assessment changes.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
task_id*Task IdTask id
Successful Response
application/json- response
ok?Oktruecurl -X DELETE 'https://example.com/tasks/string'{ "ok": true}Send list_id (null = inbox) to change list; leave it out to reorder inside the current one. before_task_id places the task right before that task, otherwise it goes last.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
task_id*Task IdTask id
application/json- body
list_id?|Target list (null = inbox); if not sent the list is unchanged
before_task_id?|Place the task before this one (same target list; from tasks.item.query); else last
Successful Response
application/json- response
id*Idprogram_id*Program Idterm_id*string|nullcourse_id*string|nulllist_id*|Null for the Program's inbox
title*Titlenotes*Notesdue_date*|nulldue_time*|Wall-clock time in the Program's time zone
priority*Priority"none""low""medium""high""urgent"flagged*Flaggedcompleted_at*|nulloverdue*OverdueUnfinished and past its due moment (Program time zone)
position*Positionsource_kind*|nullsource_ref*string|nullassessment_id*|The gradebook assessment this task stands for: its title, due date and course follow the assessment, and it is deleted with it
created_at*Created Atdate-timeupdated_at*Updated Atdate-timecurl -X POST 'https://example.com/tasks/string:move' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "program_id": "string", "term_id": "string", "course_id": "string", "list_id": "string", "title": "string", "notes": "string", "due_date": "2019-08-24", "due_time": "14:15:22Z", "priority": "none", "flagged": true, "completed_at": "2019-08-24T14:15:22Z", "overdue": true, "position": 0, "source_kind": "lms", "source_ref": "string", "assessment_id": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Use to find a list id before creating or moving tasks. Tasks without a list are in the inbox, which is not a list row.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
program_id*Program IdProgram id
Successful Response
application/json- response
items*array<>curl -X GET 'https://example.com/programs/string/task-lists'{ "items": [ { "id": "string", "program_id": "string", "term_id": "string", "name": "string", "color": "string", "icon": "string", "position": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ]}Use when the user wants a named list such as 'Errands'. Names are unique within a term (or within the Program-wide lists). Do not create a list just to file one task: leave tasks in the inbox unless the user names a list.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
program_id*Program IdProgram id
application/json- body
name*NameList name, unique within its term (or Program-wide)
1 <= length <= 100term_id?|Term the list belongs to; omit for a Program-wide list
color?|Color
icon?|Icon
Successful Response
application/json- response
id*Idprogram_id*Program Idterm_id*|Null for a list shared by every term of the Program
name*Namecolor*string|nullicon*string|nullposition*Positioncreated_at*Created Atdate-timeupdated_at*Updated Atdate-timecurl -X POST 'https://example.com/programs/string/task-lists' \ -H 'Content-Type: application/json' \ -d '{ "name": "string"}'{ "id": "string", "program_id": "string", "term_id": "string", "name": "string", "color": "string", "icon": "string", "position": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Partial update: only the fields that are sent change. Get the id from tasks.list.list. Tasks are moved between lists with tasks.item.move.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
list_id*List IdList id
application/json- body
name?|New name
color?|Color
icon?|Icon
Successful Response
application/json- response
id*Idprogram_id*Program Idterm_id*|Null for a list shared by every term of the Program
name*Namecolor*string|nullicon*string|nullposition*Positioncreated_at*Created Atdate-timeupdated_at*Updated Atdate-timecurl -X PATCH 'https://example.com/task-lists/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "program_id": "string", "term_id": "string", "name": "string", "color": "string", "icon": "string", "position": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}With delete_tasks true the list's tasks are deleted for good, so only use
it when the user asked for that. By default the tasks are kept in the inbox.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
list_id*List IdList id
delete_tasks?Delete TasksDelete the list's tasks too; by default they move to the inbox
falseSuccessful Response
application/json- response
deleted_task_count*Deleted Task Countmoved_task_count*Moved Task Countcurl -X DELETE 'https://example.com/task-lists/string'{ "deleted_task_count": 0, "moved_task_count": 0}Lists not named keep their relative order after the named ones.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
program_id*Program IdProgram id
application/json- body
list_ids*array<>List ids in the new display order (lists not named go last)
items <= 200Successful Response
application/json- response
items*array<>curl -X PUT 'https://example.com/programs/string/task-list-order' \ -H 'Content-Type: application/json' \ -d '{ "list_ids": [ "string" ]}'{ "items": [ { "id": "string", "program_id": "string", "term_id": "string", "name": "string", "color": "string", "icon": "string", "position": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ]}