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"| Поле | Тип | Описание |
|---|---|---|
| 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 |
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"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 |
curl -X POST "https://api.tygy.ru/v1/contacts" \
-H "Authorization: Bearer $TYGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "…"}'| Поле | Тип | Описание |
|---|---|---|
| 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 |
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"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"Titles only; fetch one article for its body.
| Поле | Тип | Описание |
|---|---|---|
| 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 · необязательный |
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": "…"}'| Поле | Тип | Описание |
|---|---|---|
| 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 '{}'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"