Update a task

Change a task's title, notes, difficulty, due days or tags.

PATCH https://cotlet.dev/api/v1/habitica/tasks/{task_id}

write

Changes only the fields you send and returns the task as it is now. It reaches no one and a second call puts the old values back, so it does not ask for OK by default.

Parameters

Parameters: update_task
NameTypeDescription
task_id string required string Task ID from list_tasks.
text string string New title.
notes string string New notes.
difficulty string string One of: trivial, easy, medium, hard.
repeat_days string[] string[] For a daily: the days it is due. One or more of: mo, tu, we, th, fr, sa, su.

Request

cURL
curl -X PATCH https://cotlet.dev/api/v1/habitica/tasks/task_8c41d2 \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("habitica", "update_task", {"task_id":"task_8c41d2"})
Node.js
const result = await cotlet.call('habitica', 'update_task', {"task_id":"task_8c41d2"});
CLI
cotlet call habitica update_task --data '{"task_id":"task_8c41d2"}'

Example response

JSON

{
  "task_id": "b7c1f6a0-3d52-4e1a-9a7e-5d1c0f2e8a11",
  "title": "Stretch 15 minutes",
  "difficulty": "easy"
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.