This method inserts a new task into the database with optional associations (labels, track, project, etc.) and returns the created task with its dependencies.
The number in the URL path (/1/) is the organization identifier — referred to as account_id.
This value must match the account associated with the provided session_id or project_token.
This endpoint supports both:
GET https://api.doboard.com/42/task_add?project_id=7&name=Task_title&session_id=abc123xyz
In this example:
42 is the organization/account IDproject_id=7 Project where the task will be createdname=Task_title Task titlesession_id=abc123xyz is used for authenticationIf the account ID in the URL does not match the account tied to the session, the request will be rejected.
Required:
session_id.GUEST can only create tasks in public projects if they have a valid project_token.| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
session_id |
string |
Yes | – | Authenticated session ID. |
project_id |
int |
Yes | – | Project where the task will be created. Must be accessible to the user. |
name |
string |
Yes | – | Task title (max 256 chars). |
track_id |
int |
No | null | Track ID to associate with the task. |
due_date |
datetime |
No | null | Due date (Y-m-d H:i:s). |
start_date |
datetime |
No | null | Start date (Y-m-d H:i:s). |
status |
enum |
No | ACTIVE |
One of: ACTIVE, DONE, REMOVED. |
task_type |
enum |
No | REGULAR |
One of: REGULAR, LINK, LINK_SYMBOLIC, PUBLIC. |
regular_task_id |
int |
* | null | * Required if task_type is LINK or LINK_SYMBOLIC. Must refer to an existing task. |
label_ids |
array |
No | [] | List of label IDs to attach to the task. |
user_id |
int |
No | null | Assigned user ID. |
task_order_id |
int |
No | task_id*1000 | Sort order inside the project (0 … 4,294,967,295). |
grant_order_id |
int |
No | null | Grant order ID (0 … 4,294,967,295). |
HTML |
string |
No | null | Spotfix: HTML of the element. |
meta |
string |
No | null | Spotfix: serialized metadata. |
Applies rate-limiting: max 80\20 request per IP per 1 minute (regular\guest)
{
"data": {
"operation_status": "SUCCESS",
"task_id": 101,
}
}
| HTTP Code | error_no |
Message | Description |
|---|---|---|---|
401 |
– | Unauthorized |
Missing or invalid session_id. |
200 |
4102 |
Access denied |
User has no access to the project or is a guest without token. |
200 |
4103 |
Track Not Found |
Invalid track_id. |
200 |
4104 |
due_date wrong format, expected format: Y-m-d H:i:s |
Invalid due_date. |
200 |
4105 |
start_date wrong format, expected format: Y-m-d H:i:s |
Invalid start_date. |
200 |
4106 |
status must be in ('ACTIVE','DONE','REMOVED') |
Invalid status. |
200 |
4107 |
task_type must be in ('REGULAR','LINK','LINK_SYMBOLIC','PUBLIC') |
Invalid task_type. |
200 |
4108 |
regular_task_id is required |
Missing regular_task_id for LINK/LINK_SYMBOLIC. |
200 |
4109 |
name is required |
Task name missing. |
200 |
4110 |
User Not Found |
Invalid user_id. |
200 |
4111 |
Project Not Found |
Invalid project_id. |
200 |
4112 |
project_id is required |
Missing project_id. |
500 |
0 |
Internal API Error |
Internal error. |
200 |
7 |
limit reached |
Too many requests from same IP. |
If task_type = PUBLIC, a random 32-char token will be generated automatically.
If task_type = LINK_SYMBOLIC, the due_date, status, and user_id will be inherited from the referenced regular_task_id.
After successful creation, the method recalculates project/track/task counters and broadcasts the change to WebSocket subscribers.
Labels are validated against the labels table — only existing labels are attached.