App platform

App platform

Apps extend Kweko for many workspaces at once: they call the API with OAuth tokens, get lifecycle webhooks, and add their own UI inside Kweko with blocks or frames.

How an app fits together

PieceWhat it is
App recordName, icon, description, category, scopes, redirect URIs, your backend URL and the UI you contribute. You edit it in the developer console at https://developers.kweko.uz.
OAuth 2.0 with PKCEWhen a workspace installs your app, your server gets an access token and a refresh token for that workspace. See OAuth for apps.
BlocksSmall native UI (cards, lists, buttons, forms, tables, charts) that your backend returns as JSON and Kweko draws with its own components. See Blocks.
FramesYour own web page inside Kweko, in a sandboxed iframe, talking to Kweko through @kweko/sdk. See Frames and the SDK.
Lifecycle webhooksapp.installed, app.scopes_changed, app.uninstalled, app.disabled and app.enabled (an admin turned the app off or on without uninstalling it), the action health events and workspace.plan_changed, sent to your webhook URL and signed with your client secret. See OAuth for apps.
LimitsEach installation has its own rate bucket and daily quota, sized by the workspace's plan. Read them from GET /v1/limits or workspace.limits in the frame context, and follow workspace.plan_changed. See Rate limits.
EventsWebhook events from the event catalog (lead.won, task.created…), sent to the same webhook URL for every installation. List them as events in the manifest.
Automation triggers and actionsYour own triggers that start Kweko automations, and steps that call your backend and return outputs. See Automation triggers and actions.

An app that only syncs data needs just OAuth and the API. UI is optional.

Extension points

Your app adds UI through contributions: each one names an extension point, how it renders and a localized title. The catalog, generated from the API:

Extension pointWhere it appearsRender asGets the record
nav.sidebarA link in the left sidebar, under Apps. Three pinned apps show, the rest sit under More apps.linkNo
page.fullA whole page inside Kweko, opened from a sidebar link.frame, blocksNo
page.actionA button in the header of a list page (Leads, Contacts, Tasks), also under the Apps menu there.blocks, frame, linkNo
record.tabA tab on a record page. Two tabs fit in the strip, the rest go under More.blocks, frameYes
record.sidebarA card in the right rail of a record. On narrow screens it moves to an Apps tab.blocks, frameYes
record.action.menuAn item in the ⋯ actions menu of a record.blocks, frame, linkYes
list.bulk.actionA button in the bar that appears when rows are selected in a list.blocks, frame, linkYes
call.panelA card beside a live call.blocks, frameYes
composer.modeAn extra mode in the message box, next to Reply and Note.blocks, frameYes
dashboard.widgetA card on the dashboard.blocks, frameNo
settings.pageA page inside Settings for configuring your app.schema, frameNo
  • link (only nav.sidebar) adds a sidebar entry that opens one of your page.full contributions (target).
  • schema (only settings.page) renders a settings form from your app's settings schema.
  • Points that get the record receive it in their context as entity (type and id, or ids for bulk actions).
  • Every point in the catalog is shown in Kweko. record.tab and record.sidebar take the record types they apply to; the old lead.tab, contact.tab and lead.panel.card are still accepted and map to them.

A contribution has an id (lowercase letters, digits, _ and -, up to 40 characters, unique in the app), point, render, title (by language code, up to 60 characters; the keys can be every language Kweko supports, currently Uzbek (Latin), Russian and English: uz, ru and en, and a key for any other language is rejected), and for frames a path on your backend. An app can have up to 30 contributions.

Start building

  1. Sign in at https://developers.kweko.uz and create a vendor account (a name, and optionally a website and support email).
  2. Create an app. Copy the client secret (kwk_cs_…) now: it is shown once. The app's id (app_…) is its OAuth client id.
  3. Add a redirect URI, the scopes you need, your backend URL and, if you add UI, your contributions.
  4. Test install the app into a workspace where you are an owner or admin. Only you can install an app before it is published.
  5. When it works, submit it for review.

The SDK

@kweko/sdk has two entry points: @kweko/sdk for code inside a frame, and @kweko/sdk/server for your backend (signature checks, PKCE and token helpers, and types for blocks). It is plain ESM with no dependencies and runs in browsers, Node 18+, Deno, Bun and Workers.

The package lives in the Kweko repository (packages/sdk) and is not on npm yet. Until it is, the protocols below are all you need: every helper is a few lines you can write yourself.