App Options
App Options are the settings an organization fills in when installing your app β API URLs, feature toggles, credentials. You declare them once, at the top level of the manifest, and every part of your app reads from the same set of values: components, functions, the API Proxy and Portal Extension hooks.
Options used to live on components
Earlier app versions declared options per component. That model is retired: all existing component options were migrated to app level, and the platform transparently keeps serving them to consumers that still read options from components. Declare new options only at the top level β deploys that declare an option on a component with the same key as an app-level option are rejected.
Declaring optionsβ
Add a top-level options array to your manifest.json:
{
"name": "My Integration",
"options": [
{ "key": "api_base_url", "label": "API Base URL", "type": "text", "required": true },
{ "key": "sync_enabled", "label": "Enable sync", "type": "boolean" },
{ "key": "api_key", "label": "API Key", "type": "secret", "required": true },
{ "key": "internal_hint", "label": "Routing hint", "type": "text", "sensitive": true }
],
"components": [ ... ]
}
| Field | Required | Description |
|---|---|---|
key | β | Unique identifier across the whole app. This is what you reference everywhere ({{Options.api_key}}, input.app_options.api_key, proxy auth) β treat it as a public contract |
type | β | text, number, boolean, secret or object |
label | β | Human-readable label shown to the installing organization β a string or translations |
description | β | Help text shown below the input β a string or translations |
placeholder | β | Example shown in the empty input (text, number, secret) |
required | β | The app installs, but is marked partially successful and stays unusable until all required options are filled |
default | β | Value used until the organization sets one β see Defaults |
choices | β | Fixed set of accepted values, shown as a dropdown β see Choices |
format, pattern, min, max | β | Rules a value must satisfy β see Validating values |
visible_if | β | Show the option only while other options have certain values β see Conditional options |
group | β | Section the option is shown under β see Groups |
sensitive | β | Write-only, server-side only β see below. Always true for type: secret |
repeatable | β | The value becomes a list of entries (each gets a stable server-assigned id) |
fields | object type | Declares the sub-fields of an object option β primitives only, no nesting |
The installing organization sees all app options in a single App settings card on the app's configuration page.
Choicesβ
Give a text or number option a fixed set of values and it is shown as a dropdown instead of a free-text field:
{
"key": "auth_mode",
"type": "text",
"label": "Authentication",
"default": "none",
"choices": [
{ "value": "none", "label": { "de": "Keine", "en": "None" } },
{ "value": "basic", "label": "Username & password" },
{ "value": "bearer" }
]
}
- The stored value is the plain
valueβ your proxy, functions and{{Options.auth_mode}}templates see"basic", never the label. labelis optional; a choice without one is shown by its value.- Values must be unique and match the option type (strings for
text, numbers fornumber). - Saving a value that is not one of the choices is rejected.
- For a
repeatableoption, every entry must be one of the choices.
Defaultsβ
default is the option's value for as long as the installing organization has not set one:
{ "key": "timeout", "type": "number", "default": 25, "min": 1, "max": 60 }
- A default is the effective value everywhere values are read: the API Proxy, functions, browser components and
visible_ifconditions. - A
requiredoption with a default counts as filled. - Supported for non-repeatable, non-sensitive
text,numberandbooleanoptions.falseand0are valid defaults. - The default must itself satisfy the option's
choices,format,pattern,minandmax. - Clearing a field brings the default back.
Changing a default changes behavior
Installations that never set a value follow the default of the version they are on. If you change a default in a new version, those installations change with it when they update.
Validating valuesβ
Rules are checked in the configuration UI as the installer types and again by the platform when the configuration is saved. A save with a value that breaks a rule is rejected with 400 and the code INVALID_OPTION_VALUES; nothing is stored.
| Field | Applies to | Rule |
|---|---|---|
format | text | hostname (a bare host name β no scheme, port or path), url (an absolute http(s) URL) or email |
pattern | text, secret | A regular expression the whole value must match (max. 200 characters). Values longer than 2000 characters never match |
pattern_message | with pattern | Message shown when the pattern does not match β a string or translations |
min, max | number | Smallest and largest accepted value |
{
"key": "api_host",
"type": "text",
"required": true,
"format": "hostname",
"placeholder": "api.example.com"
},
{
"key": "customer_no",
"type": "text",
"pattern": "[A-Z]{2}\\d{6}",
"pattern_message": { "de": "Zwei GroΓbuchstaben und sechs Ziffern", "en": "Two capital letters and six digits" }
}
A few things to know:
- Empty values are never a rule violation. Whether a value is needed at all is what
requiredis for. - Secrets are checked before they are encrypted, and a rejected secret is never echoed back in the error.
- Updating to a new version never fails on old values. If stored values no longer fit the rules of the new version, the update goes through and the installation is disabled until an admin corrects them.
Conditional optionsβ
visible_if shows an option only while other options have certain values. Use it for settings that only make sense in one mode:
"options": [
{
"key": "auth_mode",
"type": "text",
"default": "none",
"choices": [{ "value": "none" }, { "value": "basic" }, { "value": "bearer" }, { "value": "header" }]
},
{ "key": "username", "type": "text", "required": true, "visible_if": { "auth_mode": "basic" } },
{ "key": "password", "type": "secret", "required": true, "visible_if": { "auth_mode": "basic" } },
{ "key": "token", "type": "secret", "required": true, "visible_if": { "auth_mode": ["bearer", "header"] } }
]
- Each entry maps an option key to the value it must have, or to a list of accepted values. All entries must match.
- A hidden option is not asked for. It does not appear in the configuration UI, and when it is
requiredit does not keep the installation from being enabled. This is what lets you mark the password as required without blocking installations that use no authentication. - The controlling option must be a non-sensitive, non-repeatable
text,numberorbooleanoption. Secrets cannot control visibility β their value is never readable in the browser. - An unset controlling option falls back to its
default. An unsetbooleancounts asfalse. - Conditions can chain. An option whose controlling option is hidden is hidden as well.
- If the controlling option declares
choices, the expected values must be among them β a typo like"Basic"is rejected on deploy. - Deploys with a condition on an unknown option, on the option itself, or with circular conditions are rejected.
Hidden options keep their stored value
Switching from basic to none hides the password field but does not delete the stored password, so switching back needs no re-entry. The flip side: your functions and the API Proxy still receive those values. Check the controlling option (auth_mode === "basic"), not whether a password happens to be present.
Groupsβ
Arrange options into sections with a top-level option_groups array and a group on each option:
{
"option_groups": [
{ "key": "server", "label": { "de": "Server", "en": "Server" } },
{
"key": "auth",
"label": { "de": "Authentifizierung", "en": "Authentication" },
"description": "Credentials stay server-side and never reach the browser."
}
],
"options": [
{ "key": "api_host", "type": "text", "group": "server" },
{ "key": "auth_mode", "type": "text", "group": "auth" },
{ "key": "notes", "type": "text" }
]
}
Options without a group are shown first, followed by one section per group in the order the groups are declared. Group keys must be unique, and an option may only name a declared group.
Translated textsβ
label, description, placeholder, pattern_message, choice labels and group labels accept either a plain string or translations:
{ "key": "api_host", "type": "text", "label": { "de": "API-Host", "en": "API host" } }
de is required when you use translations; en is optional and falls back to German. The configuration UI shows the text in the user's language.
Sensitive vs. non-sensitiveβ
Every option is one of two kinds β the same model most hosting platforms use for environment variables:
- Non-sensitive (default) β readable wherever the app runs, including the end-customer's browser: journey blocks, portal blocks, capabilities. Use for URLs, labels, toggles, IDs.
- Sensitive β write-only and server-side only. The value is never returned by any read API. The installer sees Configured β and when the value was last changed, and can replace it β but never read it back. Sensitive values only ever surface in server-side channels: API Proxy credential injection, Portal Extension / External Product Catalog hook templates, and function runs.
Options of type: secret are stored encrypted and are always sensitive. Set sensitive: true on a non-secret type for values that aren't credentials but still must not reach a browser (internal endpoints, routing hints).
Rule of thumb: if you would put it in a secret environment variable β API keys, tokens, client secrets β make it type: secret. If in doubt, mark it sensitive; you can't loosen a leaked value after the fact.
Required optionsβ
Marking an option required: true doesn't block the installation itself β the app installs, but is flagged as partially successful and cannot be used until the organization fills in all required values.
Two things count as filled without the organization typing anything: an option with a default, and an option that is currently hidden by visible_if.

Consuming optionsβ
Where the configured values show up, by surface:
| Surface | How you access options | Sensitive values? |
|---|---|---|
| API Proxy | Reference option keys in the auth configuration β credentials are injected server-side | β |
| Portal Extension / External Product Catalog hooks | {{Options.api_key}} template variables β resolved server-side when the hook fires | β |
| Functions | input.app_options contains all option values β functions always run server-side | β |
| Custom Capability, Custom Page, Flow Action Config (App Bridge surfaces) | getOptions() from @epilot/app-bridge | Non-sensitive only |
| Custom Journey Block, Custom Portal Block | Options are passed into your component per its surface contract | Non-sensitive only |
Every consumer receives the effective value of an option: what the organization configured, or the declared default if nothing is set.
Anything that executes in a browser only ever receives non-sensitive options. There is no way to read a sensitive value from frontend code β route those calls through the API Proxy instead, which attaches the credentials server-side.