К содержанию

Задачи

Задачи менеджеров по сделкам и контактам и типы задач организации.

Типы задач

GET /task-types

Собственные типы задач организации в её порядке: активные, архивные или все; usage=true добавляет, у скольких задач стоит каждый.

Параметры запроса

  • status string

    по умолчанию active

    Значения: active archived all

  • usage boolean

Пример запроса

bash
curl 'https://your-company.altahub.ai/api/v1/task-types' \
  -H 'Authorization: Bearer alta_…'
js
const response = await fetch('https://your-company.altahub.ai/api/v1/task-types', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer alta_…',
  },
});
const data = await response.json();
python
import requests

response = requests.get(
    "https://your-company.altahub.ai/api/v1/task-types",
    headers={"Authorization": "Bearer alta_…"},
)
data = response.json()
php
<?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

Успешный ответ.

json
{
  "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
    }
  ]
}
Поля ответа
  • items object[]

    Вложенные поля: 7
    • archived boolean

    • icon string

    • id string · uuid

    • name string

    • position integer

      ≥ 1

    • usage integer | null

      ≥ 0

    • version integer

      ≥ 1

Список задач

GET /tasks

Свои (scope=mine) или любого исполнителя; фильтры по сроку, словам названия, виду и типу. Со status — страницами; без него — одна страница: открытые, выполненные, отменённые.

Параметры запроса

  • assigneeId string · uuid

  • assigneeIds string[] · uuid

    количество ≤ 100

  • contactId string · uuid

  • cursor string

    длина 1–512

  • dealId string · uuid

  • dueFrom string · date-time

  • dueTo string · date-time

  • kind string

    Значения: task call meeting email reminder chat

  • limit integer

    1–500 · по умолчанию 500

  • noAssignee boolean

  • q string

    длина ≤ 200

  • scope string

    по умолчанию all

    Значения: mine all

  • status string

    Значения: open done canceled

  • typeId string · uuid

Пример запроса

bash
curl 'https://your-company.altahub.ai/api/v1/tasks' \
  -H 'Authorization: Bearer alta_…'
js
const response = await fetch('https://your-company.altahub.ai/api/v1/tasks', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer alta_…',
  },
});
const data = await response.json();
python
import requests

response = requests.get(
    "https://your-company.altahub.ai/api/v1/tasks",
    headers={"Authorization": "Bearer alta_…"},
)
data = response.json()
php
<?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

Успешный ответ.

json
{
  "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
}
Поля ответа
  • items object[]

    Вложенные поля: 21
    • assignee object | null

      Вложенные поля: 2
      • id string · uuid

      • name string

    • canceledAt string · date-time | null

    • completedAt string · date-time | null

    • contact object | null

      Вложенные поля: 2
      • fullName string

      • id string · uuid

    • createdAt string · date-time

    • deal object | null

      Вложенные поля: 4
      • id string · uuid

      • number integer

        ≥ 1

      • title string

      • viewerMay object

        Вложенные поля: 1
        • edit boolean

    • dueAt string · date-time | null

    • followsTaskId string · uuid | null

    • id string · uuid

    • kind string

      Значения: task call meeting email reminder chat

    • notes string | null

    • outcome string | null

      Значения: call message meeting no_answer no_contact

    • reschedules object | null

      Вложенные поля: 3
      • count integer

        ≥ 1

      • lastNote string | null

      • lastReason string | null

        Значения: client_asked no_answer no_time other

    • result string | null

    • status string

      Значения: open done canceled

    • title string

    • type object | null

      Вложенные поля: 4
      • archived boolean

      • icon string

      • id string · uuid

      • name string

    • updatedAt string · date-time

    • version integer

      ≥ 1

    • allDay boolean

    • durationMinutes integer | null

      1–1440

  • nextCursor string | null

Создать задачу

POST /tasks

Нужно только название. Без исполнителя (assigneeId) задача достаётся тому, кто создаёт, для ключа — его автору, и она в его scope=mine (assigneeId: null оставляет задачу без исполнителя). Срок (dueAt), длительность в минутах (durationMinutes, от 1 до 1440) или весь день (allDay), вид (kind) или собственный тип организации (typeId), сделка и контакт. idempotencyKey делает повтор безопасным.

Тело запроса

  • title string обязательно

    длина 1–200 · шаблон \S

  • allDay boolean

  • assigneeId string · uuid | null

  • contactId string · uuid | null

  • dealId string · uuid | null

  • dueAt string · date-time | null

  • durationMinutes integer | null

    1–1440

  • idempotencyKey string

    шаблон ^[\x21-\x7e]{1,255}$

  • kind string

    Значения: task call meeting email reminder chat

  • notes string | null

    длина ≤ 5000

  • typeId string · uuid | null

Пример запроса

bash
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"
}'
js
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();
python
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
<?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

Успешный ответ.

json
{
  "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
}
Поля ответа
  • assignee object | null

    Вложенные поля: 2
    • id string · uuid

    • name string

  • canceledAt string · date-time | null

  • completedAt string · date-time | null

  • contact object | null

    Вложенные поля: 2
    • fullName string

    • id string · uuid

  • createdAt string · date-time

  • deal object | null

    Вложенные поля: 4
    • id string · uuid

    • number integer

      ≥ 1

    • title string

    • viewerMay object

      Вложенные поля: 1
      • edit boolean

  • dueAt string · date-time | null

  • followsTaskId string · uuid | null

  • id string · uuid

  • kind string

    Значения: task call meeting email reminder chat

  • notes string | null

  • outcome string | null

    Значения: call message meeting no_answer no_contact

  • reschedules object | null

    Вложенные поля: 3
    • count integer

      ≥ 1

    • lastNote string | null

    • lastReason string | null

      Значения: client_asked no_answer no_time other

  • result string | null

  • status string

    Значения: open done canceled

  • title string

  • type object | null

    Вложенные поля: 4
    • archived boolean

    • icon string

    • id string · uuid

    • name string

  • updatedAt string · date-time

  • version integer

    ≥ 1

  • allDay boolean

  • durationMinutes integer | null

    1–1440

Получить задачу

GET /tasks/{taskId}

Одна задача по id.

Параметры пути

  • taskId string · uuid обязательно

Пример запроса

bash
curl 'https://your-company.altahub.ai/api/v1/tasks/{taskId}' \
  -H 'Authorization: Bearer alta_…'
js
const response = await fetch('https://your-company.altahub.ai/api/v1/tasks/{taskId}', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer alta_…',
  },
});
const data = await response.json();
python
import requests

response = requests.get(
    "https://your-company.altahub.ai/api/v1/tasks/{taskId}",
    headers={"Authorization": "Bearer alta_…"},
)
data = response.json()
php
<?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

Успешный ответ.

json
{
  "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).

Параметры пути

  • taskId string · uuid обязательно

Тело запроса

  • allDay boolean

  • assigneeId string · uuid | null

  • contactId string · uuid | null

  • dealId string · uuid | null

  • dueAt string · date-time | null

  • kind string

    Значения: task call meeting email reminder chat

  • notes string | null

    длина ≤ 5000

  • rescheduleNote string | null

    длина ≤ 500

  • rescheduleReason string | null

    Значения: client_asked no_answer no_time other

  • title string

    длина 1–200 · шаблон \S

  • typeId string · uuid | null

  • version integer

    ≥ 1

Пример запроса

bash
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": "Клиентка попросила перенести на четверг"
}'
js
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();
python
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
<?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

Успешный ответ.

json
{
  "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.

Параметры пути

  • taskId string · uuid обязательно

Пример запроса

bash
curl -X DELETE 'https://your-company.altahub.ai/api/v1/tasks/{taskId}' \
  -H 'Authorization: Bearer alta_…'
js
const response = await fetch('https://your-company.altahub.ai/api/v1/tasks/{taskId}', {
  method: 'DELETE',
  headers: {
    Authorization: 'Bearer alta_…',
  },
});
python
import requests

response = requests.delete(
    "https://your-company.altahub.ai/api/v1/tasks/{taskId}",
    headers={"Authorization": "Bearer alta_…"},
)
php
<?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.

Параметры пути

  • taskId string · uuid обязательно

Тело запроса

  • idempotencyKey string

    шаблон ^[\x21-\x7e]{1,255}$

  • next object

    Вложенные поля: 7
    • title string обязательно

      длина 1–200 · шаблон \S

    • allDay boolean

    • assigneeId string · uuid | null

    • dueAt string · date-time | null

    • kind string

      Значения: task call meeting email reminder chat

    • notes string | null

      длина ≤ 5000

    • typeId string · uuid | null

  • outcome string

    Значения: call message meeting no_answer no_contact

  • result string | null

    длина ≤ 2000

Пример запроса

bash
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"
}'
js
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();
python
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
<?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

Успешный ответ.

json
{
  "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
  }
}
Поля ответа
  • assignee object | null

    Вложенные поля: 2
    • id string · uuid

    • name string

  • canceledAt string · date-time | null

  • completedAt string · date-time | null

  • contact object | null

    Вложенные поля: 2
    • fullName string

    • id string · uuid

  • createdAt string · date-time

  • deal object | null

    Вложенные поля: 4
    • id string · uuid

    • number integer

      ≥ 1

    • title string

    • viewerMay object

      Вложенные поля: 1
      • edit boolean

  • dueAt string · date-time | null

  • followsTaskId string · uuid | null

  • id string · uuid

  • kind string

    Значения: task call meeting email reminder chat

  • nextTask object | null

    Вложенные поля: 21
    • assignee object | null

      Вложенные поля: 2
      • id string · uuid

      • name string

    • canceledAt string · date-time | null

    • completedAt string · date-time | null

    • contact object | null

      Вложенные поля: 2
      • fullName string

      • id string · uuid

    • createdAt string · date-time

    • deal object | null

      Вложенные поля: 4
      • id string · uuid

      • number integer

        ≥ 1

      • title string

      • viewerMay object

        Вложенные поля: 1
        • edit boolean

    • dueAt string · date-time | null

    • followsTaskId string · uuid | null

    • id string · uuid

    • kind string

      Значения: task call meeting email reminder chat

    • notes string | null

    • outcome string | null

      Значения: call message meeting no_answer no_contact

    • reschedules object | null

      Вложенные поля: 3
      • count integer

        ≥ 1

      • lastNote string | null

      • lastReason string | null

        Значения: client_asked no_answer no_time other

    • result string | null

    • status string

      Значения: open done canceled

    • title string

    • type object | null

      Вложенные поля: 4
      • archived boolean

      • icon string

      • id string · uuid

      • name string

    • updatedAt string · date-time

    • version integer

      ≥ 1

    • allDay boolean

    • durationMinutes integer | null

      1–1440

  • notes string | null

  • outcome string | null

    Значения: call message meeting no_answer no_contact

  • reschedules object | null

    Вложенные поля: 3
    • count integer

      ≥ 1

    • lastNote string | null

    • lastReason string | null

      Значения: client_asked no_answer no_time other

  • result string | null

  • status string

    Значения: open done canceled

  • title string

  • type object | null

    Вложенные поля: 4
    • archived boolean

    • icon string

    • id string · uuid

    • name string

  • updatedAt string · date-time

  • version integer

    ≥ 1

  • allDay boolean

  • durationMinutes integer | null

    1–1440

Вернуть задачу в работу

POST /tasks/{taskId}/reopen

Снова открывает выполненную задачу. Повтор ничего не меняет.

Параметры пути

  • taskId string · uuid обязательно

Пример запроса

bash
curl -X POST 'https://your-company.altahub.ai/api/v1/tasks/{taskId}/reopen' \
  -H 'Authorization: Bearer alta_…' \
  -H 'Content-Type: application/json' \
  -d '{}'
js
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();
python
import requests

response = requests.post(
    "https://your-company.altahub.ai/api/v1/tasks/{taskId}/reopen",
    headers={"Authorization": "Bearer alta_…"},
    json={},
)
data = response.json()
php
<?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

Успешный ответ.

json
{
  "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

Возвращает удалённую задачу. Повтор ничего не меняет.

Параметры пути

  • taskId string · uuid обязательно

Пример запроса

bash
curl -X POST 'https://your-company.altahub.ai/api/v1/tasks/{taskId}/restore' \
  -H 'Authorization: Bearer alta_…' \
  -H 'Content-Type: application/json' \
  -d '{}'
js
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();
python
import requests

response = requests.post(
    "https://your-company.altahub.ai/api/v1/tasks/{taskId}/restore",
    headers={"Authorization": "Bearer alta_…"},
    json={},
)
data = response.json()
php
<?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

Успешный ответ.

json
{
  "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
}

Поля — как в ответе Создать задачу