Every app must have exactly oneDocumentation Index
Fetch the complete documentation index at: https://docs.twenty.com/llms.txt
Use this file to discover all available pages before exploring further.
defineApplication call. It declares:
- Identity — universal identifier, display name, description.
- Permissions — which role its logic functions and front components run under.
- Variables (optional) — key–value pairs exposed to your code as environment variables.
- Pre-install / post-install hooks (optional) — see Logic Functions.
src/application-config.ts
universalIdentifierfields are deterministic IDs you own. Generate them once and keep them stable across syncs.applicationVariablesbecome environment variables for your functions and front components (e.g.,DEFAULT_RECIPIENT_NAMEis available asprocess.env.DEFAULT_RECIPIENT_NAME).- The default role is detected automatically from the role file marked with
defineApplicationRole()— you do not need to reference it fromdefineApplication(). - Pre-install and post-install functions are detected automatically during the manifest build — you do not need to reference them in
defineApplication(). - Passing
defaultRoleUniversalIdentifierexplicitly is still supported for backward compatibility, but is deprecated in favor ofdefineApplicationRole().
Default function role
The role declared withdefineApplicationRole() controls what the app’s logic functions and front components can access:
- The runtime token injected as
TWENTY_APP_ACCESS_TOKENis derived from this role. - The typed API client is restricted to the permissions granted to that role.
- Follow least-privilege: declare only the permissions your functions need.
src/roles/default-role.ts. See Roles & Permissions for the full reference.
Marketplace metadata
If you plan to publish your app, these optional fields control how it appears in the marketplace:| Field | Description |
|---|---|
author | Author or company name |
category | App category for marketplace filtering |
logoUrl | Path to your app logo (e.g., public/logo.png) |
screenshots | Array of screenshot paths (e.g., public/screenshot-1.png) |
aboutDescription | Longer markdown description for the “About” tab. If omitted, the marketplace uses the package’s README.md from npm |
websiteUrl | Link to your website |
termsUrl | Link to terms of service |
emailSupport | Support email address |
issueReportUrl | Link to issue tracker |