Create Task
const options = {
method: 'POST',
headers: {
'x-api-key': '<x-api-key>',
'x-organization-id': '<x-organization-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
project_id: '<string>',
title: '<string>',
assigned_to: '<string>',
assignee_ids: ['<string>'],
completion_mode: '<string>',
description: '<string>',
due_date: '<string>',
stage: '<string>',
category: '<string>',
parent_task_id: '<string>',
progress: 123,
tags: ['<string>'],
comments: ['<string>']
})
};
fetch('https://api.dcycle.io/v2/tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v2/tasks"
payload = {
"project_id": "<string>",
"title": "<string>",
"assigned_to": "<string>",
"assignee_ids": ["<string>"],
"completion_mode": "<string>",
"description": "<string>",
"due_date": "<string>",
"stage": "<string>",
"category": "<string>",
"parent_task_id": "<string>",
"progress": 123,
"tags": ["<string>"],
"comments": ["<string>"]
}
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.dcycle.io/v2/tasks \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>' \
--data '
{
"project_id": "<string>",
"title": "<string>",
"assigned_to": "<string>",
"assignee_ids": [
"<string>"
],
"completion_mode": "<string>",
"description": "<string>",
"due_date": "<string>",
"stage": "<string>",
"category": "<string>",
"parent_task_id": "<string>",
"progress": 123,
"tags": [
"<string>"
],
"comments": [
"<string>"
]
}
'{
"id": "<string>",
"title": "<string>",
"stage": "<string>",
"assignees": {},
"completion_mode": "<string>",
"assigned_to": {},
"projects": {}
}Create Task
Create a new task linked to a project
POST
/
v2
/
tasks
Create Task
const options = {
method: 'POST',
headers: {
'x-api-key': '<x-api-key>',
'x-organization-id': '<x-organization-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
project_id: '<string>',
title: '<string>',
assigned_to: '<string>',
assignee_ids: ['<string>'],
completion_mode: '<string>',
description: '<string>',
due_date: '<string>',
stage: '<string>',
category: '<string>',
parent_task_id: '<string>',
progress: 123,
tags: ['<string>'],
comments: ['<string>']
})
};
fetch('https://api.dcycle.io/v2/tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v2/tasks"
payload = {
"project_id": "<string>",
"title": "<string>",
"assigned_to": "<string>",
"assignee_ids": ["<string>"],
"completion_mode": "<string>",
"description": "<string>",
"due_date": "<string>",
"stage": "<string>",
"category": "<string>",
"parent_task_id": "<string>",
"progress": 123,
"tags": ["<string>"],
"comments": ["<string>"]
}
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.dcycle.io/v2/tasks \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>' \
--data '
{
"project_id": "<string>",
"title": "<string>",
"assigned_to": "<string>",
"assignee_ids": [
"<string>"
],
"completion_mode": "<string>",
"description": "<string>",
"due_date": "<string>",
"stage": "<string>",
"category": "<string>",
"parent_task_id": "<string>",
"progress": 123,
"tags": [
"<string>"
],
"comments": [
"<string>"
]
}
'{
"id": "<string>",
"title": "<string>",
"stage": "<string>",
"assignees": {},
"completion_mode": "<string>",
"assigned_to": {},
"projects": {}
}← Projects API
Create a new task linked to a project. Every assignee receives an email notification unless they are the creator.
Request
Headers
string
required
Your API key for authenticationExample:
sk_live_1234567890abcdefstring
required
Your organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51fastring
default:"es"
Language for the notification email:
en, es, fr, pt, it, deBody Parameters
string
required
UUID of the project to link the task toRetrieve available options from
GET /v1/projects/extendedstring
required
Task title
string
UUID of the user to assign the task to. Deprecated in favor of
assignee_ids; provide one of
assigned_to or assignee_ids.string[]
UUIDs of every user to assign the task to. All assignees are equally accountable. Defaults to
[assigned_to] when omitted. Required when assigning more than one person, along with
completion_mode.string
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.string
Task description
string
Due date (YYYY-MM-DD)
string
Initial stage:
not_applicable, pending, in_progress, completed, validatedstring
Task category
string
UUID of the parent task (creates a subtask)
number
Initial progress (0–100)
string[]
List of tags
string[]
Initial comments to add to the task
Response
Returns201 Created with the created task.
string
Created task UUID
string
Task title
string
Task stage
array[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).string
any or all — see request parameter aboveobject
Deprecated. One of
assignees, kept for backward compatibility; carries no special meaning.array[object]
Linked projects
Example
curl -X POST "https://api.dcycle.io/v2/tasks" \
-H "x-api-key: ${DCYCLE_API_KEY}" \
-H "x-organization-id: ${DCYCLE_ORG_ID}" \
-H "Content-Type: application/json" \
-d '{
"project_id": "project-uuid",
"title": "Upload Q2 electricity invoices",
"assigned_to": "user-uuid",
"description": "Upload all Q2 2025 electricity invoices for Madrid office",
"due_date": "2025-07-15",
"stage": "pending",
"tags": ["invoices", "Q2"]
}'
import requests
import os
response = requests.post(
"https://api.dcycle.io/v2/tasks",
headers={
"x-api-key": os.getenv("DCYCLE_API_KEY"),
"x-organization-id": os.getenv("DCYCLE_ORG_ID"),
"Content-Type": "application/json",
},
json={
"project_id": "project-uuid",
"title": "Upload Q2 electricity invoices",
"assigned_to": "user-uuid",
"description": "Upload all Q2 2025 electricity invoices for Madrid office",
"due_date": "2025-07-15",
"stage": "pending",
"tags": ["invoices", "Q2"],
},
)
task = response.json()
print(f"Created task: {task['id']} — {task['title']}")
const axios = require('axios');
const { data: task } = await axios.post(
'https://api.dcycle.io/v2/tasks',
{
project_id: 'project-uuid',
title: 'Upload Q2 electricity invoices',
assigned_to: 'user-uuid',
description: 'Upload all Q2 2025 electricity invoices for Madrid office',
due_date: '2025-07-15',
stage: 'pending',
tags: ['invoices', 'Q2'],
},
{
headers: {
'x-api-key': process.env.DCYCLE_API_KEY,
'x-organization-id': process.env.DCYCLE_ORG_ID,
'Content-Type': 'application/json',
},
}
);
console.log(`Created task: ${task.id} — ${task.title}`);
Successful Response
{
"id": "task-uuid",
"title": "Upload Q2 electricity invoices",
"description": "Upload all Q2 2025 electricity invoices for Madrid office",
"due_date": "2025-07-15",
"stage": "pending",
"category": null,
"organization_id": "org-uuid",
"assignees": [
{
"id": "user-uuid",
"first_name": "Carlos",
"last_name": "López",
"email": "carlos@example.com",
"completed_at": null
}
],
"completion_mode": "any",
"assigned_to": {
"id": "user-uuid",
"first_name": "Carlos",
"last_name": "López",
"email": "carlos@example.com"
},
"projects": [
{ "id": "project-uuid", "name": "Carbon Footprint 2025" }
],
"comments": [],
"progress": null,
"tags": ["invoices", "Q2"]
}
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"}
422 Unprocessable Entity
Cause: Invalid or missing required fields in the request body{
"detail": [
{
"loc": ["body", "title"],
"msg": "field required",
"type": "value_error.missing"
}
]
}
Related Endpoints
Get Task
Retrieve task details
Update Task
Modify task fields
Was this page helpful?