До змісту
Скачати OpenAPI

Історія

Що й коли сталося із записом і хто це зробив: історія угоди, історія контакту та журнал подій усієї організації. Зміни компаній і задач — у журналі.

Журнал подій

GET /activity-log

Усі зміни в організації, нові зверху, сторінками: угоди, контакти, компанії й задачі, коментарі, налаштування, команда, мотивація та вивантаження угод — хто, коли, у якому записі й що змінив; імпортована історія — з автором і часом із попередньої системи. Фільтри: хто (actorIds, actorGroups), які записи (kinds: deal, contact, company, task…), що сталося (actions), яке поле (field), період (from, to). Історія компаній і задач — тут, з kinds=company чи kinds=task.

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

  • actions string[]

    кількість ≤ 8 · без повторів

    Значення: created changed stage assigned deleted restored completed comment

  • actorGroups string[]

    кількість ≤ 3 · без повторів

    Значення: import automation system

  • actorIds string[] · uuid

    кількість ≤ 50 · без повторів

  • cursor string

    довжина 1–512

  • field string

    шаблон ^(?:[A-Za-z]{1,40}|cf:[0-9a-fA-F-]{36})$

  • from string · date-time

  • kinds string[]

    кількість ≤ 7 · без повторів

    Значення: deal contact company task settings team compensation

  • limit integer

    1–100 · типово 50

  • to string · date-time

Приклад запиту

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

response = requests.get(
    "https://your-company.altahub.ai/api/v1/activity-log",
    headers={"Authorization": "Bearer alta_…"},
)
data = response.json()
php
<?php
$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://your-company.altahub.ai/api/v1/activity-log', [
    'headers' => ['Authorization' => 'Bearer alta_…'],
]);
$data = json_decode((string) $response->getBody(), true);

Відповідь 200

Успішна відповідь.

json
{
  "items": [
    {
      "id": "0192f3a1-7c2e-7b4d-9a61-000000000055",
      "at": "2026-10-24T16:45:00Z",
      "actor": {
        "kind": "member",
        "id": "0192f3a1-7c2e-7b4d-9a61-000000000002",
        "name": "Ірина Мельник",
        "former": false
      },
      "importedFrom": null,
      "record": {
        "type": "task",
        "id": "0192f3a1-7c2e-7b4d-9a61-00000000003c",
        "title": "Передзвонити щодо рахунку",
        "state": "live"
      },
      "kind": "task",
      "history": null,
      "task": {
        "id": "0192f3a1-7c2e-7b4d-9a61-00000000003c",
        "title": "Передзвонити щодо рахунку",
        "kind": "call",
        "type": null,
        "event": "completed",
        "attributes": [],
        "outcome": "call",
        "next": {
          "id": "0192f3a1-7c2e-7b4d-9a61-00000000003d",
          "title": "Надіслати рахунок",
          "dueAt": "2026-10-29T09:00:00Z"
        },
        "reschedule": null
      },
      "comment": null,
      "settings": null,
      "team": null,
      "compensation": null,
      "export": null
    },
    {
      "id": "0192f3a1-7c2e-7b4d-9a61-000000000056",
      "at": "2026-10-22T09:05:00Z",
      "actor": {
        "kind": "member",
        "id": "0192f3a1-7c2e-7b4d-9a61-000000000002",
        "name": "Ірина Мельник",
        "former": false
      },
      "importedFrom": null,
      "record": {
        "type": "deal",
        "id": "0192f3a1-7c2e-7b4d-9a61-000000000014",
        "title": "Кавомашини для мережі кав’ярень",
        "state": "live"
      },
      "kind": "comment",
      "history": null,
      "task": null,
      "comment": {
        "preview": "Клієнтка просить рахунок до п’ятниці",
        "deleted": false
      },
      "settings": null,
      "team": null,
      "compensation": null,
      "export": null
    },
    {
      "id": "0192f3a1-7c2e-7b4d-9a61-000000000052",
      "at": "2026-10-21T12:40:00Z",
      "actor": {
        "kind": "member",
        "id": "0192f3a1-7c2e-7b4d-9a61-000000000002",
        "name": "Ірина Мельник",
        "former": false
      },
      "importedFrom": null,
      "record": {
        "type": "deal",
        "id": "0192f3a1-7c2e-7b4d-9a61-000000000014",
        "title": "Кавомашини для мережі кав’ярень",
        "state": "live"
      },
      "kind": "history",
      "history": {
        "event": "moved",
        "via": "manual",
        "stage": {
          "from": {
            "id": "0192f3a1-7c2e-7b4d-9a61-00000000001f",
            "name": "Новий запит"
          },
          "to": {
            "id": "0192f3a1-7c2e-7b4d-9a61-000000000020",
            "name": "Переговори"
          }
        },
        "status": null,
        "owner": null,
        "amount": null,
        "fields": [],
        "summary": null,
        "attributes": []
      },
      "task": null,
      "comment": null,
      "settings": null,
      "team": null,
      "compensation": null,
      "export": null
    },
    {
      "id": "0192f3a1-7c2e-7b4d-9a61-000000000057",
      "at": "2026-10-20T08:15:00Z",
      "actor": {
        "kind": "member",
        "id": "0192f3a1-7c2e-7b4d-9a61-000000000002",
        "name": "Ірина Мельник",
        "former": false
      },
      "importedFrom": null,
      "record": {
        "type": "contact",
        "id": "0192f3a1-7c2e-7b4d-9a61-00000000000a",
        "title": "Олена Коваль",
        "state": "live"
      },
      "kind": "history",
      "history": {
        "event": "updated",
        "via": "manual",
        "stage": null,
        "status": null,
        "owner": null,
        "amount": null,
        "fields": [],
        "summary": null,
        "attributes": [
          {
            "key": "jobTitle",
            "label": null,
            "from": null,
            "to": "Менеджерка із закупівель",
            "fieldType": null,
            "decimals": null
          }
        ]
      },
      "task": null,
      "comment": null,
      "settings": null,
      "team": null,
      "compensation": null,
      "export": null
    }
  ],
  "nextCursor": null,
  "searchedTo": null
}
Поля відповіді
  • items object[]

    Вкладені поля: 13
    • actor object

      Вкладені поля: 4
      • former boolean

      • id string · uuid | null

      • kind string

        Значення: member automation import system

      • name string | null

    • at string · date-time

    • comment object | null

      Вкладені поля: 2
      • deleted boolean

      • preview string | null

    • compensation object | null

      Вкладені поля: 3
      • attributes object[]

        Вкладені поля: 6
        • decimals integer | null

          0–4

        • fieldType string | null

          Значення: text long_text number date datetime boolean choice multi_choice url money birthday address

        • from string | null

        • key string

        • label string | null

        • to string | null

      • event string

        Значення: plan_created plan_changed plan_archived plan_restored assignment_set assignment_removed start_date_set settings_changed adjustment_added adjustment_canceled payout_recorded payout_canceled period_closed recalculated role_created role_changed role_deleted

      • member object | null

        Вкладені поля: 2
        • id string · uuid | null

        • name string

    • export object | null

      Вкладені поля: 4
      • deals integer

        ≥ 0

      • format string

        Значення: xlsx csv

      • pipeline object | null

        Вкладені поля: 2
        • id string · uuid

        • name string

      • scope string

        Значення: all filter

    • history object | null

      Вкладені поля: 11
      • amount object | null

        Вкладені поля: 2
        • from object

          Вкладені поля: 2
          • amount string

          • currency string

        • to object

          Вкладені поля: 2
          • amount string

          • currency string

      • attributes object[]

        Вкладені поля: 6
        • decimals integer | null

          0–4

        • fieldType string | null

          Значення: text long_text number date datetime boolean choice multi_choice url money birthday address

        • from string | null

        • key string

        • label string | null

        • to string | null

      • event string

        Значення: created updated moved owner_changed comment_edited comment_deleted deleted restored comment_pinned comment_unpinned payment_recorded payment_changed payment_canceled payment_refunded payment_requested payment_request_paid payment_request_expired payment_request_canceled payment_request_failed payment_consent_given payment_credit_changed archived

      • fields string[]

        Значення: title description contactId companyId expectedCloseDate

      • owner object | null

        Вкладені поля: 2
        • from object | null

          Вкладені поля: 2
          • id string · uuid | null

          • name string

        • to object | null

          Вкладені поля: 2
          • id string · uuid | null

          • name string

      • stage object | null

        Вкладені поля: 2
        • from object | null

          Вкладені поля: 2
          • id string · uuid | null

          • name string

        • to object

          Вкладені поля: 2
          • id string · uuid | null

          • name string

      • status object | null

        Вкладені поля: 2
        • from string

          Значення: open won lost

        • to string

          Значення: open won lost

      • summary string | null

      • via string | null

        Значення: manual import form

      • merge object

        Вкладені поля: 2
        • dropped object[]

          кількість ≤ 400

          Вкладені поля: 4
          • key string

          • label string | null

          • record string

          • value string

        • records object[]

          кількість ≤ 4

          Вкладені поля: 3
          • id string · uuid

          • name string

          • number integer

            ≥ 1

      • payment object

        Вкладені поля: 3
        • paymentId string · uuid | null

        • paymentRequestId string · uuid | null

        • refundId string · uuid | null

    • id string · uuid

    • importedFrom string | null

    • kind string

      Значення: history task comment settings team compensation export

    • record object

      Вкладені поля: 4
      • id string · uuid | null

      • state string

        Значення: live archived deleted

      • title string

      • type string

        Значення: deal contact company task settings team compensation export

    • settings object | null

      Вкладені поля: 3
      • area string

        Значення: organization pipeline field currency_rate access_role currency_rate_auto_fill marketing_spend migration payment_method payment_method_group tag task_type product product_category product_price coupon tax_rate billing_entity

      • attributes object[]

        Вкладені поля: 6
        • decimals integer | null

          0–4

        • fieldType string | null

          Значення: text long_text number date datetime boolean choice multi_choice url money birthday address

        • from string | null

        • key string

        • label string | null

        • to string | null

      • event string

        Значення: created updated deleted archived restored

    • task object | null

      Вкладені поля: 9
      • attributes object[]

        Вкладені поля: 6
        • decimals integer | null

          0–4

        • fieldType string | null

          Значення: text long_text number date datetime boolean choice multi_choice url money birthday address

        • from string | null

        • key string

        • label string | null

        • to string | null

      • event string

        Значення: created updated rescheduled reassigned completed reopened canceled deleted restored

      • id string · uuid

      • kind string

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

      • next object | null

        Вкладені поля: 4
        • dueAt string · date-time | null

        • id string · uuid

        • title string

        • allDay boolean

      • outcome string | null

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

      • reschedule object | null

        Вкладені поля: 2
        • note string | null

        • reason string | null

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

      • title string

      • type object | null

        Вкладені поля: 3
        • icon string

        • id string · uuid

        • name string

    • team object | null

      Вкладені поля: 6
      • email string | null

      • event string

        Значення: invitation_issued invitation_revoked invitation_accepted membership_created membership_disabled membership_enabled membership_role_changed membership_dismissed membership_restored membership_renamed

      • handedOverTo object | null

        Вкладені поля: 2
        • id string · uuid | null

        • name string

      • member object | null

        Вкладені поля: 2
        • id string · uuid | null

        • name string

      • role object | null

        Вкладені поля: 2
        • from string | null

        • to string

      • roleName object | null

        Вкладені поля: 4
        • from string | null

        • fromSystemKey string | null

          Значення: owner admin manager

        • to string | null

        • toSystemKey string | null

          Значення: owner admin manager

  • nextCursor string | null

  • searchedTo string · date-time | null

Історія контакту

GET /contacts/{contactId}/activity

Усе, що сталося з контактом, нові зверху, сторінками: створення та кожна зміна полів і тегів (що було і що стало), коментарі, що сталося з його задачами. only залишає одне: notes, history або tasks. Чати й дзвінки через API недоступні.

Параметри шляху

  • contactId string · uuid обов’язково

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

  • cursor string

    довжина 1–512

  • limit integer

    1–100 · типово 30

  • only string

    Значення: notes history tasks

Приклад запиту

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

response = requests.get(
    "https://your-company.altahub.ai/api/v1/contacts/{contactId}/activity",
    headers={"Authorization": "Bearer alta_…"},
)
data = response.json()
php
<?php
$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://your-company.altahub.ai/api/v1/contacts/{contactId}/activity', [
    'headers' => ['Authorization' => 'Bearer alta_…'],
]);
$data = json_decode((string) $response->getBody(), true);

Відповідь 200

Успішна відповідь.

json
{
  "items": [
    {
      "id": "0192f3a1-7c2e-7b4d-9a61-000000000058",
      "type": "note",
      "at": "2026-10-24T16:45:00Z",
      "actor": {
        "id": "0192f3a1-7c2e-7b4d-9a61-000000000002",
        "name": "Ірина Мельник"
      },
      "note": {
        "body": "Зручніше писати в Telegram",
        "editedAt": null,
        "version": 1,
        "mentions": [],
        "pinned": null,
        "attachments": []
      },
      "history": null,
      "task": null,
      "call": null,
      "message": null
    },
    {
      "id": "0192f3a1-7c2e-7b4d-9a61-00000000003c",
      "type": "task",
      "at": "2026-10-21T12:40:00Z",
      "actor": {
        "id": "0192f3a1-7c2e-7b4d-9a61-000000000002",
        "name": "Ірина Мельник"
      },
      "note": null,
      "history": null,
      "task": {
        "id": "0192f3a1-7c2e-7b4d-9a61-00000000003c",
        "title": "Передзвонити щодо рахунку",
        "kind": "call",
        "type": null,
        "event": "created",
        "attributes": [],
        "outcome": null,
        "next": null,
        "reschedule": null
      },
      "call": null,
      "message": null
    },
    {
      "id": "0192f3a1-7c2e-7b4d-9a61-000000000054",
      "type": "history",
      "at": "2026-10-20T08:15:00Z",
      "actor": {
        "id": "0192f3a1-7c2e-7b4d-9a61-000000000001",
        "name": "Андрій Шевченко"
      },
      "note": null,
      "history": {
        "event": "created",
        "via": "manual",
        "stage": null,
        "status": null,
        "owner": null,
        "amount": null,
        "fields": [],
        "summary": null,
        "attributes": [
          {
            "key": "phone",
            "label": null,
            "from": null,
            "to": "+380501234567",
            "fieldType": null,
            "decimals": null
          }
        ]
      },
      "task": null,
      "call": null,
      "message": null
    }
  ],
  "nextCursor": null,
  "pinned": []
}
Поля відповіді
  • items object[]

    Вкладені поля: 11
    • actor object | null

      Вкладені поля: 2
      • id string · uuid | null

      • name string

    • at string · date-time

    • call object | null

      Вкладені поля: 8
      • clientNumber string | null

      • direction string

        Значення: incoming outgoing

      • durationSeconds integer | null

        ≥ 0

      • id string · uuid

      • inProgress boolean

      • recording boolean

      • result string | null

        Значення: answered no_answer busy unreachable failed

      • talkSeconds integer | null

        ≥ 0

    • history object | null

      Вкладені поля: 11
      • amount object | null

        Вкладені поля: 2
        • from object

          Вкладені поля: 2
          • amount string

          • currency string

        • to object

          Вкладені поля: 2
          • amount string

          • currency string

      • attributes object[]

        Вкладені поля: 6
        • decimals integer | null

          0–4

        • fieldType string | null

          Значення: text long_text number date datetime boolean choice multi_choice url money birthday address

        • from string | null

        • key string

        • label string | null

        • to string | null

      • event string

        Значення: created updated moved owner_changed comment_edited comment_deleted deleted restored comment_pinned comment_unpinned payment_recorded payment_changed payment_canceled payment_refunded payment_requested payment_request_paid payment_request_expired payment_request_canceled payment_request_failed payment_consent_given payment_credit_changed archived

      • fields string[]

        Значення: title description contactId companyId expectedCloseDate

      • owner object | null

        Вкладені поля: 2
        • from object | null

          Вкладені поля: 2
          • id string · uuid | null

          • name string

        • to object | null

          Вкладені поля: 2
          • id string · uuid | null

          • name string

      • stage object | null

        Вкладені поля: 2
        • from object | null

          Вкладені поля: 2
          • id string · uuid | null

          • name string

        • to object

          Вкладені поля: 2
          • id string · uuid | null

          • name string

      • status object | null

        Вкладені поля: 2
        • from string

          Значення: open won lost

        • to string

          Значення: open won lost

      • summary string | null

      • via string | null

        Значення: manual import form

      • merge object

        Вкладені поля: 2
        • dropped object[]

          кількість ≤ 400

          Вкладені поля: 4
          • key string

          • label string | null

          • record string

          • value string

        • records object[]

          кількість ≤ 4

          Вкладені поля: 3
          • id string · uuid

          • name string

          • number integer

            ≥ 1

      • payment object

        Вкладені поля: 3
        • paymentId string · uuid | null

        • paymentRequestId string · uuid | null

        • refundId string · uuid | null

    • id string · uuid

    • message object | null

      Вкладені поля: 2
      • chat object

        Вкладені поля: 3
        • account object

          Вкладені поля: 4
          • displayName string

          • id string · uuid

          • owner object

            Вкладені поля: 2
            • id string · uuid

            • name string

          • username string | null

        • id string · uuid

        • provider string

          Значення: telegram

      • entry object | null

        Вкладені поля: 15
        • at string · date-time

        • author object | null

          Вкладені поля: 2
          • id string · uuid

          • name string

        • call object | null

          Вкладені поля: 3
          • answered boolean | null

          • direction string

            Значення: in out

          • seconds integer | null

            ≥ 0

        • dealId string · uuid | null

        • deleted boolean

        • direction string

          Значення: in out

        • editedAt string · date-time | null

        • failure string | null

        • files object[]

          Вкладені поля: 11
          • contentType string | null

          • durationSeconds integer | null

            ≥ 0

          • gone boolean

          • hasPreview boolean

          • height integer | null

            ≥ 1

          • id string · uuid

          • kind string

            Значення: photo voice audio video video_note document sticker

          • name string | null

          • sizeBytes integer | null

            ≥ 0

          • waveform integer[] | null

            кількість ≤ 128 · 0–31

          • width integer | null

            ≥ 1

        • id string · uuid

        • kind string

          Значення: text media call other

        • origin string

          Значення: client alta device history

        • otherKind string | null

          Значення: sticker location contact poll game unsupported

        • status string | null

          Значення: queued sending sent read failed cancelled

        • text string | null

    • note object | null

      Вкладені поля: 6
      • attachments object[]

        The comment's files in their order (empty without files): id, name, size in bytes, type, and an audio's or a video's length. A signed-in member opens one through GET /note-files/{id}; an API key sees them here but does not open them.

        Вкладені поля: 5
        • contentType string

        • durationSeconds integer | null

          0–86400

        • id string · uuid

        • name string

          довжина 1–255

        • size integer

          ≥ 1

      • body string

      • editedAt string · date-time | null

      • mentions object[]

        Вкладені поля: 3
        • memberId string · uuid | null

        • name string

        • text string

      • pinned object | null

        Вкладені поля: 2
        • at string · date-time

        • by object

          Вкладені поля: 2
          • id string · uuid | null

          • name string

      • version integer

        ≥ 1

    • task object | null

      Вкладені поля: 9
      • attributes object[]

        Вкладені поля: 6
        • decimals integer | null

          0–4

        • fieldType string | null

          Значення: text long_text number date datetime boolean choice multi_choice url money birthday address

        • from string | null

        • key string

        • label string | null

        • to string | null

      • event string

        Значення: created updated rescheduled reassigned completed reopened canceled deleted restored

      • id string · uuid

      • kind string

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

      • next object | null

        Вкладені поля: 4
        • dueAt string · date-time | null

        • id string · uuid

        • title string

        • allDay boolean

      • outcome string | null

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

      • reschedule object | null

        Вкладені поля: 2
        • note string | null

        • reason string | null

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

      • title string

      • type object | null

        Вкладені поля: 3
        • icon string

        • id string · uuid

        • name string

    • type string

      Значення: note history task call message

    • callAnalysis object

      Вкладені поля: 1
      • transcript object

        Вкладені поля: 1
        • state string

          Значення: queued transcribing held done failed

    • paymentReport object

      Вкладені поля: 9
      • card object | null

        Вкладені поля: 3
        • brand string | null

        • issuer string | null

        • maskedNumber string | null

      • method string | null

      • occurredAt string · date-time

      • orderReference string | null

      • payer string | null

      • payerEmail string | null

      • payerPhone string | null

      • productCount integer

        ≥ 0

      • products object[]

        кількість ≤ 20

        Вкладені поля: 4
        • amount string

          шаблон ^[0-9]+\.[0-9]{2}$

        • currency string

          шаблон ^[A-Z]{3}$

        • name string

        • quantity string

  • nextCursor string | null

  • pinned object[]

    кількість ≤ 3

    Вкладені поля: 11
    • actor object | null

      Вкладені поля: 2
      • id string · uuid | null

      • name string

    • at string · date-time

    • call object | null

      Вкладені поля: 8
      • clientNumber string | null

      • direction string

        Значення: incoming outgoing

      • durationSeconds integer | null

        ≥ 0

      • id string · uuid

      • inProgress boolean

      • recording boolean

      • result string | null

        Значення: answered no_answer busy unreachable failed

      • talkSeconds integer | null

        ≥ 0

    • history object | null

      Вкладені поля: 11
      • amount object | null

        Вкладені поля: 2
        • from object

          Вкладені поля: 2
          • amount string

          • currency string

        • to object

          Вкладені поля: 2
          • amount string

          • currency string

      • attributes object[]

        Вкладені поля: 6
        • decimals integer | null

          0–4

        • fieldType string | null

          Значення: text long_text number date datetime boolean choice multi_choice url money birthday address

        • from string | null

        • key string

        • label string | null

        • to string | null

      • event string

        Значення: created updated moved owner_changed comment_edited comment_deleted deleted restored comment_pinned comment_unpinned payment_recorded payment_changed payment_canceled payment_refunded payment_requested payment_request_paid payment_request_expired payment_request_canceled payment_request_failed payment_consent_given payment_credit_changed archived

      • fields string[]

        Значення: title description contactId companyId expectedCloseDate

      • owner object | null

        Вкладені поля: 2
        • from object | null

          Вкладені поля: 2
          • id string · uuid | null

          • name string

        • to object | null

          Вкладені поля: 2
          • id string · uuid | null

          • name string

      • stage object | null

        Вкладені поля: 2
        • from object | null

          Вкладені поля: 2
          • id string · uuid | null

          • name string

        • to object

          Вкладені поля: 2
          • id string · uuid | null

          • name string

      • status object | null

        Вкладені поля: 2
        • from string

          Значення: open won lost

        • to string

          Значення: open won lost

      • summary string | null

      • via string | null

        Значення: manual import form

      • merge object

        Вкладені поля: 2
        • dropped object[]

          кількість ≤ 400

          Вкладені поля: 4
          • key string

          • label string | null

          • record string

          • value string

        • records object[]

          кількість ≤ 4

          Вкладені поля: 3
          • id string · uuid

          • name string

          • number integer

            ≥ 1

      • payment object

        Вкладені поля: 3
        • paymentId string · uuid | null

        • paymentRequestId string · uuid | null

        • refundId string · uuid | null

    • id string · uuid

    • message object | null

      Вкладені поля: 2
      • chat object

        Вкладені поля: 3
        • account object

          Вкладені поля: 4
          • displayName string

          • id string · uuid

          • owner object

            Вкладені поля: 2
            • id string · uuid

            • name string

          • username string | null

        • id string · uuid

        • provider string

          Значення: telegram

      • entry object | null

        Вкладені поля: 15
        • at string · date-time

        • author object | null

          Вкладені поля: 2
          • id string · uuid

          • name string

        • call object | null

          Вкладені поля: 3
          • answered boolean | null

          • direction string

            Значення: in out

          • seconds integer | null

            ≥ 0

        • dealId string · uuid | null

        • deleted boolean

        • direction string

          Значення: in out

        • editedAt string · date-time | null

        • failure string | null

        • files object[]

          Вкладені поля: 11
          • contentType string | null

          • durationSeconds integer | null

            ≥ 0

          • gone boolean

          • hasPreview boolean

          • height integer | null

            ≥ 1

          • id string · uuid

          • kind string

            Значення: photo voice audio video video_note document sticker

          • name string | null

          • sizeBytes integer | null

            ≥ 0

          • waveform integer[] | null

            кількість ≤ 128 · 0–31

          • width integer | null

            ≥ 1

        • id string · uuid

        • kind string

          Значення: text media call other

        • origin string

          Значення: client alta device history

        • otherKind string | null

          Значення: sticker location contact poll game unsupported

        • status string | null

          Значення: queued sending sent read failed cancelled

        • text string | null

    • note object | null

      Вкладені поля: 6
      • attachments object[]

        The comment's files in their order (empty without files): id, name, size in bytes, type, and an audio's or a video's length. A signed-in member opens one through GET /note-files/{id}; an API key sees them here but does not open them.

        Вкладені поля: 5
        • contentType string

        • durationSeconds integer | null

          0–86400

        • id string · uuid

        • name string

          довжина 1–255

        • size integer

          ≥ 1

      • body string

      • editedAt string · date-time | null

      • mentions object[]

        Вкладені поля: 3
        • memberId string · uuid | null

        • name string

        • text string

      • pinned object | null

        Вкладені поля: 2
        • at string · date-time

        • by object

          Вкладені поля: 2
          • id string · uuid | null

          • name string

      • version integer

        ≥ 1

    • task object | null

      Вкладені поля: 9
      • attributes object[]

        Вкладені поля: 6
        • decimals integer | null

          0–4

        • fieldType string | null

          Значення: text long_text number date datetime boolean choice multi_choice url money birthday address

        • from string | null

        • key string

        • label string | null

        • to string | null

      • event string

        Значення: created updated rescheduled reassigned completed reopened canceled deleted restored

      • id string · uuid

      • kind string

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

      • next object | null

        Вкладені поля: 4
        • dueAt string · date-time | null

        • id string · uuid

        • title string

        • allDay boolean

      • outcome string | null

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

      • reschedule object | null

        Вкладені поля: 2
        • note string | null

        • reason string | null

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

      • title string

      • type object | null

        Вкладені поля: 3
        • icon string

        • id string · uuid

        • name string

    • type string

      Значення: note history task call message

    • callAnalysis object

      Вкладені поля: 1
      • transcript object

        Вкладені поля: 1
        • state string

          Значення: queued transcribing held done failed

    • paymentReport object

      Вкладені поля: 9
      • card object | null

        Вкладені поля: 3
        • brand string | null

        • issuer string | null

        • maskedNumber string | null

      • method string | null

      • occurredAt string · date-time

      • orderReference string | null

      • payer string | null

      • payerEmail string | null

      • payerPhone string | null

      • productCount integer

        ≥ 0

      • products object[]

        кількість ≤ 20

        Вкладені поля: 4
        • amount string

          шаблон ^[0-9]+\.[0-9]{2}$

        • currency string

          шаблон ^[A-Z]{3}$

        • name string

        • quantity string

Історія угоди

GET /deals/{dealId}/activity

Усе, що сталося з угодою, нові зверху, сторінками: створення, переходи етапами, виграш, програш і повторне відкриття, зміна відповідального, суми, кожного поля й тегів (що було і що стало), коментарі, що сталося з її задачами, оплати. У кожного запису — хто (actor), коли (at) і що (history, note або task). only залишає одне: notes — коментарі, history — зміни, tasks — задачі, payments — оплати, changes — правки назви, суми, тегів і власних полів (без створення угоди; у кожному записі лише ці правки). Чати й дзвінки через API недоступні.

Параметри шляху

  • dealId string · uuid обов’язково

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

  • cursor string

    довжина 1–512

  • limit integer

    1–100 · типово 30

  • only string

    Значення: notes history tasks main payments changes

Приклад запиту

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

response = requests.get(
    "https://your-company.altahub.ai/api/v1/deals/{dealId}/activity",
    headers={"Authorization": "Bearer alta_…"},
)
data = response.json()
php
<?php
$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://your-company.altahub.ai/api/v1/deals/{dealId}/activity', [
    'headers' => ['Authorization' => 'Bearer alta_…'],
]);
$data = json_decode((string) $response->getBody(), true);

Відповідь 200

Успішна відповідь.

json
{
  "items": [
    {
      "id": "0192f3a1-7c2e-7b4d-9a61-00000000003c",
      "type": "task",
      "at": "2026-10-24T16:45:00Z",
      "actor": {
        "id": "0192f3a1-7c2e-7b4d-9a61-000000000002",
        "name": "Ірина Мельник"
      },
      "note": null,
      "history": null,
      "task": {
        "id": "0192f3a1-7c2e-7b4d-9a61-00000000003c",
        "title": "Передзвонити щодо рахунку",
        "kind": "call",
        "type": null,
        "event": "completed",
        "attributes": [],
        "outcome": "call",
        "next": {
          "id": "0192f3a1-7c2e-7b4d-9a61-00000000003d",
          "title": "Надіслати рахунок",
          "dueAt": "2026-10-29T09:00:00Z"
        },
        "reschedule": null
      },
      "call": null,
      "message": null
    },
    {
      "id": "0192f3a1-7c2e-7b4d-9a61-000000000059",
      "type": "history",
      "at": "2026-10-23T10:30:00Z",
      "actor": {
        "id": "0192f3a1-7c2e-7b4d-9a61-000000000002",
        "name": "Ірина Мельник"
      },
      "note": null,
      "history": {
        "event": "payment_recorded",
        "via": null,
        "stage": null,
        "status": null,
        "owner": null,
        "amount": null,
        "fields": [],
        "summary": null,
        "attributes": [
          {
            "key": "payment",
            "label": null,
            "from": null,
            "to": "12000.00 UAH",
            "fieldType": "money",
            "decimals": null
          },
          {
            "key": "paymentStatus",
            "label": null,
            "from": null,
            "to": "paid",
            "fieldType": null,
            "decimals": null
          },
          {
            "key": "paidAt",
            "label": null,
            "from": null,
            "to": "2026-10-23",
            "fieldType": null,
            "decimals": null
          },
          {
            "key": "paymentMethod",
            "label": null,
            "from": null,
            "to": "Картка",
            "fieldType": null,
            "decimals": null
          }
        ],
        "payment": {
          "paymentId": "0192f3a1-7c2e-7b4d-9a61-0000000000b3",
          "refundId": null,
          "paymentRequestId": null
        }
      },
      "task": null,
      "call": null,
      "message": null
    },
    {
      "id": "0192f3a1-7c2e-7b4d-9a61-000000000050",
      "type": "note",
      "at": "2026-10-22T09:05:00Z",
      "actor": {
        "id": "0192f3a1-7c2e-7b4d-9a61-000000000002",
        "name": "Ірина Мельник"
      },
      "note": {
        "body": "Клієнтка просить рахунок до п’ятниці",
        "editedAt": null,
        "version": 1,
        "mentions": [],
        "pinned": null,
        "attachments": []
      },
      "history": null,
      "task": null,
      "call": null,
      "message": null
    },
    {
      "id": "0192f3a1-7c2e-7b4d-9a61-000000000053",
      "type": "history",
      "at": "2026-10-21T12:45:00Z",
      "actor": {
        "id": "0192f3a1-7c2e-7b4d-9a61-000000000002",
        "name": "Ірина Мельник"
      },
      "note": null,
      "history": {
        "event": "updated",
        "via": "manual",
        "stage": null,
        "status": null,
        "owner": null,
        "amount": {
          "from": {
            "amount": "10000.00",
            "currency": "UAH"
          },
          "to": {
            "amount": "12000.00",
            "currency": "UAH"
          }
        },
        "fields": [],
        "summary": null,
        "attributes": [
          {
            "key": "cf:0192f3a1-7c2e-7b4d-9a61-000000000032",
            "label": "Місто доставки",
            "from": null,
            "to": "Київ",
            "fieldType": "text",
            "decimals": null
          }
        ]
      },
      "task": null,
      "call": null,
      "message": null
    },
    {
      "id": "0192f3a1-7c2e-7b4d-9a61-000000000052",
      "type": "history",
      "at": "2026-10-21T12:40:00Z",
      "actor": {
        "id": "0192f3a1-7c2e-7b4d-9a61-000000000002",
        "name": "Ірина Мельник"
      },
      "note": null,
      "history": {
        "event": "moved",
        "via": "manual",
        "stage": {
          "from": {
            "id": "0192f3a1-7c2e-7b4d-9a61-00000000001f",
            "name": "Новий запит"
          },
          "to": {
            "id": "0192f3a1-7c2e-7b4d-9a61-000000000020",
            "name": "Переговори"
          }
        },
        "status": null,
        "owner": null,
        "amount": null,
        "fields": [],
        "summary": null,
        "attributes": []
      },
      "task": null,
      "call": null,
      "message": null
    },
    {
      "id": "0192f3a1-7c2e-7b4d-9a61-000000000051",
      "type": "history",
      "at": "2026-10-20T08:15:00Z",
      "actor": {
        "id": "0192f3a1-7c2e-7b4d-9a61-000000000001",
        "name": "Андрій Шевченко"
      },
      "note": null,
      "history": {
        "event": "created",
        "via": "manual",
        "stage": {
          "from": null,
          "to": {
            "id": "0192f3a1-7c2e-7b4d-9a61-00000000001f",
            "name": "Новий запит"
          }
        },
        "status": null,
        "owner": null,
        "amount": null,
        "fields": [],
        "summary": null,
        "attributes": []
      },
      "task": null,
      "call": null,
      "message": null
    }
  ],
  "nextCursor": null,
  "pinned": []
}

Поля — як у відповіді Історія контакту

Пов’язати коментар з його копією в іншій системі

PUT /notes/{noteId}/copies/{source}/{externalId}

Для сервісу, який копіює коментарі з Alta в іншу систему: після того як копію створено там, він повідомляє її id. source — ваше слово для системи (малі латинські літери, цифри, - і _), externalId — id копії там. Імпорт з цієї системи впізнає копію за цим id і відповідає цим коментарем, а не приносить його вдруге; тому в тексті копії не потрібен рядок з посиланням на коментар. Якщо імпорт встиг принести копію раніше, ніж прийшов зв’язок, і вона точно повторює коментар, її приховано як дубль (duplicateHidden: true). Перший зв’язок — created, той самий запит ще раз нічого не змінює (unchanged), тому повтор безпечний. Пов’язати можна лише коментар, написаний в Alta: для принесеного імпортом — 409 CONFLICT (note_imported); копія, вже пов’язана з іншим коментарем, — 409 CONFLICT (copy_of_another_comment). Потрібен ключ з правом запису і право «Імпорт даних» у ролі автора ключа (у власника й адміністратора воно є), інакше — 403 FORBIDDEN.

Параметри шляху

  • externalId string обов’язково

    довжина 1–200 · шаблон ^\S+$

  • noteId string · uuid обов’язково

  • source string обов’язково

    шаблон ^[a-z0-9_-]{1,40}$

Приклад запиту

bash
curl -X PUT 'https://your-company.altahub.ai/api/v1/notes/{noteId}/copies/{source}/{externalId}' \
  -H 'Authorization: Bearer alta_…' \
  -H 'Content-Type: application/json' \
  -d '{}'
js
const response = await fetch('https://your-company.altahub.ai/api/v1/notes/{noteId}/copies/{source}/{externalId}', {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer alta_…',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({}),
});
const data = await response.json();
python
import requests

response = requests.put(
    "https://your-company.altahub.ai/api/v1/notes/{noteId}/copies/{source}/{externalId}",
    headers={"Authorization": "Bearer alta_…"},
    json={},
)
data = response.json()
php
<?php
$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://your-company.altahub.ai/api/v1/notes/{noteId}/copies/{source}/{externalId}', [
    'headers' => ['Authorization' => 'Bearer alta_…'],
    'json' => new \stdClass(),
]);
$data = json_decode((string) $response->getBody(), true);

Відповідь 200

Успішна відповідь.

json
{
  "noteId": "0192f3a1-7c2e-7b4d-9a61-000000000050",
  "outcome": "created",
  "duplicateHidden": false
}
Поля відповіді
  • duplicateHidden boolean

  • noteId string · uuid

  • outcome string

    Значення: created unchanged