Задачі
Задачі менеджерів за угодами й контактами та типи задач організації.
Типи задач
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
}Поля — як у відповіді Створити задачу