Задачи
Задачи менеджеров по сделкам и контактам и типы задач организации.
Типы задач
GET /task-types
Собственные типы задач организации в её порядке: активные, архивные или все; usage=true добавляет, у скольких задач стоит каждый.
Параметры запроса
statusstringпо умолчанию
activeЗначения:
activearchivedallusageboolean
Пример запроса
curl 'https://your-company.altahub.ai/api/v1/task-types' \
-H 'Authorization: Bearer alta_…'const response = await fetch('https://your-company.altahub.ai/api/v1/task-types', {
method: 'GET',
headers: {
Authorization: 'Bearer alta_…',
},
});
const data = await response.json();import requests
response = requests.get(
"https://your-company.altahub.ai/api/v1/task-types",
headers={"Authorization": "Bearer alta_…"},
)
data = response.json()<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://your-company.altahub.ai/api/v1/task-types', [
'headers' => ['Authorization' => 'Bearer alta_…'],
]);
$data = json_decode((string) $response->getBody(), true);Ответ 200
Успешный ответ.
{
"items": [
{
"id": "0192f3a1-7c2e-7b4d-9a61-00000000003e",
"name": "Встреча в офисе",
"icon": "users",
"position": 1,
"archived": false,
"usage": null,
"version": 1
},
{
"id": "0192f3a1-7c2e-7b4d-9a61-00000000003f",
"name": "Демонстрация",
"icon": "presentation",
"position": 2,
"archived": false,
"usage": null,
"version": 1
}
]
}Поля ответа
itemsobject[]Вложенные поля: 7
archivedbooleaniconstringidstring · uuidnamestringpositioninteger≥ 1
usageinteger | null≥ 0
versioninteger≥ 1
Список задач
GET /tasks
Свои (scope=mine) или любого исполнителя; фильтры по сроку, словам названия, виду и типу. Со status — страницами; без него — одна страница: открытые, выполненные, отменённые.
Параметры запроса
assigneeIdstring · uuidassigneeIdsstring[] · uuidколичество ≤ 100
contactIdstring · uuidcursorstringдлина 1–512
dealIdstring · uuiddueFromstring · date-timedueTostring · date-timekindstringЗначения:
taskcallmeetingemailreminderchatlimitinteger1–500 · по умолчанию
500noAssigneebooleanqstringдлина ≤ 200
scopestringпо умолчанию
allЗначения:
mineallstatusstringЗначения:
opendonecanceledtypeIdstring · uuid
Пример запроса
curl 'https://your-company.altahub.ai/api/v1/tasks' \
-H 'Authorization: Bearer alta_…'const response = await fetch('https://your-company.altahub.ai/api/v1/tasks', {
method: 'GET',
headers: {
Authorization: 'Bearer alta_…',
},
});
const data = await response.json();import requests
response = requests.get(
"https://your-company.altahub.ai/api/v1/tasks",
headers={"Authorization": "Bearer alta_…"},
)
data = response.json()<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://your-company.altahub.ai/api/v1/tasks', [
'headers' => ['Authorization' => 'Bearer alta_…'],
]);
$data = json_decode((string) $response->getBody(), true);Ответ 200
Успешный ответ.
{
"items": [
{
"id": "0192f3a1-7c2e-7b4d-9a61-00000000003c",
"title": "Перезвонить по счёту",
"kind": "call",
"type": null,
"status": "open",
"dueAt": "2026-10-28T10:00:00Z",
"allDay": false,
"durationMinutes": 30,
"notes": "Уточнить количество кофемашин",
"assignee": {
"id": "0192f3a1-7c2e-7b4d-9a61-000000000002",
"name": "Ирина Мельник"
},
"deal": {
"id": "0192f3a1-7c2e-7b4d-9a61-000000000014",
"number": 1042,
"title": "Кофемашины для сети кофеен"
},
"contact": {
"id": "0192f3a1-7c2e-7b4d-9a61-00000000000a",
"fullName": "Елена Коваль"
},
"outcome": null,
"result": null,
"reschedules": null,
"followsTaskId": null,
"completedAt": null,
"canceledAt": null,
"createdAt": "2026-10-21T12:40:00Z",
"updatedAt": "2026-10-21T12:40:00Z",
"version": 1
}
],
"nextCursor": null
}Поля ответа
itemsobject[]Вложенные поля: 21
assigneeobject | nullВложенные поля: 2
idstring · uuidnamestring
canceledAtstring · date-time | nullcompletedAtstring · date-time | nullcontactobject | nullВложенные поля: 2
fullNamestringidstring · uuid
createdAtstring · date-timedealobject | nullВложенные поля: 4
idstring · uuidnumberinteger≥ 1
titlestringviewerMayobjectВложенные поля: 1
editboolean
dueAtstring · date-time | nullfollowsTaskIdstring · uuid | nullidstring · uuidkindstringЗначения:
taskcallmeetingemailreminderchatnotesstring | nulloutcomestring | nullЗначения:
callmessagemeetingno_answerno_contactreschedulesobject | nullВложенные поля: 3
countinteger≥ 1
lastNotestring | nulllastReasonstring | nullЗначения:
client_askedno_answerno_timeother
resultstring | nullstatusstringЗначения:
opendonecanceledtitlestringtypeobject | nullВложенные поля: 4
archivedbooleaniconstringidstring · uuidnamestring
updatedAtstring · date-timeversioninteger≥ 1
allDaybooleandurationMinutesinteger | null1–1440
nextCursorstring | null
Создать задачу
POST /tasks
Нужно только название. Без исполнителя (assigneeId) задача достаётся тому, кто создаёт, для ключа — его автору, и она в его scope=mine (assigneeId: null оставляет задачу без исполнителя). Срок (dueAt), длительность в минутах (durationMinutes, от 1 до 1440) или весь день (allDay), вид (kind) или собственный тип организации (typeId), сделка и контакт. idempotencyKey делает повтор безопасным.
Тело запроса
titlestring обязательнодлина 1–200 · шаблон
\SallDaybooleanassigneeIdstring · uuid | nullcontactIdstring · uuid | nulldealIdstring · uuid | nulldueAtstring · date-time | nulldurationMinutesinteger | null1–1440
idempotencyKeystringшаблон
^[\x21-\x7e]{1,255}$kindstringЗначения:
taskcallmeetingemailreminderchatnotesstring | nullдлина ≤ 5000
typeIdstring · uuid | null
Пример запроса
curl -X POST 'https://your-company.altahub.ai/api/v1/tasks' \
-H 'Authorization: Bearer alta_…' \
-H 'Content-Type: application/json' \
-d '{
"title": "Перезвонить по счёту",
"kind": "call",
"dueAt": "2026-10-28T10:00:00Z",
"assigneeId": "0192f3a1-7c2e-7b4d-9a61-000000000002",
"dealId": "0192f3a1-7c2e-7b4d-9a61-000000000014",
"contactId": "0192f3a1-7c2e-7b4d-9a61-00000000000a",
"idempotencyKey": "6f1c2a9e-3b7d-4e58-9c0a-5d4b3e2f1a07"
}'const response = await fetch('https://your-company.altahub.ai/api/v1/tasks', {
method: 'POST',
headers: {
Authorization: 'Bearer alta_…',
'Content-Type': 'application/json',
},
body: JSON.stringify({
title: 'Перезвонить по счёту',
kind: 'call',
dueAt: '2026-10-28T10:00:00Z',
assigneeId: '0192f3a1-7c2e-7b4d-9a61-000000000002',
dealId: '0192f3a1-7c2e-7b4d-9a61-000000000014',
contactId: '0192f3a1-7c2e-7b4d-9a61-00000000000a',
idempotencyKey: '6f1c2a9e-3b7d-4e58-9c0a-5d4b3e2f1a07',
}),
});
const data = await response.json();import requests
response = requests.post(
"https://your-company.altahub.ai/api/v1/tasks",
headers={"Authorization": "Bearer alta_…"},
json={
"title": "Перезвонить по счёту",
"kind": "call",
"dueAt": "2026-10-28T10:00:00Z",
"assigneeId": "0192f3a1-7c2e-7b4d-9a61-000000000002",
"dealId": "0192f3a1-7c2e-7b4d-9a61-000000000014",
"contactId": "0192f3a1-7c2e-7b4d-9a61-00000000000a",
"idempotencyKey": "6f1c2a9e-3b7d-4e58-9c0a-5d4b3e2f1a07",
},
)
data = response.json()<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://your-company.altahub.ai/api/v1/tasks', [
'headers' => ['Authorization' => 'Bearer alta_…'],
'json' => [
'title' => 'Перезвонить по счёту',
'kind' => 'call',
'dueAt' => '2026-10-28T10:00:00Z',
'assigneeId' => '0192f3a1-7c2e-7b4d-9a61-000000000002',
'dealId' => '0192f3a1-7c2e-7b4d-9a61-000000000014',
'contactId' => '0192f3a1-7c2e-7b4d-9a61-00000000000a',
'idempotencyKey' => '6f1c2a9e-3b7d-4e58-9c0a-5d4b3e2f1a07',
],
]);
$data = json_decode((string) $response->getBody(), true);Ответ 201
Успешный ответ.
{
"id": "0192f3a1-7c2e-7b4d-9a61-00000000003c",
"title": "Перезвонить по счёту",
"kind": "call",
"type": null,
"status": "open",
"dueAt": "2026-10-28T10:00:00Z",
"allDay": false,
"durationMinutes": 30,
"notes": "Уточнить количество кофемашин",
"assignee": {
"id": "0192f3a1-7c2e-7b4d-9a61-000000000002",
"name": "Ирина Мельник"
},
"deal": {
"id": "0192f3a1-7c2e-7b4d-9a61-000000000014",
"number": 1042,
"title": "Кофемашины для сети кофеен"
},
"contact": {
"id": "0192f3a1-7c2e-7b4d-9a61-00000000000a",
"fullName": "Елена Коваль"
},
"outcome": null,
"result": null,
"reschedules": null,
"followsTaskId": null,
"completedAt": null,
"canceledAt": null,
"createdAt": "2026-10-21T12:40:00Z",
"updatedAt": "2026-10-21T12:40:00Z",
"version": 1
}Поля ответа
assigneeobject | nullВложенные поля: 2
idstring · uuidnamestring
canceledAtstring · date-time | nullcompletedAtstring · date-time | nullcontactobject | nullВложенные поля: 2
fullNamestringidstring · uuid
createdAtstring · date-timedealobject | nullВложенные поля: 4
idstring · uuidnumberinteger≥ 1
titlestringviewerMayobjectВложенные поля: 1
editboolean
dueAtstring · date-time | nullfollowsTaskIdstring · uuid | nullidstring · uuidkindstringЗначения:
taskcallmeetingemailreminderchatnotesstring | nulloutcomestring | nullЗначения:
callmessagemeetingno_answerno_contactreschedulesobject | nullВложенные поля: 3
countinteger≥ 1
lastNotestring | nulllastReasonstring | nullЗначения:
client_askedno_answerno_timeother
resultstring | nullstatusstringЗначения:
opendonecanceledtitlestringtypeobject | nullВложенные поля: 4
archivedbooleaniconstringidstring · uuidnamestring
updatedAtstring · date-timeversioninteger≥ 1
allDaybooleandurationMinutesinteger | null1–1440
Получить задачу
GET /tasks/{taskId}
Одна задача по id.
Параметры пути
taskIdstring · uuid обязательно
Пример запроса
curl 'https://your-company.altahub.ai/api/v1/tasks/{taskId}' \
-H 'Authorization: Bearer alta_…'const response = await fetch('https://your-company.altahub.ai/api/v1/tasks/{taskId}', {
method: 'GET',
headers: {
Authorization: 'Bearer alta_…',
},
});
const data = await response.json();import requests
response = requests.get(
"https://your-company.altahub.ai/api/v1/tasks/{taskId}",
headers={"Authorization": "Bearer alta_…"},
)
data = response.json()<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://your-company.altahub.ai/api/v1/tasks/{taskId}', [
'headers' => ['Authorization' => 'Bearer alta_…'],
]);
$data = json_decode((string) $response->getBody(), true);Ответ 200
Успешный ответ.
{
"id": "0192f3a1-7c2e-7b4d-9a61-00000000003c",
"title": "Перезвонить по счёту",
"kind": "call",
"type": null,
"status": "open",
"dueAt": "2026-10-28T10:00:00Z",
"allDay": false,
"durationMinutes": 30,
"notes": "Уточнить количество кофемашин",
"assignee": {
"id": "0192f3a1-7c2e-7b4d-9a61-000000000002",
"name": "Ирина Мельник"
},
"deal": {
"id": "0192f3a1-7c2e-7b4d-9a61-000000000014",
"number": 1042,
"title": "Кофемашины для сети кофеен"
},
"contact": {
"id": "0192f3a1-7c2e-7b4d-9a61-00000000000a",
"fullName": "Елена Коваль"
},
"outcome": null,
"result": null,
"reschedules": null,
"followsTaskId": null,
"completedAt": null,
"canceledAt": null,
"createdAt": "2026-10-21T12:40:00Z",
"updatedAt": "2026-10-21T12:40:00Z",
"version": 1
}Поля — как в ответе Создать задачу
Изменить задачу
PATCH /tasks/{taskId}
Название, вид, тип, заметка, срок, исполнитель, сделка и контакт — только то, что меняется. version необязателен: с ним изменение пройдёт, только если запись не меняли после вашего чтения (иначе 409 CONFLICT). Срок открытой задачи, сдвинутый позже, — это перенос: причина в rescheduleReason (для other нужен ещё комментарий rescheduleNote).
Параметры пути
taskIdstring · uuid обязательно
Тело запроса
allDaybooleanassigneeIdstring · uuid | nullcontactIdstring · uuid | nulldealIdstring · uuid | nulldueAtstring · date-time | nullkindstringЗначения:
taskcallmeetingemailreminderchatnotesstring | nullдлина ≤ 5000
rescheduleNotestring | nullдлина ≤ 500
rescheduleReasonstring | nullЗначения:
client_askedno_answerno_timeothertitlestringдлина 1–200 · шаблон
\StypeIdstring · uuid | nullversioninteger≥ 1
Пример запроса
curl -X PATCH 'https://your-company.altahub.ai/api/v1/tasks/{taskId}' \
-H 'Authorization: Bearer alta_…' \
-H 'Content-Type: application/json' \
-d '{
"dueAt": "2026-10-30T10:00:00Z",
"rescheduleReason": "client_asked",
"rescheduleNote": "Клиентка попросила перенести на четверг"
}'const response = await fetch('https://your-company.altahub.ai/api/v1/tasks/{taskId}', {
method: 'PATCH',
headers: {
Authorization: 'Bearer alta_…',
'Content-Type': 'application/json',
},
body: JSON.stringify({
dueAt: '2026-10-30T10:00:00Z',
rescheduleReason: 'client_asked',
rescheduleNote: 'Клиентка попросила перенести на четверг',
}),
});
const data = await response.json();import requests
response = requests.patch(
"https://your-company.altahub.ai/api/v1/tasks/{taskId}",
headers={"Authorization": "Bearer alta_…"},
json={
"dueAt": "2026-10-30T10:00:00Z",
"rescheduleReason": "client_asked",
"rescheduleNote": "Клиентка попросила перенести на четверг",
},
)
data = response.json()<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('PATCH', 'https://your-company.altahub.ai/api/v1/tasks/{taskId}', [
'headers' => ['Authorization' => 'Bearer alta_…'],
'json' => [
'dueAt' => '2026-10-30T10:00:00Z',
'rescheduleReason' => 'client_asked',
'rescheduleNote' => 'Клиентка попросила перенести на четверг',
],
]);
$data = json_decode((string) $response->getBody(), true);Ответ 200
Успешный ответ.
{
"id": "0192f3a1-7c2e-7b4d-9a61-00000000003c",
"title": "Перезвонить по счёту",
"kind": "call",
"type": null,
"status": "open",
"dueAt": "2026-10-30T10:00:00Z",
"allDay": false,
"durationMinutes": 30,
"notes": "Уточнить количество кофемашин",
"assignee": {
"id": "0192f3a1-7c2e-7b4d-9a61-000000000002",
"name": "Ирина Мельник"
},
"deal": {
"id": "0192f3a1-7c2e-7b4d-9a61-000000000014",
"number": 1042,
"title": "Кофемашины для сети кофеен"
},
"contact": {
"id": "0192f3a1-7c2e-7b4d-9a61-00000000000a",
"fullName": "Елена Коваль"
},
"outcome": null,
"result": null,
"reschedules": {
"count": 1,
"lastReason": "client_asked",
"lastNote": "Клиентка попросила перенести на четверг"
},
"followsTaskId": null,
"completedAt": null,
"canceledAt": null,
"createdAt": "2026-10-21T12:40:00Z",
"updatedAt": "2026-10-24T16:45:00Z",
"version": 2
}Поля — как в ответе Создать задачу
Удалить задачу
DELETE /tasks/{taskId}
Задача пропадает из всех списков; её можно восстановить. Повтор отвечает 204.
Параметры пути
taskIdstring · uuid обязательно
Пример запроса
curl -X DELETE 'https://your-company.altahub.ai/api/v1/tasks/{taskId}' \
-H 'Authorization: Bearer alta_…'const response = await fetch('https://your-company.altahub.ai/api/v1/tasks/{taskId}', {
method: 'DELETE',
headers: {
Authorization: 'Bearer alta_…',
},
});import requests
response = requests.delete(
"https://your-company.altahub.ai/api/v1/tasks/{taskId}",
headers={"Authorization": "Bearer alta_…"},
)<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('DELETE', 'https://your-company.altahub.ai/api/v1/tasks/{taskId}', [
'headers' => ['Authorization' => 'Bearer alta_…'],
]);Ответ 204
Успешный ответ, без тела.
Выполнить задачу
POST /tasks/{taskId}/complete
Как прошёл контакт (outcome: звонок, сообщение, встреча, не ответил, не удалось связаться), чем закончилось (result) и, если нужно, следующая задача (next; без assigneeId — тому, кто выполняет, для ключа — его автору) по той же сделке — всё вместе или ничего. С idempotencyKey повтор безопасен, а outcome обязателен; задачу, которую уже выполнил кто-то другой, — 409.
Параметры пути
taskIdstring · uuid обязательно
Тело запроса
idempotencyKeystringшаблон
^[\x21-\x7e]{1,255}$nextobjectВложенные поля: 7
titlestring обязательнодлина 1–200 · шаблон
\SallDaybooleanassigneeIdstring · uuid | nulldueAtstring · date-time | nullkindstringЗначения:
taskcallmeetingemailreminderchatnotesstring | nullдлина ≤ 5000
typeIdstring · uuid | null
outcomestringЗначения:
callmessagemeetingno_answerno_contactresultstring | nullдлина ≤ 2000
Пример запроса
curl -X POST 'https://your-company.altahub.ai/api/v1/tasks/{taskId}/complete' \
-H 'Authorization: Bearer alta_…' \
-H 'Content-Type: application/json' \
-d '{
"outcome": "call",
"result": "Согласовали три кофемашины, ждёт счёт",
"next": {
"title": "Отправить счёт",
"kind": "email",
"dueAt": "2026-10-29T09:00:00Z",
"assigneeId": "0192f3a1-7c2e-7b4d-9a61-000000000002"
},
"idempotencyKey": "6f1c2a9e-3b7d-4e58-9c0a-5d4b3e2f1a07"
}'const response = await fetch('https://your-company.altahub.ai/api/v1/tasks/{taskId}/complete', {
method: 'POST',
headers: {
Authorization: 'Bearer alta_…',
'Content-Type': 'application/json',
},
body: JSON.stringify({
outcome: 'call',
result: 'Согласовали три кофемашины, ждёт счёт',
next: {
title: 'Отправить счёт',
kind: 'email',
dueAt: '2026-10-29T09:00:00Z',
assigneeId: '0192f3a1-7c2e-7b4d-9a61-000000000002',
},
idempotencyKey: '6f1c2a9e-3b7d-4e58-9c0a-5d4b3e2f1a07',
}),
});
const data = await response.json();import requests
response = requests.post(
"https://your-company.altahub.ai/api/v1/tasks/{taskId}/complete",
headers={"Authorization": "Bearer alta_…"},
json={
"outcome": "call",
"result": "Согласовали три кофемашины, ждёт счёт",
"next": {
"title": "Отправить счёт",
"kind": "email",
"dueAt": "2026-10-29T09:00:00Z",
"assigneeId": "0192f3a1-7c2e-7b4d-9a61-000000000002",
},
"idempotencyKey": "6f1c2a9e-3b7d-4e58-9c0a-5d4b3e2f1a07",
},
)
data = response.json()<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://your-company.altahub.ai/api/v1/tasks/{taskId}/complete', [
'headers' => ['Authorization' => 'Bearer alta_…'],
'json' => [
'outcome' => 'call',
'result' => 'Согласовали три кофемашины, ждёт счёт',
'next' => [
'title' => 'Отправить счёт',
'kind' => 'email',
'dueAt' => '2026-10-29T09:00:00Z',
'assigneeId' => '0192f3a1-7c2e-7b4d-9a61-000000000002',
],
'idempotencyKey' => '6f1c2a9e-3b7d-4e58-9c0a-5d4b3e2f1a07',
],
]);
$data = json_decode((string) $response->getBody(), true);Ответ 200
Успешный ответ.
{
"id": "0192f3a1-7c2e-7b4d-9a61-00000000003c",
"title": "Перезвонить по счёту",
"kind": "call",
"type": null,
"status": "done",
"dueAt": "2026-10-28T10:00:00Z",
"allDay": false,
"durationMinutes": 30,
"notes": "Уточнить количество кофемашин",
"assignee": {
"id": "0192f3a1-7c2e-7b4d-9a61-000000000002",
"name": "Ирина Мельник"
},
"deal": {
"id": "0192f3a1-7c2e-7b4d-9a61-000000000014",
"number": 1042,
"title": "Кофемашины для сети кофеен"
},
"contact": {
"id": "0192f3a1-7c2e-7b4d-9a61-00000000000a",
"fullName": "Елена Коваль"
},
"outcome": "call",
"result": "Согласовали три кофемашины, ждёт счёт",
"reschedules": null,
"followsTaskId": null,
"completedAt": "2026-10-24T16:45:00Z",
"canceledAt": null,
"createdAt": "2026-10-21T12:40:00Z",
"updatedAt": "2026-10-24T16:45:00Z",
"version": 2,
"nextTask": {
"id": "0192f3a1-7c2e-7b4d-9a61-00000000003d",
"title": "Отправить счёт",
"kind": "email",
"type": null,
"status": "open",
"dueAt": "2026-10-29T09:00:00Z",
"allDay": false,
"durationMinutes": null,
"notes": null,
"assignee": {
"id": "0192f3a1-7c2e-7b4d-9a61-000000000002",
"name": "Ирина Мельник"
},
"deal": {
"id": "0192f3a1-7c2e-7b4d-9a61-000000000014",
"number": 1042,
"title": "Кофемашины для сети кофеен"
},
"contact": {
"id": "0192f3a1-7c2e-7b4d-9a61-00000000000a",
"fullName": "Елена Коваль"
},
"outcome": null,
"result": null,
"reschedules": null,
"followsTaskId": "0192f3a1-7c2e-7b4d-9a61-00000000003c",
"completedAt": null,
"canceledAt": null,
"createdAt": "2026-10-24T16:45:00Z",
"updatedAt": "2026-10-24T16:45:00Z",
"version": 1
}
}Поля ответа
assigneeobject | nullВложенные поля: 2
idstring · uuidnamestring
canceledAtstring · date-time | nullcompletedAtstring · date-time | nullcontactobject | nullВложенные поля: 2
fullNamestringidstring · uuid
createdAtstring · date-timedealobject | nullВложенные поля: 4
idstring · uuidnumberinteger≥ 1
titlestringviewerMayobjectВложенные поля: 1
editboolean
dueAtstring · date-time | nullfollowsTaskIdstring · uuid | nullidstring · uuidkindstringЗначения:
taskcallmeetingemailreminderchatnextTaskobject | nullВложенные поля: 21
assigneeobject | nullВложенные поля: 2
idstring · uuidnamestring
canceledAtstring · date-time | nullcompletedAtstring · date-time | nullcontactobject | nullВложенные поля: 2
fullNamestringidstring · uuid
createdAtstring · date-timedealobject | nullВложенные поля: 4
idstring · uuidnumberinteger≥ 1
titlestringviewerMayobjectВложенные поля: 1
editboolean
dueAtstring · date-time | nullfollowsTaskIdstring · uuid | nullidstring · uuidkindstringЗначения:
taskcallmeetingemailreminderchatnotesstring | nulloutcomestring | nullЗначения:
callmessagemeetingno_answerno_contactreschedulesobject | nullВложенные поля: 3
countinteger≥ 1
lastNotestring | nulllastReasonstring | nullЗначения:
client_askedno_answerno_timeother
resultstring | nullstatusstringЗначения:
opendonecanceledtitlestringtypeobject | nullВложенные поля: 4
archivedbooleaniconstringidstring · uuidnamestring
updatedAtstring · date-timeversioninteger≥ 1
allDaybooleandurationMinutesinteger | null1–1440
notesstring | nulloutcomestring | nullЗначения:
callmessagemeetingno_answerno_contactreschedulesobject | nullВложенные поля: 3
countinteger≥ 1
lastNotestring | nulllastReasonstring | nullЗначения:
client_askedno_answerno_timeother
resultstring | nullstatusstringЗначения:
opendonecanceledtitlestringtypeobject | nullВложенные поля: 4
archivedbooleaniconstringidstring · uuidnamestring
updatedAtstring · date-timeversioninteger≥ 1
allDaybooleandurationMinutesinteger | null1–1440
Вернуть задачу в работу
POST /tasks/{taskId}/reopen
Снова открывает выполненную задачу. Повтор ничего не меняет.
Параметры пути
taskIdstring · uuid обязательно
Пример запроса
curl -X POST 'https://your-company.altahub.ai/api/v1/tasks/{taskId}/reopen' \
-H 'Authorization: Bearer alta_…' \
-H 'Content-Type: application/json' \
-d '{}'const response = await fetch('https://your-company.altahub.ai/api/v1/tasks/{taskId}/reopen', {
method: 'POST',
headers: {
Authorization: 'Bearer alta_…',
'Content-Type': 'application/json',
},
body: JSON.stringify({}),
});
const data = await response.json();import requests
response = requests.post(
"https://your-company.altahub.ai/api/v1/tasks/{taskId}/reopen",
headers={"Authorization": "Bearer alta_…"},
json={},
)
data = response.json()<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://your-company.altahub.ai/api/v1/tasks/{taskId}/reopen', [
'headers' => ['Authorization' => 'Bearer alta_…'],
'json' => new \stdClass(),
]);
$data = json_decode((string) $response->getBody(), true);Ответ 200
Успешный ответ.
{
"id": "0192f3a1-7c2e-7b4d-9a61-00000000003c",
"title": "Перезвонить по счёту",
"kind": "call",
"type": null,
"status": "open",
"dueAt": "2026-10-28T10:00:00Z",
"allDay": false,
"durationMinutes": 30,
"notes": "Уточнить количество кофемашин",
"assignee": {
"id": "0192f3a1-7c2e-7b4d-9a61-000000000002",
"name": "Ирина Мельник"
},
"deal": {
"id": "0192f3a1-7c2e-7b4d-9a61-000000000014",
"number": 1042,
"title": "Кофемашины для сети кофеен"
},
"contact": {
"id": "0192f3a1-7c2e-7b4d-9a61-00000000000a",
"fullName": "Елена Коваль"
},
"outcome": null,
"result": null,
"reschedules": null,
"followsTaskId": null,
"completedAt": null,
"canceledAt": null,
"createdAt": "2026-10-21T12:40:00Z",
"updatedAt": "2026-10-24T16:45:00Z",
"version": 3
}Поля — как в ответе Создать задачу
Восстановить задачу
POST /tasks/{taskId}/restore
Возвращает удалённую задачу. Повтор ничего не меняет.
Параметры пути
taskIdstring · uuid обязательно
Пример запроса
curl -X POST 'https://your-company.altahub.ai/api/v1/tasks/{taskId}/restore' \
-H 'Authorization: Bearer alta_…' \
-H 'Content-Type: application/json' \
-d '{}'const response = await fetch('https://your-company.altahub.ai/api/v1/tasks/{taskId}/restore', {
method: 'POST',
headers: {
Authorization: 'Bearer alta_…',
'Content-Type': 'application/json',
},
body: JSON.stringify({}),
});
const data = await response.json();import requests
response = requests.post(
"https://your-company.altahub.ai/api/v1/tasks/{taskId}/restore",
headers={"Authorization": "Bearer alta_…"},
json={},
)
data = response.json()<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://your-company.altahub.ai/api/v1/tasks/{taskId}/restore', [
'headers' => ['Authorization' => 'Bearer alta_…'],
'json' => new \stdClass(),
]);
$data = json_decode((string) $response->getBody(), true);Ответ 200
Успешный ответ.
{
"id": "0192f3a1-7c2e-7b4d-9a61-00000000003c",
"title": "Перезвонить по счёту",
"kind": "call",
"type": null,
"status": "open",
"dueAt": "2026-10-28T10:00:00Z",
"allDay": false,
"durationMinutes": 30,
"notes": "Уточнить количество кофемашин",
"assignee": {
"id": "0192f3a1-7c2e-7b4d-9a61-000000000002",
"name": "Ирина Мельник"
},
"deal": {
"id": "0192f3a1-7c2e-7b4d-9a61-000000000014",
"number": 1042,
"title": "Кофемашины для сети кофеен"
},
"contact": {
"id": "0192f3a1-7c2e-7b4d-9a61-00000000000a",
"fullName": "Елена Коваль"
},
"outcome": null,
"result": null,
"reschedules": null,
"followsTaskId": null,
"completedAt": null,
"canceledAt": null,
"createdAt": "2026-10-21T12:40:00Z",
"updatedAt": "2026-10-21T12:40:00Z",
"version": 3
}Поля — как в ответе Создать задачу