AI widgets (headless protocol)
Partners can ship modules that return presentation Cards for Airlead AI surfaces. Airlead calls your HTTPS endpoint with a signed JSON request; you respond with Widget Protocol v1 payloads. This is not the same as lead ingest or Connect delivery. Modules enrich the UI; they do not mutate workspace data.Concepts
Surfaces
ai.chat.inline is reserved for Airlead AI tool results (drafts, delivery repair, …). Partners must not return workflow cards such as draft, deliveryRepair, or confirmDraft actions.
Registration
Airlead registers your module server-side (slug, publisher, HTTPS endpoint, surfaces, scopes). After registration, a workspace admin enables it under Settings → Apps & Module → Partner-Widgets. Local / staging helper (Airlead operators):signingSecret. Store it with the partner; it is never exposed to browsers.
Endpoint rules:
- Public
https://URL, or - Same-origin mock only:
/api/widgets/partner-mock(development)
Request (Airlead → partner)
POST your dataEndpoint with:
Signature
Canonical string:v1=.
Reject requests when:
- Signature missing or mismatch
- Timestamp skew greater than 5 minutes
Body
record only contains fields granted by scopes. Default partner scopes exclude email and phone unless explicitly granted at registration.
For ai.chat.empty, Airlead may send a workspace-level placeholder record (id like workspace:…). Prefer workspace-level metrics in that case; do not assume a real lead id.
Response (partner → Airlead)
versionmust be"1"slugmust match the requestwidgetsis an array of Card payloads- Airlead filters kinds to the partner allowlist ∩ surface matrix
- Actions may only be
linkorfollowUp(confirmDraftis stripped)
Allowed Card kinds (partner)
trendMetric
Large number with optional delta, period, footnote, and actions.
insight
Headline + body + optional evidence prompts (good for alerts).
entityProfile
Compact entity summary (Command Deck).
actionRow
Action buttons only — link / followUp.
Scopes
Errors
Return HTTP 2xx only with a valid Protocol v1 body. Non-2xx responses are treated as partner errors. Airlead maps failures to soft UI errors (timeout, unauthorized, invalid_response, partner_error, unavailable) and does not block the rest of the deck.
Enablement
- Module registered and
published - Workspace enables it under Apps & Module
- Surfaces include the target surface
- Endpoint reachable from Airlead servers with a valid signature
Security checklist
- Use TLS and rotate the signing secret if leaked
- Verify signature + timestamp on every request
- Do not log full record payloads with PII
- Never return Airlead workflow cards or draft confirmations
- Keep responses under the timeout budget
Related
- Developers introduction
- Connect integration (workspace-to-workspace delivery — separate from widgets)
- Product: Settings → Apps & Module

