Get Task Template List tasks.template.list
Choose a tool for developing with an AI agent:
- use Alaio Vibecode to build an app for Bitrix24 from a task description without knowing any programming language. The agent writes the code and deploys the app to a server, with no manual hosting setup
- use the MCP server to develop a REST API integration in your own project. The agent refers to the official REST documentation
Scope:
taskWho can execute the method: any user
The method tasks.template.list returns a list of task templates available to the user.
Method Parameters
|
Name |
Description |
|
params |
Selection parameters (detailed description). If |
|
start |
Controls pagination. The page size is always fixed at 50 records. To get the second page of results, pass The formula for calculating the
|
Parameter params
Only the following template fields can be used in select, filter, and order: ID, TITLE, DESCRIPTION, DESCRIPTION_IN_BBCODE, PRIORITY, STATUS, RESPONSIBLE_ID, TIME_ESTIMATE, REPLICATE, CREATED_BY, XML_ID, ALLOW_CHANGE_DEADLINE, ALLOW_TIME_TRACKING, TASK_CONTROL, ADD_IN_REPORT, MATCH_WORK_TIME, GROUP_ID, PARENT_ID, MULTITASK, SITE_ID, REPLICATE_PARAMS, TAGS, ACCOMPLICES, AUDITORS, RESPONSIBLES, DEPENDS_ON, DEADLINE_AFTER, START_DATE_PLAN_AFTER, END_DATE_PLAN_AFTER, TASK_ID, STAGE_ID, TPARAM_TYPE, TPARAM_REPLICATION_COUNT, REPLICATE_TYPE, ZOMBIE, FILES. The fields are described in Task Template Fields.
|
Name |
Description |
|
select |
An array of fields to return. User fields The value |
|
filter |
An object for filtering templates in the format You can put an operator before the field name:
For example, |
|
order |
An object for sorting in the format Possible values:
If you pass any other value, the method returns an empty list |
Pass select, filter, and order only inside params. At the top level of the request, the method ignores them.
The method returns only the templates the user can view:
- templates the user created
- templates shared with the user in the template access settings
- templates of employees in the user's department, if the user has the "View own department's templates" permission
- templates of employees in other departments, if the user has the "View other departments' templates" permission
Bitrix24 administrator permissions do not extend the selection. The responsible person, participants, and observers of a template do not get access to it.
Code Examples
How to Use Examples in Documentation
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"params": {
"select": ["ID", "TITLE", "CREATED_BY", "RESPONSIBLE_ID", "ACCOMPLICES", "AUDITORS", "REPLICATE", "GROUP_ID"],
"filter": {
"CREATED_BY": 1,
"REPLICATE": "N"
},
"order": {
"ID": "DESC"
}
},
"start": 0
}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/tasks.template.list
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"params": {
"select": ["ID", "TITLE", "CREATED_BY", "RESPONSIBLE_ID", "ACCOMPLICES", "AUDITORS", "REPLICATE", "GROUP_ID"],
"filter": {
"CREATED_BY": 1,
"REPLICATE": "N"
},
"order": {
"ID": "DESC"
}
},
"start": 0,
"auth": "**put_access_token_here**"
}' \
https://**put_your_bitrix24_address**/rest/tasks.template.list
// This snippet is an ES module: top-level await requires type="module" or a bundler.
// $b24 is an already-initialized SDK instance (see the SDK "Get started" guide).
import { Text } from '@bitrix24/b24jssdk'
import type { B24Frame } from '@bitrix24/b24jssdk'
declare const $b24: B24Frame
type TaskTemplate = {
ID: number
TITLE: string
CREATED_BY: string
RESPONSIBLE_ID: string
ACCOMPLICES: number[]
AUDITORS: number[]
REPLICATE: string
GROUP_ID: string | null
}
// Shape of the payload returned in result (match the "response handling" section of the page)
// An empty page comes as an array [], a non-empty one as an object keyed by template ID
type TaskTemplateListResult = {
task_templates: Record<string, TaskTemplate> | []
}
try {
// tasks.template.list returns a single page (50 records). Pass `start` to get the next page.
const response = await $b24.actions.v2.call.make<TaskTemplateListResult>({
method: 'tasks.template.list',
params: {
params: {
select: ['ID', 'TITLE', 'CREATED_BY', 'RESPONSIBLE_ID', 'ACCOMPLICES', 'AUDITORS', 'REPLICATE', 'GROUP_ID'],
filter: {
CREATED_BY: 1,
REPLICATE: 'N',
},
order: {
ID: 'DESC',
},
},
start: 0,
},
requestId: Text.getUuidRfc4122()
})
// The payload is available only on a successful response
if (!response.isSuccess) {
console.error(response.getErrorMessages().join('; '))
} else {
const templates = Object.values(response.getData()!.result.task_templates)
templates.forEach((template) => console.info(template.ID, template.TITLE))
}
} catch (error) {
// Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
console.error(error)
}
<!-- Load the SDK (UMD build); it is exposed as the global B24Js -->
<script src="https://unpkg.com/@bitrix24/b24jssdk@1/dist/umd/index.min.js"></script>
<script>
async function getTaskTemplates() {
try {
// Initialize the SDK inside a Bitrix24 frame
const $b24 = await B24Js.initializeB24Frame()
// tasks.template.list returns a single page (50 records). Pass `start` to get the next page.
const response = await $b24.actions.v2.call.make({
method: 'tasks.template.list',
params: {
params: {
select: ['ID', 'TITLE', 'CREATED_BY', 'RESPONSIBLE_ID', 'ACCOMPLICES', 'AUDITORS', 'REPLICATE', 'GROUP_ID'],
filter: {
CREATED_BY: 1,
REPLICATE: 'N',
},
order: {
ID: 'DESC',
},
},
start: 0,
},
requestId: B24Js.Text.getUuidRfc4122()
})
// The payload is available only on a successful response
if (!response.isSuccess) {
console.error(response.getErrorMessages().join('; '))
return
}
// An empty page comes as an array [], a non-empty one as an object keyed by template ID
const templates = Object.values(response.getData().result.task_templates)
templates.forEach((template) => console.info(template.ID, template.TITLE))
} catch (error) {
// Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
console.error(error)
}
}
document.addEventListener('DOMContentLoaded', getTaskTemplates)
</script>
from b24pysdk.errors import BitrixAPIError, BitrixSDKException
try:
# b24pysdk has no wrapper for tasks.template.list, so the method
# is called directly via bitrix_token.call_method()
response = bitrix_token.call_method(
api_method="tasks.template.list",
params={
"params": {
"select": ["ID", "TITLE", "CREATED_BY", "RESPONSIBLE_ID", "ACCOMPLICES", "AUDITORS", "REPLICATE", "GROUP_ID"],
"filter": {
"CREATED_BY": 1,
"REPLICATE": "N",
},
"order": {
"ID": "DESC",
},
},
"start": 0,
},
)
# An empty page comes as an array [], a non-empty one as an object keyed by template ID
templates = response["result"]["task_templates"] or {}
for template in templates.values():
print(template["ID"], template["TITLE"])
except BitrixAPIError as error:
print(
"Bitrix API error",
f"error: {error.error}",
f"error_description: {error.error_description}",
sep="\n",
)
except BitrixSDKException as error:
print(f"Bitrix SDK error: {error.message}")
except Exception as error:
print(f"Unexpected error: {error}")
try {
$response = $b24Service
->core
->call(
'tasks.template.list',
[
'params' => [
'select' => ['ID', 'TITLE', 'CREATED_BY', 'RESPONSIBLE_ID', 'ACCOMPLICES', 'AUDITORS', 'REPLICATE', 'GROUP_ID'],
'filter' => [
'CREATED_BY' => 1,
'REPLICATE' => 'N',
],
'order' => [
'ID' => 'DESC',
],
],
'start' => 0,
]
);
$result = $response
->getResponseData()
->getResult();
print_r($result);
} catch (Throwable $e) {
echo 'Error retrieving the template list: ' . $e->getMessage();
}
BX24.callMethod(
'tasks.template.list',
{
params: {
select: ['ID', 'TITLE', 'CREATED_BY', 'RESPONSIBLE_ID', 'ACCOMPLICES', 'AUDITORS', 'REPLICATE', 'GROUP_ID'],
filter: {
CREATED_BY: 1,
REPLICATE: 'N'
},
order: {
ID: 'DESC'
}
},
start: 0
},
function(result)
{
if (result.error())
{
console.error(result.error());
}
else
{
console.log(result.data());
}
}
);
require_once('crest.php');
$result = CRest::call(
'tasks.template.list',
[
'params' => [
'select' => ['ID', 'TITLE', 'CREATED_BY', 'RESPONSIBLE_ID', 'ACCOMPLICES', 'AUDITORS', 'REPLICATE', 'GROUP_ID'],
'filter' => [
'CREATED_BY' => 1,
'REPLICATE' => 'N',
],
'order' => [
'ID' => 'DESC',
],
],
'start' => 0,
]
);
print_r($result);
// client and ctx are already created — see the Go SDK section
res, err := client.Core().Call(ctx, "tasks.template.list", b24.Params{
"params": b24.Params{
"select": []string{"ID", "TITLE", "CREATED_BY", "RESPONSIBLE_ID", "ACCOMPLICES", "AUDITORS", "REPLICATE", "GROUP_ID"},
"filter": b24.Params{
"CREATED_BY": 1,
"REPLICATE": "N",
},
"order": b24.Params{
"ID": "DESC",
},
},
"start": 0,
}, b24.WithIdempotent())
if err != nil {
return fmt.Errorf("tasks.template.list: %w", err)
}
// An empty page comes as an array [], a non-empty one as an object keyed by template ID,
// so unmarshal task_templates into json.RawMessage first
var page struct {
TaskTemplates json.RawMessage `json:"task_templates"`
}
if err := json.Unmarshal(res.Result, &page); err != nil {
return fmt.Errorf("parse response: %w", err)
}
templates := map[string]struct {
ID b24.ID `json:"ID"`
Title string `json:"TITLE"`
}{}
if len(page.TaskTemplates) > 0 && page.TaskTemplates[0] == '{' {
if err := json.Unmarshal(page.TaskTemplates, &templates); err != nil {
return fmt.Errorf("parse templates: %w", err)
}
}
for _, template := range templates {
fmt.Println(template.ID, template.Title)
}
Response Handling
HTTP Status: 200
{
"result": {
"task_templates": {
"77": {
"ID": 77,
"TITLE": "Checklist test template",
"CREATED_BY": "1",
"RESPONSIBLE_ID": "1",
"ACCOMPLICES": [],
"AUDITORS": [],
"REPLICATE": "N",
"GROUP_ID": null
}
}
},
"total": 1,
"time": {
"start": 1795003871,
"finish": 1795003871.889437,
"duration": 0.8894369602203369,
"processing": 0,
"date_start": "2026-11-18T15:11:11+03:00",
"date_finish": "2026-11-18T15:11:11+03:00",
"operating_reset_at": 1795004280,
"operating": 0.1682889461517334
}
}
Returned Data
|
Name |
Description |
|
result |
Root element of the response (detailed description) |
|
next |
The |
|
total |
Total number of templates that match the filter and are available to the user |
|
time |
Information about the request execution time |
Object result
|
Name |
Description |
|
task_templates |
Task templates. The key is the template ID, the value is an object with the fields from If no fields are passed in Unlike tasks.template.get, the fields If there are no templates, an empty array |
Error Handling
HTTP Status: 400
{
"error": "INVALID_QUERY",
"error_description": "Invalid template query parameters"
}
|
Name |
Description |
|
error |
String error code. It consists of digits, Latin letters, and underscores. It may arrive empty — in that case only |
|
error_description |
Error message for the developer. Do not show it to the end user without processing |
Possible Error Codes
|
Status |
Code |
Description |
Value |
|
|
|
Invalid template query parameters |
Possible reasons:
|
|
|
|
Invalid value {x} to match with parameter {params}. Should be value of type array. |
The |
|
|
|
Internal server error. |
The value |
Statuses and System Error Codes
HTTP Status: 4xx, 5xx
The errors described below are returned by the REST API itself, not by the logic of a specific method. They can arrive in response to any method.
|
Status |
Code |
Description |
|
|
|
An internal server error has occurred. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support |
|
|
|
The server returned an unexpected response. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support |
|
|
|
The request intensity limit has been exceeded |
|
|
|
The SQL query inside the method ran longer than the SQL query time limit. The |
|
|
|
The method is blocked because the request resource intensity limit has been exceeded. The block lasts 5 minutes, after which the accumulated execution time of the method is counted from zero |
|
|
|
The same block in REST 3.0 methods. The |
|
|
|
The request contains no authorization data: neither an access token nor a webhook code was passed |
|
|
|
Methods are called over the HTTPS protocol only |
|
|
|
The REST API is blocked due to overload. This is a manual individual block. To have it lifted, contact Bitrix24 technical support |
|
|
|
REST API access is not active for this account. In Bitrix24 Cloud, check the current plan or trial status: Vibe+ plans include REST API access, while Essentials plans do not. A webhook receives a different error message — |
|
|
|
The Bitrix24 Market application is blocked because the number of installed applications exceeds the plan limit. Events are not delivered to such an application. Applications exempt from the limit are not blocked |
|
|
|
No active webhook with the specified user identifier and secret code was found |
|
|
|
No method with this name was found. The name is misspelled, the method does not exist in the REST API, or it is unavailable without the required scope |
|
|
|
The request requires broader permissions than the token has: for a webhook these are the permissions granted to it, for an application it is the scope. For an application, the error message ends with |
|
|
|
The access token has expired |
|
|
|
The application is installed, but the Bitrix24 administrator has granted access to it only to specific users |
|
|
|
The public part of the site is closed. To open it on an on-premise installation, disable the "Temporary closure of the public part of the site" option. Path to the setting: Desktop > Settings > Product Settings > Module Settings > Main Module > Temporary closure of the public part of the site |