- The account subdomain. Every account is served from its own host:
acmeforacme.kommo.com, under/api/v4. Connect delivers it as thesubdomaincredential; 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_idandstatus_idcome frompipelines.list. A lead created without them lands in the first stage of the main pipeline.
- Timestamps are Unix seconds.
created_at,updated_at,closed_at,closest_task_atand a task’scomplete_tillare integers counting seconds, not ISO strings. The plugin passes them through as Kommo sends them. - Paging is by page number. A list takes
pageandlimit(250 at most) and returns a_pageand_linksblock. The plugin addsnext_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_idand the date filters becomefilter[pipeline_id][]andfilter[created_at][from]on the wire, which is how Kommo documents them. The date filters take Unix seconds. A stage filter isstatus_idtogether with itspipeline_id, sent asfilter[statuses][0][...]; Kommo allows only one stage in one pipeline per request. - A write takes an array.
leads.create,contacts.createandtasks.createpost up to 250 entities at once, and the update routes are PATCH with each entity carrying itsid. A field left out of an update is untouched. - Custom field values go by
field_idorfield_code. The plugin refuses a value that names neither, because Kommo would reject it. A value’s type follows itsfield_type, so adate_timefield takes a Unix timestamp. - A new contact needs a name.
name, orfirst_nameandlast_name; a contact created with neither is refused before the call. An update can change any one field. - A task needs a deadline.
complete_tillis 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.
- 14 typed API operations
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
Store the Kommo API key before the first call: More: API Key
pnpm corsair setup --plugin=kommo --tenant=acme api_key=<your-key> (leave out --tenant without multiTenancy), or pass it as key in the plugin options. With Hub, each tenant enters their own key on the connect page. See API key auth.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 leadsWhat’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.