Creates a reusable task template from scratch or from an existing task. A template contains a catalog name, a default task name, formatted content and ordinary labels. It can optionally belong to a Template Group.
Creating a template does not create a task or modify the source task.
https://api.doboard.com/{account_id}/task_template_add
account_id is the numeric organization identifier.
Supported methods: GET and POST.
Use POST with application/x-www-form-urlencoded for formatted content and label arrays. GET accepts parameters in the query string.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
session_id |
string | Yes | — | Authenticated session ID. |
name |
string | Yes when creating from scratch | Source task name when copying | Template name in the catalog. Maximum 256 characters. |
task_name |
string | No | name when creating from scratch; source task name when copying |
Default name of a task created from this template. Maximum 256 characters. |
content |
string | No | Empty string | Prepared HTML content. Cannot be combined with source_comment_id. |
template_group_id |
int | No | null |
Active Template Group ID. Omit to create the template in “Ungrouped”. |
label_ids |
array of int | No | Empty array when creating from scratch; ordinary source labels when copying | Ordinary label IDs. An explicitly supplied array replaces inherited labels. An empty array clears them. |
source_task_id |
int | No | null |
Existing task used as the source of the template name and ordinary labels. |
source_comment_id |
int | No | null |
Active comment to copy as template content. Requires source_task_id and must belong to that task. |
name and task_name are independent fields after creation.
Provide name and optionally task_name, content, template_group_id and label_ids.
POST /42/task_template_add HTTP/1.1
Host: api.doboard.com
Content-Type: application/x-www-form-urlencoded
session_id=YOUR_SESSION_ID&name=Bug+report&task_name=New+bug&content=%3Cp%3ESteps+to+reproduce%3A%3C%2Fp%3E&template_group_id=3&label_ids%5B%5D=12&label_ids%5B%5D=35
This example creates a template named “Bug report”, with the default task name “New bug”, a formatted content block and two ordinary labels.
All IDs in examples are illustrative.
Provide source_task_id. To copy text, select a comment explicitly with source_comment_id or provide prepared content.
POST /42/task_template_add HTTP/1.1
Host: api.doboard.com
Content-Type: application/x-www-form-urlencoded
session_id=YOUR_SESSION_ID&source_task_id=101&source_comment_id=205&name=Refund+request&template_group_id=3
The template catalog name is “Refund request”. The default task name and ordinary labels come from task 101; content comes from comment 205.
Rules:
name, task_name or label_ids replaces the corresponding inherited value.source_comment_id and content are mutually exclusive.Only the task name, selected content and ordinary labels are copied from the source.
The following data is not copied:
Action labels are identified by their underlying mechanism, rather than by label names.
Ordinary text hyperlinks in content are preserved. Content referencing internal attachments or embedded images is rejected with UNSUPPORTED_TEMPLATE_ATTACHMENT.
Successful response:
{
"data": {
"operation_status": "SUCCESS",
"template_id": 101
}
}
template_id is the identifier of the newly created template. New templates have status ACTIVE.
| HTTP Code | error_no |
Message | Description |
|---|---|---|---|
401 |
401 |
session_id Unknown |
Missing or invalid session. |
403 |
403 |
Permission denied |
The request is forbidden. |
200 |
9001 |
Validation message (listed below) |
Missing, malformed or out-of-range input. |
200 |
9003 |
Template Group Not Found |
The selected group does not exist or is removed. |
200 |
9004 |
Source Task Not Found |
The source task does not exist or is removed. |
200 |
9005 |
Source Comment Not Found |
The comment is removed, missing or belongs to another task. |
200 |
9006 |
label_ids must be an array of positive integers / label_ids must reference active ordinary labels |
Invalid label array, missing or inactive labels, or action labels. |
200 |
9007 |
UNSUPPORTED_TEMPLATE_ATTACHMENT |
Embedded images, CSS image URLs or internal attachment references. |
200 |
9008 |
Access denied |
The source task cannot be used by the current session. |
200 |
0 |
Internal API Error |
An operation could not be completed. |
9001 messages:
{field} must be an integer between {minimum} and 4294967295{field} is required and must not exceed {limit} characterscontent must be a UTF-8 string not exceeding 16777215 bytescontent must not exceed 16777215 bytessource_comment_id requires source_task_id and cannot be combined with contentPlaceholders in messages are replaced with the parameter name and its supported bounds.
Errors return data.operation_status="FAILED"; the same message is provided in error_message and data.operation_message.
The method validates:
template_group_id is supplied.source_task_id is supplied.source_comment_id and content.