Skip to main content
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>',
    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));
{
  "id": "<string>",
  "title": "<string>",
  "description": "<string>",
  "due_date": "<string>",
  "stage": "<string>",
  "category": "<string>",
  "assigned_to": {},
  "projects": {},
  "comments": {},
  "progress": {},
  "tags": {}
}

Update Task

Update one or more fields of an existing task. If the task is reassigned, the new assignee receives an email notification.

Request

Headers

x-api-key
string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
x-organization-id
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa
Accept-Language
string
default:"es"
Language for the notification email: en, es, fr, pt, it, de

Path Parameters

task_id
string
required
UUID of the task

Body Parameters

All fields are optional — only include those you want to change.
title
string
New task title
description
string
New description
due_date
string
New due date (YYYY-MM-DD)
stage
string
New stage: not_applicable, pending, in_progress, completed, validated
category
string
New category
assigned_to
string
UUID of the new assignee
tags
string[]
Updated list of tags (replaces existing)
update_children
boolean
default:"false"
If true and stage is set to completed, all subtasks with pending or in_progress stage are also moved to completed

Response

Returns the updated task object.
id
string
Task UUID
title
string
Task title
description
string
Task description
due_date
string
Due date (YYYY-MM-DD)
stage
string
Task stage: not_applicable, pending, in_progress, completed, validated, deleted
category
string
Task category
assigned_to
object
Assigned user with id, first_name, last_name, email
projects
array[object]
Projects this task belongs to, each with id, name, type, etc.
comments
array[object]
Task comments, each with id and comment
progress
number | null
Completion progress (0–100)
tags
array[string]
Task tags

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
  }'

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",
  "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"
    }
  ]
}

Get Task

View current task state

Task Versions

View task change history