Get Task Template by ID tasks.template.get
If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.
Scope:
taskWho can execute the method: a user with permission to view the template
The method tasks.template.get returns the task template data by its ID.
Method Parameters
Required parameters are marked with *
|
Name |
Description |
|
templateId* |
The ID of the task template. The task template ID can be obtained when creating a new template |
|
params |
Additional selection parameters (detailed description) |
Parameter params
|
Name |
Description |
|
select |
An array of fields to return. By default, |
Code Examples
How to Use Examples in Documentation
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"templateId": 139
}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/tasks.template.get
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"templateId": 139,
"auth": "**put_access_token_here**"
}' \
https://**put_your_bitrix24_address**/rest/tasks.template.get
// 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
// Shape of the payload returned in result (match the "response handling" section of the page)
type TaskTemplateResult = {
ID: string
TITLE: string
DESCRIPTION: string
RESPONSIBLE_ID: string
CREATED_BY: string
REPLICATE: string
STATUS: string
}
try {
const response = await $b24.actions.v2.call.make<TaskTemplateResult>({
method: 'tasks.template.get',
params: {
templateId: 139,
},
requestId: Text.getUuidRfc4122()
})
// The payload is available only on a successful response
if (!response.isSuccess) {
console.error(response.getErrorMessages().join('; '))
} else {
const result = response.getData()!.result
console.info(result.ID, result.TITLE, result.RESPONSIBLE_ID)
}
} 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 getTaskTemplate() {
try {
// Initialize the SDK inside a Bitrix24 frame
const $b24 = await B24Js.initializeB24Frame()
const response = await $b24.actions.v2.call.make({
method: 'tasks.template.get',
params: {
templateId: 139,
},
requestId: B24Js.Text.getUuidRfc4122()
})
// The payload is available only on a successful response
if (!response.isSuccess) {
console.error(response.getErrorMessages().join('; '))
return
}
const result = response.getData().result
console.info(result.ID, result.TITLE, result.RESPONSIBLE_ID)
} catch (error) {
// Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
console.error(error)
}
}
document.addEventListener('DOMContentLoaded', getTaskTemplate)
</script>
from b24pysdk.errors import BitrixAPIError, BitrixSDKException
try:
bitrix_response = client.tasks.template.get(template_id=139).response
result = bitrix_response.result
print(result)
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.get',
[
'templateId' => 139
]
);
$result = $response
->getResponseData()
->getResult();
print_r($result);
} catch (Throwable $e) {
echo 'Error retrieving template: ' . $e->getMessage();
}
BX24.callMethod(
'tasks.template.get',
{
templateId: 139
},
function(result)
{
if (result.error())
{
console.error(result.error());
}
else
{
console.log(result.data());
}
}
);
require_once('crest.php');
$result = CRest::call(
'tasks.template.get',
[
'templateId' => 139
]
);
print_r($result);
// client and ctx are already created — see the Go SDK section
res, err := client.Core().Call(ctx, "tasks.template.get", b24.Params{
"templateId": 139,
}, b24.WithIdempotent())
if err != nil {
return fmt.Errorf("tasks.template.get: %w", err)
}
var item struct {
ID b24.ID `json:"ID"`
Title string `json:"TITLE"`
Description string `json:"DESCRIPTION"`
DescriptionInBbcode string `json:"DESCRIPTION_IN_BBCODE"`
Priority string `json:"PRIORITY"`
Status string `json:"STATUS"`
}
if err := json.Unmarshal(res.Result, &item); err != nil {
return fmt.Errorf("parse response: %w", err)
}
fmt.Println(item.ID, item.Title)
Response Handling
HTTP Status: 200
{
"result": {
"ID": "139",
"TITLE": "Preparation of Weekly Project Status",
"DESCRIPTION": "Task template for preparing and agreeing on the weekly project status with the team and manager",
"DESCRIPTION_IN_BBCODE": "Y",
"PRIORITY": "2",
"STATUS": "1",
"STAGE_ID": "0",
"RESPONSIBLE_ID": "102",
"DEADLINE_AFTER": null,
"START_DATE_PLAN_AFTER": "32400",
"END_DATE_PLAN_AFTER": "97200",
"REPLICATE": "Y",
"CREATED_BY": "101",
"XML_ID": null,
"ALLOW_CHANGE_DEADLINE": "Y",
"ALLOW_TIME_TRACKING": "Y",
"TASK_CONTROL": "N",
"ADD_IN_REPORT": "N",
"GROUP_ID": "0",
"PARENT_ID": "8131",
"MULTITASK": "N",
"SITE_ID": "s1",
"ACCOMPLICES": "a:0:{}",
"AUDITORS": "a:0:{}",
"RESPONSIBLES": "a:1:{i:0;s:3:\"102\";}",
"FILES": null,
"TAGS": null,
"DEPENDS_ON": null,
"MATCH_WORK_TIME": "Y",
"TASK_ID": null,
"TPARAM_TYPE": "0",
"TPARAM_REPLICATION_COUNT": "0",
"REPLICATE_PARAMS": "a:19:{s:6:\"PERIOD\";s:6:\"weekly\";s:12:\"WORKDAY_ONLY\";s:1:\"N\";s:9:\"WEEK_DAYS\";a:1:{i:0;i:2;}s:4:\"TIME\";s:5:\"11:00\";s:15:\"TIMEZONE_OFFSET\";i:0;s:11:\"REPEAT_TILL\";s:7:\"endless\";s:10:\"START_DATE\";s:19:\"16.03.2026 00:00:00\";s:9:\"EVERY_DAY\";i:1;s:10:\"EVERY_WEEK\";i:1;s:15:\"MONTHLY_DAY_NUM\";i:1;s:19:\"MONTHLY_MONTH_NUM_1\";i:1;s:19:\"MONTHLY_MONTH_NUM_2\";i:1;s:14:\"YEARLY_DAY_NUM\";i:1;s:8:\"END_DATE\";N;s:12:\"MONTHLY_TYPE\";i:1;s:11:\"YEARLY_TYPE\";i:1;s:14:\"DEADLINE_AFTER\";i:0;s:15:\"DEADLINE_OFFSET\";i:0;s:19:\"NEXT_EXECUTION_TIME\";s:19:\"17.03.2026 11:00:00\";}",
"BASE_TEMPLATE_ID": "0",
"TEMPLATE_CHILDREN_COUNT": "0",
"CREATED_BY_NAME": "John",
"CREATED_BY_LAST_NAME": "Doe",
"CREATED_BY_SECOND_NAME": "Michael",
"CREATED_BY_LOGIN": "john.doe@example.com",
"CREATED_BY_WORK_POSITION": "Employee",
"CREATED_BY_PHOTO": "10001",
"RESPONSIBLE_NAME": "Peter",
"RESPONSIBLE_LAST_NAME": "Smith",
"RESPONSIBLE_SECOND_NAME": "John",
"RESPONSIBLE_LOGIN": "peter.smith@example.com",
"RESPONSIBLE_WORK_POSITION": "Employee",
"RESPONSIBLE_PHOTO": "10002",
"SCENARIO": "default",
"UF_CRM_TASK": [
"L_1179",
"D_1833"
],
"UF_TASK_WEBDAV_FILES": [
1117
]
},
"time": {
"start": 1773219184,
"finish": 1773219184.579376,
"duration": 0.5793759822845459,
"processing": 0,
"date_start": "2026-03-11T11:53:04+01:00",
"date_finish": "2026-03-11T11:53:04+01:00",
"operating_reset_at": 1773219784,
"operating": 0
}
}
Returned Data
|
Name |
Description |
|
result |
Task template data (detailed description). Returns
|
|
time |
Information about the request execution time |
Object result
|
Name |
Description |
|
ID |
The ID of the task template |
|
TITLE |
The name of the template |
|
DESCRIPTION |
The description of the template |
|
DESCRIPTION_IN_BBCODE |
Indicator that the description is stored in BBCode format |
|
PRIORITY |
The priority of the task |
|
STATUS |
The status of the template |
|
STAGE_ID |
The stage ID |
|
RESPONSIBLE_ID |
The ID of the responsible person |
|
DEADLINE_AFTER |
Deadline offset relative to the creation date of the task template |
|
START_DATE_PLAN_AFTER |
Planned start date offset in seconds |
|
END_DATE_PLAN_AFTER |
Planned end date offset in seconds |
|
REPLICATE |
Indicator of a recurring task |
|
CREATED_BY |
The ID of the Creator |
|
XML_ID |
External ID of the template |
|
ALLOW_CHANGE_DEADLINE |
Indicator that the executor can change the deadline |
|
ALLOW_TIME_TRACKING |
Indicator for time tracking for tasks based on the template |
|
TASK_CONTROL |
Indicator of the need to accept the work |
|
ADD_IN_REPORT |
Indicator for including the task in the performance report |
|
GROUP_ID |
The project ID |
|
PARENT_ID |
The ID of the parent template |
|
MULTITASK |
Indicator of a multi-task |
|
SITE_ID |
The site ID |
|
ACCOMPLICES |
Serialized list of Participants |
|
AUDITORS |
Serialized list of auditors |
|
RESPONSIBLES |
Serialized list of responsible persons |
|
FILES |
List of template files |
|
TAGS |
List of template tags |
|
DEPENDS_ON |
List of template dependencies |
|
MATCH_WORK_TIME |
Indicator for considering working time when calculating deadlines |
|
TASK_ID |
The ID of the related task |
|
TPARAM_TYPE |
Type of additional template parameters |
|
TPARAM_REPLICATION_COUNT |
The number of tasks already created by the repetition rule |
|
REPLICATE_PARAMS |
Serialized repetition parameters |
|
BASE_TEMPLATE_ID |
The ID of the base template |
|
TEMPLATE_CHILDREN_COUNT |
The number of child templates |
|
CREATED_BY_NAME |
The name of the Creator |
|
CREATED_BY_LAST_NAME |
The last name of the Creator |
|
CREATED_BY_SECOND_NAME |
The middle name of the Creator |
|
CREATED_BY_LOGIN |
The login of the Creator |
|
CREATED_BY_WORK_POSITION |
The position of the Creator |
|
CREATED_BY_PHOTO |
The ID of the Creator's photo |
|
RESPONSIBLE_NAME |
The name of the responsible person |
|
RESPONSIBLE_LAST_NAME |
The last name of the responsible person |
|
RESPONSIBLE_SECOND_NAME |
The middle name of the responsible person |
|
RESPONSIBLE_LOGIN |
The login of the responsible person |
|
RESPONSIBLE_WORK_POSITION |
The position of the responsible person |
|
RESPONSIBLE_PHOTO |
The ID of the responsible person's photo |
|
SCENARIO |
The scenario for creating the template |
|
UF_CRM_TASK |
Links to CRM objects |
|
UF_TASK_WEBDAV_FILES |
IDs of Drive files linked to the template |
Error Handling
HTTP Status: 400
{
"error": "100",
"error_description": "Could not find value for parameter {templateId}"
}
|
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 |
|
|
|
Could not find value for parameter |
Required parameter |
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 method is blocked because the request resource intensity limit has been exceeded. The block is lifted automatically once the accumulated execution time of the method no longer exceeds the limit |
|
|
|
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 |
|
|
|
The REST API is available only on commercial plans. A webhook receives a different error message — |
|
|
|
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 |