Update Task
const options = {
method: 'PATCH',
headers: {
'x-api-key': '<x-api-key>',
'x-organization-id': '<x-organization-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: '<string>',
description: '<string>',
due_date: '<string>',
stage: '<string>',
category: '<string>',
assigned_to: '<string>',
assignee_ids: ['<string>'],
completion_mode: '<string>',
tags: ['<string>'],
update_children: true
})
};
fetch('https://api.dcycle.io/v1/tasks/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v1/tasks/{task_id}"
payload = {
"title": "<string>",
"description": "<string>",
"due_date": "<string>",
"stage": "<string>",
"category": "<string>",
"assigned_to": "<string>",
"assignee_ids": ["<string>"],
"completion_mode": "<string>",
"tags": ["<string>"],
"update_children": True
}
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)curl --request PATCH \
--url https://api.dcycle.io/v1/tasks/{task_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>' \
--data '
{
"title": "<string>",
"description": "<string>",
"due_date": "<string>",
"stage": "<string>",
"category": "<string>",
"assigned_to": "<string>",
"assignee_ids": [
"<string>"
],
"completion_mode": "<string>",
"tags": [
"<string>"
],
"update_children": true
}
'{
"id": "<string>",
"title": "<string>",
"description": "<string>",
"due_date": "<string>",
"stage": "<string>",
"category": "<string>",
"assignees": {},
"completion_mode": "<string>",
"assigned_to": {},
"projects": {},
"comments": {},
"progress": {},
"tags": {}
}Update Task
Update a task’s fields
PATCH
/
v1
/
tasks
/
{task_id}
Update Task
const options = {
method: 'PATCH',
headers: {
'x-api-key': '<x-api-key>',
'x-organization-id': '<x-organization-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: '<string>',
description: '<string>',
due_date: '<string>',
stage: '<string>',
category: '<string>',
assigned_to: '<string>',
assignee_ids: ['<string>'],
completion_mode: '<string>',
tags: ['<string>'],
update_children: true
})
};
fetch('https://api.dcycle.io/v1/tasks/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v1/tasks/{task_id}"
payload = {
"title": "<string>",
"description": "<string>",
"due_date": "<string>",
"stage": "<string>",
"category": "<string>",
"assigned_to": "<string>",
"assignee_ids": ["<string>"],
"completion_mode": "<string>",
"tags": ["<string>"],
"update_children": True
}
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)curl --request PATCH \
--url https://api.dcycle.io/v1/tasks/{task_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>' \
--data '
{
"title": "<string>",
"description": "<string>",
"due_date": "<string>",
"stage": "<string>",
"category": "<string>",
"assigned_to": "<string>",
"assignee_ids": [
"<string>"
],
"completion_mode": "<string>",
"tags": [
"<string>"
],
"update_children": true
}
'{
"id": "<string>",
"title": "<string>",
"description": "<string>",
"due_date": "<string>",
"stage": "<string>",
"category": "<string>",
"assignees": {},
"completion_mode": "<string>",
"assigned_to": {},
"projects": {},
"comments": {},
"progress": {},
"tags": {}
}← Projects API
Update one or more fields of an existing task. Anyone newly added as an assignee receives an email notification; existing assignees are not re-notified.
Request
Headers
Path Parameters
Body Parameters
All fields are optional — only include those you want to change.UUID of the new assignee. Deprecated in favor of
assignee_ids; setting assigned_to alone
replaces the whole assignee list with this single user.Replaces the full assignee list. Omit to leave the current assignees untouched. Required when
assigning more than one person, along with
completion_mode.How the task is considered finished when it has several assignees:
any (default) — the first
assignee to complete it finishes it for everyone; all — every assignee must complete their own
part before the task is marked done. Required when assignee_ids has more than one entry.If
true and stage is set to completed, all subtasks with pending or in_progress stage are also moved to completedResponse
Returns the updated task object.Every user assigned to the task, all equally accountable. Each entry includes
completed_at,
set once that person has finished their own part (only meaningful when completion_mode is all).Example
curl -X PATCH "https://api.dcycle.io/v1/tasks/${TASK_ID}" \
-H "x-api-key: ${DCYCLE_API_KEY}" \
-H "x-organization-id: ${DCYCLE_ORG_ID}" \
-H "Content-Type: application/json" \
-d '{
"stage": "completed",
"update_children": true
}'
import requests
import os
response = requests.patch(
f"https://api.dcycle.io/v1/tasks/{os.getenv('TASK_ID')}",
headers={
"x-api-key": os.getenv("DCYCLE_API_KEY"),
"x-organization-id": os.getenv("DCYCLE_ORG_ID"),
"Content-Type": "application/json",
},
json={
"stage": "completed",
"update_children": True,
},
)
task = response.json()
print(f"Task {task['id']} → {task['stage']}")
const axios = require('axios');
const { data: task } = await axios.patch(
`https://api.dcycle.io/v1/tasks/${process.env.TASK_ID}`,
{ stage: 'completed', update_children: true },
{
headers: {
'x-api-key': process.env.DCYCLE_API_KEY,
'x-organization-id': process.env.DCYCLE_ORG_ID,
'Content-Type': 'application/json',
},
}
);
console.log(`Task ${task.id} → ${task.stage}`);
Successful Response
{
"id": "task-uuid",
"title": "Upload Q2 electricity invoices",
"description": "Upload all Q2 2025 electricity invoices",
"due_date": "2025-07-15",
"stage": "completed",
"category": "data_collection",
"assignees": [
{
"id": "user-uuid",
"first_name": "Carlos",
"last_name": "López",
"email": "carlos@example.com",
"completed_at": "2025-07-14T10:00:00Z"
}
],
"completion_mode": "any",
"assigned_to": {
"id": "user-uuid",
"first_name": "Carlos",
"last_name": "López"
},
"projects": [
{ "id": "project-uuid", "name": "Carbon Footprint 2025" }
],
"comments": [],
"progress": null,
"tags": []
}
Common Errors
401 Unauthorized
Cause: Missing or invalid API key{"detail": "Invalid API key for organization", "code": "INVALID_API_KEY"}
403 Forbidden
Cause: The authenticated user is not a member of the organization{"detail": "Logged User is not Member of Organization", "code": "LOGGED_USER_NOT_MEMBER"}
404 Not Found
Cause: The task does not exist or belongs to another organization{"detail": "Not Found"}
422 Unprocessable Entity
Cause: Invalid field values in the request body{
"detail": [
{
"loc": ["body", "stage"],
"msg": "value is not a valid enumeration member",
"type": "type_error.enum"
}
]
}
Related Endpoints
Get Task
View current task state
Task Versions
View task change history
Was this page helpful?