Skip to main content
Use Kommo through Corsair: one client, typed API calls. Create a private integration in Kommo, then generate a long-lived token under its Keys and scopes tab. A token lasts from one day to five years, and only an account administrator can create one. It is sent as a bearer token. A long-lived token has no refresh token: once it expires, every call answers 401 until a new token is generated and stored. Two things are needed before the first call:
  • The account subdomain. Every account is served from its own host: acme for acme.kommo.com, under /api/v4. Connect delivers it as the subdomain credential; the plugin option of the same name overrides it. A call with neither throws before any request is sent.
  • A pipeline and stage. A lead’s pipeline_id and status_id come from pipelines.list. A lead created without them lands in the first stage of the main pipeline.
Things to know before you call:
  • Timestamps are Unix seconds. created_at, updated_at, closed_at, closest_task_at and a task’s complete_till are integers counting seconds, not ISO strings. The plugin passes them through as Kommo sends them.
  • Paging is by page number. A list takes page and limit (250 at most) and returns a _page and _links block. The plugin adds next_page, which is null on the last page. Kommo answers an empty list with 204 No Content, which the plugin returns as an empty page.
  • Filters are bracketed query keys. pipeline_id and the date filters become filter[pipeline_id][] and filter[created_at][from] on the wire, which is how Kommo documents them. The date filters take Unix seconds. A stage filter is status_id together with its pipeline_id, sent as filter[statuses][0][...]; Kommo allows only one stage in one pipeline per request.
  • A write takes an array. leads.create, contacts.create and tasks.create post up to 250 entities at once, and the update routes are PATCH with each entity carrying its id. A field left out of an update is untouched.
  • Custom field values go by field_id or field_code. The plugin refuses a value that names neither, because Kommo would reject it. A value’s type follows its field_type, so a date_time field takes a Unix timestamp.
  • A new contact needs a name. name, or first_name and last_name; a contact created with neither is refused before the call. An update can change any one field.
  • A task needs a deadline. complete_till is required, in Unix seconds.
  • Rate limits. Kommo allows seven requests a second and answers 429 past that, with Retry-After, which the plugin honours before backing off. A 402 means the account’s paid or trial period has ended, and is not retried. Only reads are replayed after a 5xx, because a retried lead create would make a second lead.
  • Webhooks. Kommo does send webhooks, but this plugin does not receive them; that is a separate integration surface.
What you get:
  • 14 typed API operations

Setup

1

Install

2

Add the plugin

corsair.ts
With multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.
3

Choose authentication

4

Connect a tenant

Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.

Example API calls

List the first page of leads
Create a lead
See the full list on the API page.

What’s next

API reference

Every kommo.api.* operation with input and output types.

Connect / OAuth

createLink, Hub delivery, and tenant connect flows.

Use with agents

Expose this plugin’s operations as MCP tools.