Getting started

Your first API call in five minutes.

1. Create a key

In the app open Settings → API & MCP and press «Create key». Tick only the rights the integration actually needs: reading conversations is not permission to reply to customers, and replying is not permission to write internal notes.

The key is shown once. Copy it straight away and put it where you keep passwords. If you lose it, revoke the old key and create a new one — that is the safe move.

A key belongs to the project, not to a person. It keeps working after whoever created it leaves the company.

2. Check the key

curl -H "Authorization: Bearer $TYGY_API_KEY" https://api.tg-desk.com/v1/me

The answer names the key, its scopes, your project and your limits:

{
  "key": { "id": "…", "name": "CRM sync", "scopes": ["contacts:read"] },
  "company": { "id": "…", "name": "Acme", "slug": "acme", "brand": "TG Desk" },
  "rate_limit": { "company_per_minute": 600, "key_per_minute": 300 },
  "api_version": "v1"
}

Use this same call as the connection test inside your integration.

3. Read some data

curl -H "Authorization: Bearer $TYGY_API_KEY" \
  "https://api.tg-desk.com/v1/conversations?status=open&limit=20"

Lists come back a page at a time, by cursor:

{ "data": [ … ], "has_more": true, "next_cursor": "eyJrIjoi…" }

Pass next_cursor as starting_after to get the next page. See Pagination.

4. Where to go next

Base URL

MarketURL
Russia (Tygy)https://api.tygy.ru
International (TG Desk)https://api.tg-desk.com

Use the host of the brand your project is registered under. The company.brand field in /v1/me tells you which one.