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
| Piece | What it is |
|---|---|
| App record | Name, 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 PKCE | When a workspace installs your app, your server gets an access token and a refresh token for that workspace. See OAuth for apps. |
| Blocks | Small native UI (cards, lists, buttons, forms, tables, charts) that your backend returns as JSON and Kweko draws with its own components. See Blocks. |
| Frames | Your own web page inside Kweko, in a sandboxed iframe, talking to Kweko through @kweko/sdk. See Frames and the SDK. |
| Lifecycle webhooks | app.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. |
| Limits | Each 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. |
| Events | Webhook 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 actions | Your 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 point | Where it appears | Render as | Gets the record |
|---|---|---|---|
nav.sidebar | A link in the left sidebar, under Apps. Three pinned apps show, the rest sit under More apps. | link | No |
page.full | A whole page inside Kweko, opened from a sidebar link. | frame, blocks | No |
page.action | A button in the header of a list page (Leads, Contacts, Tasks), also under the Apps menu there. | blocks, frame, link | No |
record.tab | A tab on a record page. Two tabs fit in the strip, the rest go under More. | blocks, frame | Yes |
record.sidebar | A card in the right rail of a record. On narrow screens it moves to an Apps tab. | blocks, frame | Yes |
record.action.menu | An item in the ⋯ actions menu of a record. | blocks, frame, link | Yes |
list.bulk.action | A button in the bar that appears when rows are selected in a list. | blocks, frame, link | Yes |
call.panel | A card beside a live call. | blocks, frame | Yes |
composer.mode | An extra mode in the message box, next to Reply and Note. | blocks, frame | Yes |
dashboard.widget | A card on the dashboard. | blocks, frame | No |
settings.page | A page inside Settings for configuring your app. | schema, frame | No |
link(onlynav.sidebar) adds a sidebar entry that opens one of yourpage.fullcontributions (target).schema(onlysettings.page) renders a settings form from your app's settings schema.- Points that get the record receive it in their context as
entity(typeandid, oridsfor bulk actions). - Every point in the catalog is shown in Kweko.
record.tabandrecord.sidebartake the record types they apply to; the oldlead.tab,contact.tabandlead.panel.cardare 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
- Sign in at
https://developers.kweko.uzand create a vendor account (a name, and optionally a website and support email). - Create an app. Copy the client secret (
kwk_cs_…) now: it is shown once. The app's id (app_…) is its OAuth client id. - Add a redirect URI, the scopes you need, your backend URL and, if you add UI, your contributions.
- Test install the app into a workspace where you are an owner or admin. Only you can install an app before it is published.
- 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.