Task REST API
Manage a project's tasks from your own scripts and integrations
The task API lets your own code do what you do on the board: list tasks, read one, create, update and move them, delete them, and add comments. It is a plain JSON API over HTTPS, called with a project API key.
It is a thin layer over the same rules the app uses. A done task is still read-only, a blocked task still cannot be finished, sub-tasks still follow their parent's sprint, and every change shows up in the project's activity feed and fires its automations and webhooks, exactly as if a person had made it.
This page is the guide. The API reference lists every endpoint with its parameters and fields, and has the OpenAPI spec to download for your own tools.
https://decuga.com/api/v1/projects/{projectId}/tasksAuthentication
Create a key in the project under Integrations → API Keys (you need the permission to create API keys). The key is shown once; copy it then. Send it as a bearer token on every request:
Authorization: Bearer dck_...A key belongs to one project and is refused for any other. Revoke it from the same screen and it stops working at once.
A project API key can also sign your own customers in to the helpdesk: see helpdesk auto-login. The key stays on your server there too.
Endpoints
Every path starts with /api/v1/projects/{projectId}/tasks. Where a path says {task}, use the task's id or its code, such as DT-12.
| Method and path | What it does |
|---|---|
GET / | List tasks: the backlog, or one sprint (sprintId) or section (sectionId); narrow to one stage with stage. Paged. |
GET /{task} | One task. |
POST / | Create a task. Answers 201 with the task. |
PATCH /{task} | Update a task. Fields you leave out stay as they are. |
POST /{task}/move | Move a task to another stage, and optionally into a sprint or to a place in the stage. |
DELETE /{task} | Delete a task. Answers 204. |
GET /{task}/subtasks | The task's sub-tasks. |
GET /{task}/comments | The task's comments, oldest first. |
POST /{task}/comments | Add a plain-text comment. Answers 201 with the comment. |
The task object
These field names are part of the API's promise: new fields may be added, but these will not be renamed or removed.
| Field | Meaning |
|---|---|
| id, code | The task's id and its code, for example DT-12. |
| title, description | The title, and the description (plain text or HTML, as it was written). |
| stage | The id of the board stage the task is in. A project's stages are its own, so read a task to see the ids yours uses. |
| status | NEW, IN_PROGRESS or DONE. Moving a task between stages does not by itself change this; a done stage marks it DONE. |
| priority | LOW, MEDIUM, HIGH or CRITICAL. |
| assigneeId, assigneeName, reporterId, reporterName | The people on the task. A task created without an assigneeId is left unassigned, so someone can pick it up; send assigneeId to assign it. The reporter of a task the key creates is the key, shown as its name followed by (API). |
| sprintId, sectionId, epicId, parentTaskId, parentTaskCode | Where the task sits. Epics need the Pro plan. |
| storyPoints, effortEstimate | Story points, and the effort estimate in hours. |
| dueDate, startDate | yyyy-MM-dd, or null. |
| tags, customFields | The task's tags, and its custom field values by field id. |
| createdAt, updatedAt, completedAt | Times in UTC. completedAt is null until the task is completed (and again if it is reopened). |
Creating and updating
To create, send at least a title. The optional fields are: description, stage (the project's first stage when left out), priority, assigneeId, sprintId, sectionId, epicId, parentTaskId, storyPoints, effortEstimate, dueDate, startDate and tags.
To update, send only what changes. To empty a field, send its flag: clearAssignee, clearSprint,clearSection, clearEpic, clearParentTask,clearStoryPoints, clearEffortEstimate, clearDueDate orclearStartDate. tags is the whole list, and replaces the task's tags.
To move, send stage, and optionally sprintId, position (from 0) orremoveFromSprint. A move with none of stage, sprintId or removeFromSprint is refused.
Lists and paging
A list answers with items, page (from 0), size,total and hasMore. Ask for another page with ?page=1, and for a different length with ?size=100. A page is 50 tasks unless you ask, and at most 200. A page past the end is empty, not an error.
Sprints
A task is put in a sprint by sending that sprint's id as sprintId, and the sprints API tells you the id, so a script does not have to hold one that changes at every sprint. It is read only: starting and completing sprints stay in the app. The same key, plan and rules apply as for tasks. In a project made from the Marketing or HR template a sprint is a wave or a cohort, and it is the same thing here.
| Method and path | What it does |
|---|---|
GET /api/v1/projects/{projectId}/sprints | List the sprints, newest first. Send status (PLANNING, ACTIVE or COMPLETED, any case) to get only those in one status, and limit (1 to 100) for fewer. Not paged: one call returns at most 100, the newest. |
GET /api/v1/projects/{projectId}/sprints/{sprint} | One sprint, by its id. A sprint of another project is a 404. |
?status=ACTIVE answers with a list, because some templates allow several active sprints at once; an empty list means none is active. An unknown status is a 400 that names the three.
| Field | Holds |
|---|---|
| id | The sprint's id: what a task's sprintId is set to. |
| name, goal | The sprint's name, and its goal (null when it has none). |
| status | PLANNING (made, not started), ACTIVE (running) or COMPLETED (finished). |
| startDate, endDate | The planned start and end, as dates with no time; null when not set. |
| velocity | The story points finished in the sprint, worked out when it was completed; null until then. |
| createdAt, completedAt | When it was created, and when it was completed (UTC); completedAt is null while it is not. |
Find the active sprint, then create a task in it:
SPRINT_ID=$(curl -s "https://decuga.com/api/v1/projects/$PROJECT_ID/sprints?status=ACTIVE" -H "Authorization: Bearer $DECUGA_API_KEY" | jq -r '.[0].id')
curl -X POST "https://decuga.com/api/v1/projects/$PROJECT_ID/tasks" -H "Authorization: Bearer $DECUGA_API_KEY" -H "Content-Type: application/json" -d "{"title":"Production alert: checkout errors","priority":"HIGH","sprintId":"$SPRINT_ID"}"A longer walk-through, with a function that does this for production alerts: Put tasks from your alert system in the active sprint.
Examples
Create a task:
curl -X POST "https://decuga.com/api/v1/projects/$PROJECT_ID/tasks" \
-H "Authorization: Bearer $DECUGA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"Fix the login redirect","priority":"HIGH","dueDate":"2026-12-01","tags":["bug"]}'Move it to another stage, by its code:
curl -X POST "https://decuga.com/api/v1/projects/$PROJECT_ID/tasks/DT-12/move" \
-H "Authorization: Bearer $DECUGA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"stage":"IN_PROGRESS"}'Unassign it and clear its due date:
curl -X PATCH "https://decuga.com/api/v1/projects/$PROJECT_ID/tasks/DT-12" \
-H "Authorization: Bearer $DECUGA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"clearAssignee":true,"clearDueDate":true}'Comment on it from a build:
curl -X POST "https://decuga.com/api/v1/projects/$PROJECT_ID/tasks/DT-12/comments" \
-H "Authorization: Bearer $DECUGA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"body":"Deployed to staging in build 1432"}'Errors
An error answers with a JSON body of the form {"error": "..."}.
| Status | When |
|---|---|
| 400 | The request is not valid: a missing title, a move with no target, or a rule the app would also refuse (a done task, a blocked task, a bad stage). |
| 401 | No key, or a key that is wrong or has been revoked. |
| 429 | Too many requests: the key or its project is over its limit for this minute. Wait Retry-After seconds. |
| 403 | The key is for another project, the account is below the Business plan, the key's person lacks the permission or has left the project, or the key has no owner (create a new key). |
| 404 | No such task in this project. |
Plans and limits
| Question | Answer |
|---|---|
| Which plan? | Business and above, the same as project API keys. The plan of the account that owns the project is what counts, so a key stops working when that plan ends (within a minute). |
| Is there a rate limit? | Yes: 60 requests a minute for each API key, and 600 a minute for a project across all its keys. A request over the limit gets a 429 and is not carried out. See Rate limits below. |
| Does it change the app's own API? | No. The routes the app uses are separate and may change; this API's routes and fields are the stable ones. |
Rate limits
Each API key can make 60 requests a minute, and a project 600 a minute across all its keys, so many keys do not add up to an unlimited API. The minute starts on the clock minute, so a limit comes back at the top of the next one. A request over a limit is refused with 429 and does nothing.
Every answer tells you where you stand:
| Header | Meaning |
|---|---|
X-RateLimit-Limit | The requests a minute the key may make. |
X-RateLimit-Remaining | How many are left in the current minute. |
X-RateLimit-Reset | When the minute ends, as a Unix time in seconds. |
Retry-After | On a 429 only: the seconds to wait before trying again. |
HTTP/1.1 429
Retry-After: 39
{"error":"Rate limit exceeded: 60 requests per minute for this API key. Try again in 39 seconds."}Retry-After seconds and try again rather than retrying at once. Read lists in pages of up to 200 and update only what changed, and an integration will stay well inside the limit.FAQ
Can the same key manage change requests?
A project API key is also what a deploy pipeline uses to report a change request's status. The same key works for both, on the Business plan.
Whose name is on what the key does?
Everywhere people are named it is the key's name followed by (API): in the activity feed, in notifications, as the author of a comment, as the reporter of a task the key created, and in scrum updates. The key still acts with the access of the person who created it. Use a key created by a person whose access suits the integration.
Why does my update say the task is locked?
A task that is Done is read-only. Move it to an open stage first to reopen it.
Which stage ids can I use?
Your project's own. Read a task that is in the stage you want and use its stage value.
Can I add rich text to a comment?
Not yet: comments made through the API are plain text.