For AI agents: markdown of this page — /docs-content-en/entities/tasks/templates-get.md documentation index — /llms.txt
Get a task template
GET /v1/task-templates/:templateId
Returns a task template by ID.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ParametertemplateId (path) |
Typenumber | Requiredyes | DescriptionTemplate ID, a positive integer. List: GET /v1/task-templates |
Parameterparams (query) |
Typestring | Requiredno | DescriptionURL-encoded JSON object of Bitrix24 parameters, for example {"select":["ID","TITLE"]}. Field names are not converted |
The method accepts no other query parameters.
Examples
curl — personal key
curl "https://vibecode.bitrix24.com/v1/task-templates/75" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl "https://vibecode.bitrix24.com/v1/task-templates/75" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/task-templates/75', {
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
const { success, data } = await res.json()
if (data === false) {
console.log('Template not found')
} else {
console.log(data.TITLE, '— responsible person', data.RESPONSIBLE_ID)
}
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/task-templates/75', {
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { success, data } = await res.json()
Response fields
Standard template field values are strings or null, including numbers and Y/N flags.
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | Descriptiontrue on success |
Fielddata |
Typeobject | false | DescriptionThe template. false — there is no template with this templateId. The response still comes with status 200, not 404 |
Fielddata.ID |
Typestring | DescriptionTemplate ID |
Fielddata.TITLE |
Typestring | DescriptionTitle of the template and of the future task |
Fielddata.DESCRIPTION |
Typestring | null | DescriptionTask description |
Fielddata.DESCRIPTION_IN_BBCODE |
Typestring | DescriptionY — the description contains BB code |
Fielddata.PRIORITY |
Typestring | DescriptionPriority: 0 — low, 1 — normal, 2 — high |
Fielddata.CREATED_BY |
Typestring | DescriptionCreator ID. Get: GET /v1/users/:id |
Fielddata.RESPONSIBLE_ID |
Typestring | DescriptionResponsible person ID. Get: GET /v1/users/:id |
Fielddata.RESPONSIBLES |
Typestring | DescriptionResponsible person IDs in PHP serialization format, for example a:1:{i:0;s:2:"42";}. The template list without select returns the same IDs as an array. Employee list: GET /v1/users |
Fielddata.ACCOMPLICES |
Typestring | DescriptionParticipant IDs in the same format. With no participants — a:0:{}. Employee list: GET /v1/users |
Fielddata.AUDITORS |
Typestring | DescriptionObserver IDs in the same format. Employee list: GET /v1/users |
Fielddata.GROUP_ID |
Typestring | null | DescriptionWorkgroup ID. Get: GET /v1/workgroups/:id |
Fielddata.PARENT_ID |
Typestring | null | DescriptionParent task ID. Get: GET /v1/tasks/:id |
Fielddata.DEPENDS_ON |
Typestring | null | DescriptionIDs of the tasks the future task depends on. Get: GET /v1/tasks/:id |
Fielddata.TIME_ESTIMATE |
Typestring | DescriptionEffort estimate in seconds |
Fielddata.ALLOW_CHANGE_DEADLINE |
Typestring | DescriptionY — the responsible person may move the deadline themselves |
Fielddata.ALLOW_TIME_TRACKING |
Typestring | DescriptionY — time tracking is enabled |
Fielddata.TASK_CONTROL |
Typestring | DescriptionY — once completed, the task returns to the creator for approval |
Fielddata.MATCH_WORK_TIME |
Typestring | DescriptionY — deadline calculation skips weekends and holidays |
Fielddata.ADD_IN_REPORT |
Typestring | DescriptionY — the task is counted in efficiency reports |
Fielddata.MULTITASK |
Typestring | DescriptionY — the task has several responsible persons |
Fielddata.REPLICATE |
Typestring | DescriptionY — a recurring task template |
Fielddata.CREATED_BY_NAME, data.CREATED_BY_LAST_NAME, data.CREATED_BY_SECOND_NAME |
Typestring | null | DescriptionFirst name, last name and middle name of the creator |
Fielddata.CREATED_BY_LOGIN, data.CREATED_BY_WORK_POSITION, data.CREATED_BY_PHOTO |
Typestring | null | DescriptionLogin, job title and photo file ID of the creator |
Fielddata.RESPONSIBLE_NAME, data.RESPONSIBLE_LAST_NAME, data.RESPONSIBLE_SECOND_NAME |
Typestring | null | DescriptionFirst name, last name and middle name of the responsible person |
Fielddata.RESPONSIBLE_LOGIN, data.RESPONSIBLE_WORK_POSITION, data.RESPONSIBLE_PHOTO |
Typestring | null | DescriptionLogin, job title and photo file ID of the responsible person |
Fielddata.UF_* |
Type— | DescriptionTask user fields of the Bitrix24 account. The type depends on the field. An empty field comes as null, false or an empty string |
Fielddata.* |
Typestring | null | DescriptionOther template fields as Bitrix24 stores them: STATUS, STAGE_ID, XML_ID, SITE_ID, DEADLINE_AFTER, START_DATE_PLAN_AFTER, END_DATE_PLAN_AFTER, FILES, TAGS, TASK_ID, TPARAM_TYPE, TPARAM_REPLICATION_COUNT, REPLICATE_PARAMS, BASE_TEMPLATE_ID, TEMPLATE_CHILDREN_COUNT, SCENARIO |
Response example
The main template fields are shown; names and logins are replaced:
{
"success": true,
"data": {
"ID": "75",
"TITLE": "Weekly status report",
"DESCRIPTION": null,
"DESCRIPTION_IN_BBCODE": "Y",
"PRIORITY": "1",
"RESPONSIBLE_ID": "1295",
"CREATED_BY": "1295",
"TIME_ESTIMATE": "0",
"GROUP_ID": null,
"ACCOMPLICES": "a:0:{}",
"AUDITORS": "a:0:{}",
"RESPONSIBLES": "a:1:{i:0;s:4:\"1295\";}",
"DEPENDS_ON": null,
"CREATED_BY_NAME": "Anna",
"CREATED_BY_LAST_NAME": "Clark",
"CREATED_BY_LOGIN": "a.clark@example.com",
"RESPONSIBLE_NAME": "Anna",
"RESPONSIBLE_LAST_NAME": "Clark",
"RESPONSIBLE_LOGIN": "a.clark@example.com"
}
}
Error response example
400 — templateId is not a positive integer:
{
"success": false,
"error": {
"code": "INVALID_PARAMS",
"message": "templateId must be a positive integer"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeINVALID_PARAMS |
DescriptiontemplateId is not a positive integer. Message templateId must be a positive integer |
| HTTP400 | CodeINVALID_PARAMS |
Descriptionparams is not a JSON object. Message params must be a JSON object |
| HTTP400 | CodeINVALID_PARAMS |
Descriptionstart or any query parameter other than params was passed. Messages start is only supported for list, Only params and start are supported |
| HTTP401 | CodeMISSING_API_KEY |
DescriptionThe X-Api-Key header is missing |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe key has no Bitrix24 tokens |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe key does not have the task scope |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 rejected the call. The text is in error.message |
| HTTP429 | CodeRATE_LIMITED |
DescriptionRequest rate exceeded. The effective cap is in the x-ratelimit-limit header |
Full list of common API errors — Errors.
Known specifics
select does not narrow the response to the listed fields. The CREATED_BY_* and RESPONSIBLE_* fields with creator and responsible person data, as well as the RESPONSIBLES, ACCOMPLICES, AUDITORS and SCENARIO fields, are returned even when they are not in select.