Who am I
Key, company and limits. No scope required.
curl -X GET "https://api.tygy.ru/v1/me" \
-H "Authorization: Bearer $TYGY_API_KEY"Все методы версии v1. Каждый называет право, которое ему нужно.
Key, company and limits. No scope required.
curl -X GET "https://api.tygy.ru/v1/me" \
-H "Authorization: Bearer $TYGY_API_KEY"Newest activity first. Scope: `conversations:read`.
| Поле | Тип | Описание |
|---|---|---|
| limit | string query · необязательный | Page size, 1…100 |
| starting_after | string query · необязательный | Cursor from the previous page’s `next_cursor` |
| status | string query · необязательный | |
| assignee_id | string query · необязательный | User id of the assigned operator |
| contact_id | string query · необязательный | |
| tag | string query · необязательный | Tag id |
| channel | string query · необязательный | Channel the conversation came in on |
| updated_since | string query · необязательный | Only conversations changed at or after this ISO-8601 instant — for polling |
curl -X GET "https://api.tygy.ru/v1/conversations" \
-H "Authorization: Bearer $TYGY_API_KEY"Writes first, the way «Write first» in the inbox does: reuses the contact’s open conversation on the same channel or opens a new one, and sends `body` as the first message, attributed to the key. A channel that cannot initiate (a Telegram, VK or MAX bot to someone who never wrote to it) answers 409. Emits `conversation.created` for a new conversation. Scope: `conversations:start` (+ `conversations:write` for `assignee_id`).
| Поле | Тип | Описание |
|---|---|---|
| contact_id | string обязательный | An existing contact of the project |
| body | string обязательный | The first message, plain text |
| channel | string необязательный | Defaults to the channel of the contact’s latest conversation that can start one. Telegram, VK and MAX reach only a customer who wrote to the bot before. email, whatsapp, telegram, vk, max |
| subject | string необязательный | Subject line, for `email` only |
| assignee_id | string необязательный | User to assign the conversation to; needs `conversations:write` as well |
curl -X POST "https://api.tygy.ru/v1/conversations" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"contact_id": "…", "body": "…"}'| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
curl -X GET "https://api.tygy.ru/v1/conversations/<id>" \
-H "Authorization: Bearer $TYGY_API_KEY"Status, assignee and team. Goes through the same transitions the inbox uses — audit line, notifications and scenarios fire as for an operator. Scope: `conversations:write`.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
| Поле | Тип | Описание |
|---|---|---|
| status | string необязательный | `open` reopens a closed/spam dialog, wakes a snoozed one or unassigns an assigned one; `snoozed` needs `snoozed_until`; to assign, set `assignee_id` instead. open, closed, snoozed, spam |
| assignee_id | string | null необязательный | User id, or null to unassign |
| team_id | string | null необязательный | Team id, or null to clear |
| snoozed_until | string необязательный | Required with `status: snoozed` |
curl -X PATCH "https://api.tygy.ru/v1/conversations/<id>" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Oldest first by default. Internal notes (`type: note`) are returned only to keys holding `notes:write`.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный | |
| limit | string query · необязательный | Page size, 1…100 |
| starting_after | string query · необязательный | Cursor from the previous page’s `next_cursor` |
| order | string query · необязательный | Oldest first by default |
| include | string query · необязательный | With `calls:read`: `transcript` adds each call’s full transcript to its card. Left out, `call.transcript` is null to keep the page light — the summary and recordings still come. |
curl -X GET "https://api.tygy.ru/v1/conversations/<id>/messages" \
-H "Authorization: Bearer $TYGY_API_KEY"Attributed to the key («API · <name>» in the inbox). `type: reply` needs `messages:send` and is delivered on the conversation’s channel; `type: note` needs `notes:write` and stays internal.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
| Поле | Тип | Описание |
|---|---|---|
| body | string обязательный | Plain text; Markdown is rendered where the channel supports it |
| type | string необязательный | `reply` reaches the customer (scope `messages:send`); `note` stays internal (scope `notes:write`) reply, note |
curl -X POST "https://api.tygy.ru/v1/conversations/<id>/messages" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"body": "…"}'Idempotent.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
| Поле | Тип | Описание |
|---|---|---|
| tag_id | string обязательный |
curl -X POST "https://api.tygy.ru/v1/conversations/<id>/tags" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"tag_id": "…"}'Idempotent.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный | |
| tagId | string path · обязательный |
curl -X DELETE "https://api.tygy.ru/v1/conversations/<id>/tags/<tagId>" \
-H "Authorization: Bearer $TYGY_API_KEY"Creates a meeting hosted by `operator_id` and posts its link into the conversation as a reply — what «Offer a meeting» does in the inbox. Scope: `meetings:write`.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
| Поле | Тип | Описание |
|---|---|---|
| operator_id | string необязательный | User who hosts the meeting. Required for an API key — a meeting needs a person to run it. |
| message | string необязательный | Invitation text. `{join_url}` is replaced with the link; without it the link is appended. Defaults to the cabinet’s invitation in the project’s language. |
curl -X POST "https://api.tygy.ru/v1/conversations/<id>/meetings" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Most recently updated first. Scope: `contacts:read`.
| Поле | Тип | Описание |
|---|---|---|
| limit | string query · необязательный | Page size, 1…100 |
| starting_after | string query · необязательный | Cursor from the previous page’s `next_cursor` |
| q | string query · необязательный | Case-insensitive substring of the name |
string query · необязательный | Exact e-mail (any identifier) | |
| phone | string query · необязательный | Exact phone (any identifier) |
| organization_id | string query · необязательный | |
| updated_since | string query · необязательный |
curl -X GET "https://api.tygy.ru/v1/contacts" \
-H "Authorization: Bearer $TYGY_API_KEY"An e-mail / phone / Telegram username already known in the project answers 409 with the existing id — the same address never creates a second person. Scope: `contacts:write`.
| Поле | Тип | Описание |
|---|---|---|
| name | string обязательный | |
string необязательный | ||
| phone | string необязательный | E.164 preferred; national formats are normalised |
| telegram_username | string необязательный | |
| organization_id | string необязательный | Client organization to link the contact to |
| attributes | object необязательный | Custom attribute values by key (see `GET /v1/contacts/attributes`). Merged: keys you leave out stay, `null` clears one. The widget's rule (ADR-0028): an unknown key is kept (shown under «Другое»), a value of the wrong type is dropped, a long one is cut — each reported in `attribute_warnings` of the response, status 200. A non-object is a 422. |
curl -X POST "https://api.tygy.ru/v1/contacts" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "…"}'The project’s attribute schema: what `attributes` on a contact may hold and of which type. Scope: `contacts:read`.
curl -X GET "https://api.tygy.ru/v1/contacts/attributes" \
-H "Authorization: Bearer $TYGY_API_KEY"| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
curl -X GET "https://api.tygy.ru/v1/contacts/<id>" \
-H "Authorization: Bearer $TYGY_API_KEY"Absent fields stay; null clears.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
| Поле | Тип | Описание |
|---|---|---|
| name | string | null необязательный | |
string | null необязательный | Replaces the primary e-mail; null removes it | |
| phone | string | null необязательный | |
| telegram_username | string | null необязательный | |
| organization_id | string | null необязательный | null unlinks |
| attributes | object необязательный | Custom attribute values by key (see `GET /v1/contacts/attributes`). Merged: keys you leave out stay, `null` clears one. The widget's rule (ADR-0028): an unknown key is kept (shown under «Другое»), a value of the wrong type is dropped, a long one is cut — each reported in `attribute_warnings` of the response, status 200. A non-object is a 422. |
curl -X PATCH "https://api.tygy.ru/v1/contacts/<id>" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
| Поле | Тип | Описание |
|---|---|---|
| type | string обязательный | email, phone, telegram |
| value | string обязательный |
curl -X POST "https://api.tygy.ru/v1/contacts/<id>/identifiers" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"type": "email", "value": "…"}'| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный | |
| identifierId | string path · обязательный |
curl -X DELETE "https://api.tygy.ru/v1/contacts/<id>/identifiers/<identifierId>" \
-H "Authorization: Bearer $TYGY_API_KEY"Idempotent.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
| Поле | Тип | Описание |
|---|---|---|
| tag_id | string обязательный |
curl -X POST "https://api.tygy.ru/v1/contacts/<id>/tags" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"tag_id": "…"}'Idempotent.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный | |
| tagId | string path · обязательный |
curl -X DELETE "https://api.tygy.ru/v1/contacts/<id>/tags/<tagId>" \
-H "Authorization: Bearer $TYGY_API_KEY"The B2B accounts contacts work for. Scope: `contacts:read`.
| Поле | Тип | Описание |
|---|---|---|
| limit | string query · необязательный | Page size, 1…100 |
| starting_after | string query · необязательный | Cursor from the previous page’s `next_cursor` |
| q | string query · необязательный | Case-insensitive substring of the name |
| updated_since | string query · необязательный |
curl -X GET "https://api.tygy.ru/v1/organizations" \
-H "Authorization: Bearer $TYGY_API_KEY"Scope: `contacts:write`.
| Поле | Тип | Описание |
|---|---|---|
| name | string обязательный | |
string необязательный | ||
| phone | string необязательный | |
| website | string необязательный |
curl -X POST "https://api.tygy.ru/v1/organizations" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "…"}'| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
curl -X GET "https://api.tygy.ru/v1/organizations/<id>" \
-H "Authorization: Bearer $TYGY_API_KEY"| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
| Поле | Тип | Описание |
|---|---|---|
| name | string необязательный |
curl -X PATCH "https://api.tygy.ru/v1/organizations/<id>" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Idempotent.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
| Поле | Тип | Описание |
|---|---|---|
| tag_id | string обязательный |
curl -X POST "https://api.tygy.ru/v1/organizations/<id>/tags" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"tag_id": "…"}'Idempotent.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный | |
| tagId | string path · обязательный |
curl -X DELETE "https://api.tygy.ru/v1/organizations/<id>/tags/<tagId>" \
-H "Authorization: Bearer $TYGY_API_KEY"Scope: `tags:read`.
| Поле | Тип | Описание |
|---|---|---|
| scope | string query · необязательный |
curl -X GET "https://api.tygy.ru/v1/tags" \
-H "Authorization: Bearer $TYGY_API_KEY"A name already used in the same scope answers 409. Scope: `tags:write`. There is no delete: removing a tag strips it everywhere at once, which is for a person.
| Поле | Тип | Описание |
|---|---|---|
| scope | string обязательный | What the tag can be attached to; fixed for life conversation, contact, organization, conference |
| name | string обязательный | Up to 40 characters, unique within the scope |
| color | string необязательный | One of the fixed palette; defaults to the first #ff4747, #ff55a5, #b459c9, #0080ff, #00b8e9, #00b3be, #00bc97, #00be3b, #8ebe00, #baad0e, #e7b500, #ff8200, #ff5f00, #353d43, #75818b, #9ca5ad |
curl -X POST "https://api.tygy.ru/v1/tags" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"scope": "conversation", "name": "…"}'Every dialog and contact that carries it shows the change. Absent fields stay.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
| Поле | Тип | Описание |
|---|---|---|
| name | string необязательный | |
| color | string необязательный | #ff4747, #ff55a5, #b459c9, #0080ff, #00b8e9, #00b3be, #00bc97, #00be3b, #8ebe00, #baad0e, #e7b500, #ff8200, #ff5f00, #353d43, #75818b, #9ca5ad |
curl -X PATCH "https://api.tygy.ru/v1/tags/<id>" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Active members only. Scope: `team:read`.
curl -X GET "https://api.tygy.ru/v1/users" \
-H "Authorization: Bearer $TYGY_API_KEY"Scope: `team:read`.
curl -X GET "https://api.tygy.ru/v1/teams" \
-H "Authorization: Bearer $TYGY_API_KEY"Active help centers of the project. Scope: `kb:read`.
curl -X GET "https://api.tygy.ru/v1/kb/handbooks" \
-H "Authorization: Bearer $TYGY_API_KEY"| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
curl -X GET "https://api.tygy.ru/v1/kb/handbooks/<id>/categories" \
-H "Authorization: Bearer $TYGY_API_KEY"Published articles, titles only; fetch one article for its body. A key that also holds `kb:write` may pass `status=draft|archived|all` to see unpublished ones. Scope: `kb:read`.
| Поле | Тип | Описание |
|---|---|---|
| limit | string query · необязательный | Page size, 1…100 |
| starting_after | string query · необязательный | Cursor from the previous page’s `next_cursor` |
| q | string query · необязательный | Search words. Matches the article title and its short description, case-insensitively. The body is not searched — ask for the article to read it. |
| handbook_id | string query · необязательный | Restrict to one handbook |
| category_id | string query · необязательный | Restrict to one category |
| updated_since | string query · необязательный | |
| status | string query · необязательный | Which articles to list. Anything but `published` needs `kb:write` as well — a writer must see the drafts it made; a reader sees only what customers see. |
curl -X GET "https://api.tygy.ru/v1/kb/articles" \
-H "Authorization: Bearer $TYGY_API_KEY"The body is Markdown. Creates a DRAFT unless `status` says otherwise — a sync that goes wrong should not publish. Publishing is also what re-indexes the article for the AI operator. Scope: `kb:write`.
| Поле | Тип | Описание |
|---|---|---|
| handbook_id | string обязательный | Which handbook the article belongs to |
| title | string обязательный | Title of the article in this locale |
| markdown | string обязательный | The body, as Markdown. Headings, paragraphs, lists and tables are understood; the same reader the file import uses converts it, so the result is identical to a typed article. |
| locale | string необязательный | Defaults to the handbook's own locale |
| category_id | string | null необязательный | |
| slug | string необязательный | Derived from the title when omitted |
| status | string необязательный | Defaults to `draft`. Publishing is what re-indexes it for the AI operator. draft, published, archived |
curl -X POST "https://api.tygy.ru/v1/kb/articles" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"handbook_id": "…", "title": "…", "markdown": "…"}'A published article. A key that also holds `kb:write` gets drafts and archived articles too; to any other key they are 404, like a missing id. Scope: `kb:read`.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный | |
| locale | string query · необязательный | Return only this locale’s body (all locales by default) |
curl -X GET "https://api.tygy.ru/v1/kb/articles/<id>" \
-H "Authorization: Bearer $TYGY_API_KEY"Every field is optional. Sending `markdown` replaces the body for that locale and requires `title` alongside it, because a translation carries both. Scope: `kb:write`.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
| Поле | Тип | Описание |
|---|---|---|
| title | string необязательный | |
| markdown | string необязательный | Requires `title` alongside it |
| locale | string необязательный | |
| category_id | string | null необязательный | |
| slug | string необязательный | |
| status | string необязательный | draft, published, archived |
curl -X PATCH "https://api.tygy.ru/v1/kb/articles/<id>" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Scope: `kb:write`.
| Поле | Тип | Описание |
|---|---|---|
| handbook_id | string обязательный | |
| slug | string обязательный | |
| translations | CategoryTranslationInputDto[] обязательный | |
| parent_id | string | null необязательный | Nest under another category |
curl -X POST "https://api.tygy.ru/v1/kb/categories" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"handbook_id": "…", "slug": "…", "translations": "…"}'Scope: `kb:write`.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
| Поле | Тип | Описание |
|---|---|---|
| slug | string необязательный | |
| parent_id | string | null необязательный | |
| translations | CategoryTranslationInputDto[] необязательный |
curl -X PATCH "https://api.tygy.ru/v1/kb/categories/<id>" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Multipart form: `file` and `handbook_id`. Images (PNG, JPEG, WebP, GIF, AVIF) and video (MP4, WebM, MOV, M4V), up to 50 MB — the same limits as the editor. Put the returned `url` on a line of its own in article Markdown: ``. Scope: `kb:write`.
curl -X POST "https://api.tygy.ru/v1/kb/media" \
-H "Authorization: Bearer $TYGY_API_KEY"Starts the same AI translation as the editor, from the article’s own language into each locale in `locales`, and answers 202 at once. Translations land with `source: "ai"`; read the article to see them. A locale a person has edited is skipped unless `overwrite_human` is true. On a published article the new translation is live as soon as it is written. Spends the project’s AI tokens — 402 `ai_budget_exhausted` when they are used up. Scope: `kb:translate`.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
| Поле | Тип | Описание |
|---|---|---|
| locales | string[] обязательный | Target locales. Each must be one of the handbook's locales, not its primary. |
| overwrite_human | boolean необязательный | Re-translate locales a person has edited too. Off by default: a human translation is never overwritten unless you ask. |
curl -X POST "https://api.tygy.ru/v1/kb/articles/<id>/translate" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"locales": ["…"]}'Headline numbers, the daily series and when the load actually lands. Scope: `analytics:read`.
| Поле | Тип | Описание |
|---|---|---|
| from | string query · необязательный | ISO-8601 start. Default: 30 days back. |
| to | string query · необязательный | ISO-8601 end. Default: now. The period must not exceed 366 days. |
| channel | string query · необязательный | Narrow to channels. Comma-separated, or repeat the parameter. |
| team | string query · необязательный | Team ids, comma-separated or repeated. |
| operator | string query · необязательный | User ids, comma-separated or repeated. |
curl -X GET "https://api.tygy.ru/v1/analytics/overview" \
-H "Authorization: Bearer $TYGY_API_KEY"Volume, share, resolved share and resolution speed per channel. Scope: `analytics:read`.
| Поле | Тип | Описание |
|---|---|---|
| from | string query · необязательный | ISO-8601 start. Default: 30 days back. |
| to | string query · необязательный | ISO-8601 end. Default: now. The period must not exceed 366 days. |
| channel | string query · необязательный | Narrow to channels. Comma-separated, or repeat the parameter. |
| team | string query · необязательный | Team ids, comma-separated or repeated. |
| operator | string query · необязательный | User ids, comma-separated or repeated. |
curl -X GET "https://api.tygy.ru/v1/analytics/channels" \
-H "Authorization: Bearer $TYGY_API_KEY"The same numbers per team, plus the team × channel breakdown. Scope: `analytics:read`.
| Поле | Тип | Описание |
|---|---|---|
| from | string query · необязательный | ISO-8601 start. Default: 30 days back. |
| to | string query · необязательный | ISO-8601 end. Default: now. The period must not exceed 366 days. |
| channel | string query · необязательный | Narrow to channels. Comma-separated, or repeat the parameter. |
| team | string query · необязательный | Team ids, comma-separated or repeated. |
| operator | string query · необязательный | User ids, comma-separated or repeated. |
curl -X GET "https://api.tygy.ru/v1/analytics/teams" \
-H "Authorization: Bearer $TYGY_API_KEY"Taken, closed and replies per operator. Scope: `analytics:read`.
| Поле | Тип | Описание |
|---|---|---|
| from | string query · необязательный | ISO-8601 start. Default: 30 days back. |
| to | string query · необязательный | ISO-8601 end. Default: now. The period must not exceed 366 days. |
| channel | string query · необязательный | Narrow to channels. Comma-separated, or repeat the parameter. |
| team | string query · необязательный | Team ids, comma-separated or repeated. |
| operator | string query · необязательный | User ids, comma-separated or repeated. |
curl -X GET "https://api.tygy.ru/v1/analytics/operators" \
-H "Authorization: Bearer $TYGY_API_KEY"Won revenue, conversion and the split by channel and operator. Scope: `analytics:read`.
| Поле | Тип | Описание |
|---|---|---|
| recognition | string query · необязательный | Which date the money counts on. Default: `won`. |
| from | string query · необязательный | ISO-8601 start. Default: 30 days back. |
| to | string query · необязательный | ISO-8601 end. Default: now. The period must not exceed 366 days. |
| channel | string query · необязательный | Narrow to channels. Comma-separated, or repeat the parameter. |
| team | string query · необязательный | Team ids, comma-separated or repeated. |
| operator | string query · необязательный | User ids, comma-separated or repeated. |
curl -X GET "https://api.tygy.ru/v1/analytics/revenue" \
-H "Authorization: Bearer $TYGY_API_KEY"AI evaluation of dialogs: average, distribution and the weekly trend. Scope: `analytics:read`.
| Поле | Тип | Описание |
|---|---|---|
| from | string query · необязательный | ISO-8601 start. Default: 30 days back. |
| to | string query · необязательный | ISO-8601 end. Default: now. The period must not exceed 366 days. |
| channel | string query · необязательный | Narrow to channels. Comma-separated, or repeat the parameter. |
| team | string query · необязательный | Team ids, comma-separated or repeated. |
| operator | string query · необязательный | User ids, comma-separated or repeated. |
curl -X GET "https://api.tygy.ru/v1/analytics/quality" \
-H "Authorization: Bearer $TYGY_API_KEY"How often the agent was used, and how those dialogs ended. Scope: `analytics:read`.
| Поле | Тип | Описание |
|---|---|---|
| from | string query · необязательный | ISO-8601 start. Default: 30 days back. |
| to | string query · необязательный | ISO-8601 end. Default: now. The period must not exceed 366 days. |
| channel | string query · необязательный | Narrow to channels. Comma-separated, or repeat the parameter. |
| team | string query · необязательный | Team ids, comma-separated or repeated. |
| operator | string query · необязательный | User ids, comma-separated or repeated. |
curl -X GET "https://api.tygy.ru/v1/analytics/bot" \
-H "Authorization: Bearer $TYGY_API_KEY"The channels, teams and operators that actually appear in this project — so a caller filters by real values instead of guessing. Scope: `analytics:read`.
curl -X GET "https://api.tygy.ru/v1/analytics/filters" \
-H "Authorization: Bearer $TYGY_API_KEY"Newest first. Scope: `conferences:read`.
| Поле | Тип | Описание |
|---|---|---|
| limit | string query · необязательный | Page size, 1…100 |
| starting_after | string query · необязательный | Cursor from the previous page’s `next_cursor` |
curl -X GET "https://api.tygy.ru/v1/meetings" \
-H "Authorization: Bearer $TYGY_API_KEY"The summary and the transcript are present once the meeting reaches `ready`; before that they are null. Scope: `conferences:read`.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
curl -X GET "https://api.tygy.ru/v1/meetings/<id>" \
-H "Authorization: Bearer $TYGY_API_KEY"Scope: `webhooks:manage`.
curl -X GET "https://api.tygy.ru/v1/webhooks" \
-H "Authorization: Bearer $TYGY_API_KEY"The signing secret is returned once, here. Verify a delivery as `HMAC-SHA256("<X-Webhook-Timestamp>.<raw body>", secret)` against `X-Webhook-Signature`.
| Поле | Тип | Описание |
|---|---|---|
| name | string обязательный | How the subscription is labelled in the settings list |
| url | string обязательный | https:// endpoint (http:// allowed for localhost only) |
| events | string[] обязательный |
curl -X POST "https://api.tygy.ru/v1/webhooks" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "…", "url": "…", "events": ["…"]}'| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
curl -X GET "https://api.tygy.ru/v1/webhooks/<id>" \
-H "Authorization: Bearer $TYGY_API_KEY"| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
| Поле | Тип | Описание |
|---|---|---|
| name | string необязательный | |
| url | string необязательный | |
| events | string[] необязательный | |
| active | boolean необязательный | false pauses deliveries; true clears a pause |
curl -X PATCH "https://api.tygy.ru/v1/webhooks/<id>" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
curl -X DELETE "https://api.tygy.ru/v1/webhooks/<id>" \
-H "Authorization: Bearer $TYGY_API_KEY"The new secret is returned once. Deliveries in flight are signed with the new one.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
curl -X POST "https://api.tygy.ru/v1/webhooks/<id>/rotate-secret" \
-H "Authorization: Bearer $TYGY_API_KEY"Queues a `webhook.test` delivery with a sample body; watch it in the log. The delivery is asynchronous, so the answer is `202` — it says the event was queued, not that the endpoint replied.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
curl -X POST "https://api.tygy.ru/v1/webhooks/<id>/test" \
-H "Authorization: Bearer $TYGY_API_KEY"Newest first, kept for 7 days.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный | |
| limit | string query · обязательный |
curl -X GET "https://api.tygy.ru/v1/webhooks/<id>/deliveries" \
-H "Authorization: Bearer $TYGY_API_KEY"The notes on the contact card, newest first. Scope: `notes:read`.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный | |
| limit | string query · необязательный | Page size, 1…100 |
| starting_after | string query · необязательный | Cursor from the previous page’s `next_cursor` |
curl -X GET "https://api.tygy.ru/v1/contacts/<id>/notes" \
-H "Authorization: Bearer $TYGY_API_KEY"Shown on the contact card as written by «API · <key name>». Scope: `notes:write`.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
| Поле | Тип | Описание |
|---|---|---|
| body | string обязательный | Plain text, up to 5000 characters |
curl -X POST "https://api.tygy.ru/v1/contacts/<id>/notes" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"body": "…"}'The project’s shared saved replies, newest first, a page at a time; `q` finds text in the title or the shortcut. Operators’ personal macros are not included. Scope: `macros:read`.
| Поле | Тип | Описание |
|---|---|---|
| limit | string query · необязательный | Page size, 1…100 |
| starting_after | string query · необязательный | Cursor from the previous page’s `next_cursor` |
| q | string query · необязательный | Finds the text in the title or the shortcut |
curl -X GET "https://api.tygy.ru/v1/macros" \
-H "Authorization: Bearer $TYGY_API_KEY"Scope: `macros:write`. There is no delete: removing a macro is for a person.
| Поле | Тип | Описание |
|---|---|---|
| title | string обязательный | Up to 120 characters |
| body | string обязательный | Up to 8000 characters; `{{placeholders}}` allowed |
| shortcut | string | null необязательный | A leading «/» is dropped |
curl -X POST "https://api.tygy.ru/v1/macros" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title": "…", "body": "…"}'| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
curl -X GET "https://api.tygy.ru/v1/macros/<id>" \
-H "Authorization: Bearer $TYGY_API_KEY"Absent fields stay.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
| Поле | Тип | Описание |
|---|---|---|
| title | string необязательный | |
| body | string необязательный | |
| shortcut | string | null необязательный | null removes it |
curl -X PATCH "https://api.tygy.ru/v1/macros/<id>" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Asks the connected telephony to ring `operator_id`’s extension first and dial the customer when they pick up — what «Call» does in the inbox. 202 means the provider accepted the request; the call itself appears as a card in the conversation. One attempt per operator at a time; an unclear outcome is never retried for you. Scope: `calls:make`.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
| Поле | Тип | Описание |
|---|---|---|
| operator_id | string необязательный | User whose extension rings first; the customer is dialled when they pick up. Required for an API key — a key has no phone of its own. |
| phone | string необязательный | One of the contact's own numbers (any spelling). Defaults to the contact's primary phone; a number not on the contact is a 422 — add it to the contact first. |
curl -X POST "https://api.tygy.ru/v1/conversations/<id>/calls" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'The AI score, the customer’s rating and the reviewer’s verdict. Scope: `quality:read`.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
curl -X GET "https://api.tygy.ru/v1/conversations/<id>/quality" \
-H "Authorization: Bearer $TYGY_API_KEY"Rates a CLOSED conversation 1–5; a score of 1–3 needs a `comment`. Replaces the previous verdict, notifies the responsible operator, and a disagreement with the AI score teaches the AI judge — exactly as a review in the inbox. Scope: `quality:write`.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
| Поле | Тип | Описание |
|---|---|---|
| score | number обязательный | Integer 1–5 |
| comment | string | null необязательный | Required for scores 1–3: a low mark without a reason teaches nobody |
curl -X PUT "https://api.tygy.ru/v1/conversations/<id>/quality" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"score": 1}'The notes on the client company card, newest first. Scope: `notes:read`.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный | |
| limit | string query · необязательный | Page size, 1…100 |
| starting_after | string query · необязательный | Cursor from the previous page’s `next_cursor` |
curl -X GET "https://api.tygy.ru/v1/organizations/<id>/notes" \
-H "Authorization: Bearer $TYGY_API_KEY"Only for a key that acts on behalf of an employee («Действует от имени»): the note is that person’s, shown as «<employee> · API · <key name>». An integration key with no author gets 409 `author_required`. Scope: `notes:write`.
| Поле | Тип | Описание |
|---|---|---|
| id | string path · обязательный |
| Поле | Тип | Описание |
|---|---|---|
| body | string обязательный | Plain text, up to 5000 characters |
curl -X POST "https://api.tygy.ru/v1/organizations/<id>/notes" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"body": "…"}'