kennraDocs

App manifest

kennra-app.yaml declares what an app is and what it may do. Kennra builds the consent screen from it, checks every call against it, and refuses what it doesn't declare. JSON works too.

Check a manifest before you register it:

kennra apps validate -f kennra-app.yaml

The validator lists problems, which refuse the manifest, and warnings, such as a missing Norwegian label. @kennra/app-sdk/manifest exports the same check as validateManifest.

A full example

A partner app that mirrors orders from a shop, answers live order lookups and listens to deal events:

apiVersion: kennra.app/v1
id: shop-sync
version: 1.0.0
name: Shop sync
icon: data:image/svg+xml;base64,…
publisher:
  name: Shop AS
  kind: partner
  website: https://shop.example
  support: support@shop.example
  privacyPolicy: https://shop.example/privacy
description:
  en: Mirrors customers and orders from the shop, with live order details.
  nb: Speiler kunder og ordre fra butikken, med ordredetaljer hentet live.
 
access:
  piiLevel: contact_basic
  scopes:
    - scope: kennra:party:write
      purposes: [organization.management]
      why:
        en: Create the people and companies that buy in the shop.
        nb: Opprette personene og virksomhetene som handler i butikken.
    - scope: kennra:commerce:write
      purposes: [organization.management]
      why:
        en: Record orders as facts with the shop as the source.
        nb: Registrere ordre som fakta, med butikken som kilde.
    - scope: kennra:read
      purposes: [sales.b2b]
      why:
        en: Receive deal events.
        nb: Motta hendelser om avtaler.
  writes:
    kinds: [Person, Organization, CommerceFact]
    externalIdentifiers: [customer]
 
identifiers:
  issuer: shop.example
  schemes:
    - scheme: customer
      appliesTo: [person]
      label: { en: Shop customer, nb: Butikkunde }
      strength: strong
      normalize: trim_lower
      piiClass: contact
 
capabilities:
  ingest:
    factTypes: [ORDER]
    sourceSystem: shop
    urn: "shop:{tenant}:{type}:{id}"
    lanes: [live, import]
  lookups:
    - object: order.details
      refPattern: "shop:*:order:*"
      url: /lookup/order
      timeoutMs: 1000
      purposes: [organization.management, sales.b2b]
  schedules:
    - id: poll
      every: 15m
      url: /schedule/poll
  webhooks:
    url: /kennra/events
    events: [kennra.deal.won]
  lifecycle:
    url: /kennra/lifecycle
  privacy:
    erasure: none
    storesPersonalData: false
 
settings:
  schema:
    type: object
    required: [apiToken]
    properties:
      apiToken: { type: string, format: secret, title: { en: API token, nb: API-token } }
 
dataResidency:
  processing: [aws:eu-north-1]
health:
  url: /healthz

URLs can be absolute, or a path such as /lookup/order that Kennra resolves against the base URL the app is registered with.

Top-level fields

FieldRequiredMeaning
apiVersionYeskennra.app/v1
idYesLowercase letters, digits and hyphens, 3–63 characters. It never changes. A private app's id is <workspace>--<slug>
versionYesSemver, for example 1.4.0. See Versions
nameYesUp to 80 characters
iconNoA square image with its own background, inline as a data: URL (SVG preferred). Without one, Kennra shows the app's initial
publisherYesname, kind (first_party, partner or private), and optionally website, support, security, privacyPolicy, terms and dpa
descriptionYes{ en, nb }. English is required and the fallback
accessYesWhat the app asks for. See below
identifiersNoThe external identifier schemes the app owns
capabilitiesNoWhat Kennra calls the app for, and what the app sends
settings.schemaNoThe install form
dataResidencyListed appsprocessing (for example aws:eu-north-1) and subprocessors. Shown on the consent screen
limitsNorequestsPerMinute, ingestPerMinute and lookupConcurrency (at most 32). Kennra caps them
health.urlWith ingest, lookups or schedulesKennra polls it

Labels and texts that people read take a plain English string or { en, nb }. The consent screen is in Norwegian and English, and falls back to English.

access

FieldMeaning
piiLevelnone, pseudonymous, contact_basic or full
scopes[]Each scope with its purposes and a why the consent screen shows word for word. At least one, except for an MCP client app
writeskinds (Person, Organization, CommerceFact, Interaction, Deal, Task, Note), traits and externalIdentifiers. Each Kind needs its write scope, for example kennra:commerce:write for CommerceFact. Writes outside the list fail with UNDECLARED_WRITE
reads.fieldsThe fields the app reads, for the consent screen, for example Person.identifiers
actsForMemberstrue lets the app exchange a signed-in member's token for one that acts for them
delegationtrue lets the app ask for a member's token with requested_subject, without the member's sign-in. Off in every installation until a workspace admin turns it on and picks the members. Private apps have delegation without declaring it

Both ways of acting for a member give the intersection of the app's grant and the member's access. See Acting for a member.

An app may ask for kennra:schema:draft to propose traits and custom Kinds; a schema owner publishes them. kennra:privacy, kennra:subject, kennra:workspace:write, kennra:apps:manage and every other schema scope are refused with SCOPE_NOT_FOR_APPS. An old scope or purpose name is refused, and the message names the current one.

identifiers

An app owns its external identifier schemes under an issuer, a domain it controls. In Kennra an identifier is { type: external, issuer, scheme, value }.

FieldMeaning
schemeA lowercase slug, for example customer
appliesToperson, organization or both
label, descriptionShown next to the identifier
strengthstrong identifiers resolve people and companies and attach facts; weak ones don't. Default strong
normalizetrim, trim_lower or digits
piiClasscontact (encrypted and searched like an email) or none

capabilities

FieldWhat it does
ingestfactTypes (ORDER, QUOTE, SUBSCRIPTION, INVOICE, INTERACTION), sourceSystem (the source label in data), urn and lanes (live, import). A capture app can add backfill: schedule (Kennra ticks it when a person or company becomes known) and yearsSetting (an integer setting with how many years back, at most 10). The app then reads GET /apps/capture-backfills (the person's addresses or the company's domains), captures what it finds and reports progress on POST /apps/capture-backfills/report. Needs kennra:interaction:write
lookups[]Details Kennra fetches live from the app. See Live lookups
objects[]Object types that external trait fields point at: type, a versioned contract, label, typed fields and scope filters. Needs the lookups object.search and object.resolve. See External fields
webhooksurl and the events the app receives: Kennra's own types such as kennra.deal.won, and the workspace's own events by name or as custom.*. Needs kennra:read. See Webhooks
events.emits[]The workspace's own event types the app sends: custom.<name>, or custom.<prefix>_* for a family, at most 50. The consent screen lists them. Each type must be registered in the workspace with its schema, and Kennra refuses any other. Needs kennra:events:emit. See Your own events
schedules[]Ticks from Kennra's scheduler: id, every (for example 15m, at least 5 minutes) or a daily cron (M H * * *, UTC), lane and url. At most 10
lifecycle.urlInstall, update, pause, resume and uninstall calls. Required for listed apps
privacyerasure (receipt or none), storesPersonalData and, with receipt, the url Kennra calls to erase a person. Required for listed apps
traitsThe trait namespace the app owns and its definitions. Only the app writes values in it. kennra and custom are reserved
segmentSyncurl, batchSize (at most 1,000, default 500) and targets that receive segment membership, such as a customer group. A target with contactPoints: [email] also gets each member's address, which needs PII level contact_basic or full. Needs kennra:segment:read
programTargetsurl, batchSize and targets that an admin connects to a program or one of its stages, for example "start flow X" in a sending tool. Each target has an id, a label, config fields the admin fills in, requiredConsent and contactPoints. Kennra sends the enrollments that enter, move and leave as a signed delta. Needs kennra:segment:read for the programs' purposes. See Sending tools
documentsThe app is a file store or signing service: a label, the hosts of its file links (at most 20), so a pasted link shows as the app's, and an optional picker (url, label, requiresSetting) where a member picks files. Needs kennra:work:write
userConnections[]Per-member connections: kind (calendar, mailbox, drive or transcripts), label, connectUrl, disconnectUrl, requiresSetting (a boolean setting that must be on before Kennra offers the connection) and consentLabel (the permission the member ticks on the provider's consent screen, in the provider's words, nb and en: Kennra names it when the provider granted less)
setupThe app's own setup flow after install: url, the button label, description, help and connects (a userConnections kind the admin's own account can connect during setup)
connectionTest.urlKennra calls it when an admin selects Test connection on the settings form. Nothing is saved
mcpClientThe app stands for an MCP client. See below
ui.domains[]The hosts the app's own pages and media live on, for example app.example.com. A link the app returns from a lookup must be on one of these, or on a host of ui.links
ui.links[]Deep links on Person, Organization, CommerceFact, Deal or Interaction: a label per language and an https URL template with a literal host. Kennra fills in the template for each record and shows Open in the app. Tokens: {id}, {settings.<key>} (not a secret), {identifier:<issuer>/<scheme>} (your own scheme, piiClass: none), {orgNumber:<country>} (Organization), {sourceId} (CommerceFact, Interaction) and {instance} (CommerceFact). when: { factType: [ORDER, QUOTE] } narrows a CommerceFact link. A link shows only when your installation is active, its grant covers the caller's purpose and every token has a value on the record

mcpClient

An MCP client app has no grant of its own: scopes can be empty, and it needs no lifecycle or health URL. Each connection gets the grant the person picks on the consent screen.

access:
  piiLevel: none
  scopes: []
capabilities:
  mcpClient:
    clientIds:
      - https://client.example/oauth/metadata.json
    redirectUris:
      - https://client.example/oauth/callback
      - http://localhost/callback
      - https://relay.client.example/r/*
    refreshTokens: rotate
    defaultTemplate: read_only
    connectUrl: https://client.example/add?name={name}&url={url}
    instructions:
      en: Paste the URL under Settings and Connectors.
      nb: Lim inn URL-en under Innstillinger og Koblinger.
FieldMeaning
clientIdsClient ID Metadata Document URLs: https with a path
redirectUrisHow Kennra recognises a client that registers itself (RFC 7591): every one of its redirect URIs must be listed. An http loopback URI matches any port. An https entry ending in /* matches every path below it on that host; the client still registers exact URIs
refreshTokensrotate (default): every refresh gives a new refresh token, and an old one seen again ends the connection. reuse: a connection keeps its first refresh token, for a client that can't store a rotated one
defaultTemplateThe template the consent screen picks first. Default read_only
connectUrlA link that adds the MCP URL in the client, with {url} and {name} filled in. Without it, people paste the URL
instructionsHow to connect, in a sentence or two

settings.schema

The install form, as a small JSON Schema: type: object, required and properties. Each property has a type (string, boolean, number or integer) and optionally title, description, default, format and order.

  • format: secret sends the value to the installation's secret store. Kennra never shows it again, and the app reads it with GET /apps/installation?include=secrets.
  • visibility is default, advanced (behind Advanced) or demo. A demo setting is accepted only in demo and test workspaces, and can't be required.

Versions

A registered version never changes. Registering the same id and version with another manifest is refused with VERSION_IMMUTABLE, so change the version when you change the manifest.

Kennra compares manifests after it fills in defaults. A manifest that leaves out a field Kennra added later with a default is the same manifest, so it needs no new version. Setting such a field to something else is a change.

A published app gets wider access only through a new version that an admin approves.

Validation codes

CodeWhen
INVALID_YAML, INVALID_SHAPE, UNKNOWN_KEYThe file doesn't parse, a field has the wrong type, or a key is unknown
NO_SCOPES, UNKNOWN_SCOPE, SCOPE_NOT_FOR_APPS, UNKNOWN_PURPOSEThe scopes or purposes can't be granted
WRITE_WITHOUT_SCOPEaccess.writes names a Kind or traits without the scope to write them
INVALID_ISSUER, INVALID_SCHEME, DUPLICATE_SCHEME, UNKNOWN_SCHEMEThe identifiers are malformed, or writes.externalIdentifiers names a scheme the app doesn't declare
TOO_MANY_SCHEDULES, SCHEDULE_WITHOUT_TIME, SCHEDULE_TOO_FREQUENTMore than 10 schedules, no every or cron, or less than 5 minutes apart
WEBHOOKS_WITHOUT_READ, SEGMENT_SYNC_WITHOUT_SCOPEWebhooks without kennra:read, or segment sync without kennra:segment:read
RESERVED_NAMESPACE, OUTSIDE_NAMESPACEThe trait namespace is kennra or custom, or a definition is outside it
HEALTH_REQUIRED, REQUIRED_FOR_LISTED, ERASURE_URL_REQUIREDA required URL or declaration is missing
MCP_CLIENT_UNIDENTIFIED, INVALID_CLIENT_ID, INVALID_REDIRECT_URI, INVALID_CONNECT_URLThe mcpClient block can't identify a client
INVALID_DOMAIN, INVALID_LINKA ui.domains entry isn't a lowercase host name, or a ui.links URL isn't https, has a token in its host, or uses a token Kennra doesn't know or that isn't allowed there (a secret setting, another issuer's identifier, a personal identifier scheme)
CONTRACT_NOT_OWNED, OBJECTS_WITHOUT_LOOKUPSAn object type's contract doesn't start with the app id, or object types are declared without both object.search and object.resolve
DUPLICATE_OBJECT_TYPE, DUPLICATE_FIELD, DUPLICATE_FILTER, UNKNOWN_FIELDAn object type, field or filter is declared twice, a field uses an envelope key, or a filter names a field that isn't text or a text list
BACKFILL_WITHOUT_SCOPE, UNKNOWN_SCHEDULE, UNKNOWN_SETTINGHistory backfill without kennra:interaction:write, or it names a schedule or setting the manifest doesn't declare. UNKNOWN_SETTING also covers a requiresSetting that isn't a boolean setting
DOCUMENTS_WITHOUT_SCOPE, EMITS_WITHOUT_SCOPE, PROGRAM_TARGETS_WITHOUT_SCOPEdocuments without kennra:work:write, events without kennra:events:emit, or program targets without kennra:segment:read
CONSENT_GRANT_WITHOUT_WRITE, CONSENT_IMPORT_WITHOUT_GRANT, CONTACT_POINTS_NEED_PIIkennra:consent:grant without kennra:consent:write, kennra:consent:import without both, or a target with contactPoints below PII level contact_basic
DECIDE_WITHOUT_MEMBERkennra:suggestions:decide without access.delegation or access.actsForMembers
DUPLICATE_TARGET, UNKNOWN_CONNECTION, DEMO_SETTING_REQUIREDA sync or program target id is declared twice, setup.connects names a kind that isn't under userConnections, or a demo setting is required
MISSING_LABEL, MISSING_TRANSLATION, MISSING_PRIVACY_POLICYWarnings: a label, description or why text has no Norwegian (nb) text, or a listed app links no privacy policy
VERSION_IMMUTABLEThe version is registered with another manifest