Appbricx
Docs
PricingStart free

Start here

OverviewGetting startedProjects & editorBring your own keyEnd-to-end recipe

Full-stack runtime

Runtime overviewNamed queriesAuth & RLSAuto CRUD REST APIWorkflowsWebhooks & schedulesTopics & CDCData templatesSecrets & env

Ship & own

Publish & domainsExport & GitHub

Developers

Developer guide

Secrets & env

Source code may only contain secret names. Values live in the project vault / environment and resolve at runtime inside workflows — never in the browser.

1. Declare names

File: .appbricx/backend/secrets.refs.json

[
  "WEBHOOK_SECRET",
  "LEAD_NOTIFY_URL",
  "DIGEST_EMAIL",
  "SLACK_BOT_TOKEN"
]

The agent appends names when it wires webhooks or integrations. Dedupe the array; do not store values here.

2. Set values

  • Project Settings → Environment / Secrets (vault UI).
  • Map each name to a value for the environment you care about (preview/production as offered).
  • For webhooks, the value of secret_ref must match what callers send in x-appbricx-webhook-secret.

3. Use in workflows

export async function run(ctx) {
  const secret = await ctx.secrets.get("WEBHOOK_SECRET");
  // returns null if unset or not listed in secrets.refs.json

  const notifyUrl = await ctx.secrets.get("LEAD_NOTIFY_URL");
  if (notifyUrl) {
    await ctx.http.fetch(notifyUrl, {
      method: "POST",
      headers: { "content-type": "application/json" },
      body: JSON.stringify({ event: "leads.created" }),
    });
  }
}

4. Use in webhook manifests

{
  "name": "lead-intake",
  "workflow": "on-lead-created",
  "secret_ref": "WEBHOOK_SECRET",
  "enabled": true
}

Managing day to day

TaskWhere
Add a new secret nameEdit secrets.refs.json (or ask the agent)
Rotate a valueVault UI — update value; no code change
Remove a secretClear vault value; remove refs + secret_ref usages
BYOK provider keysSeparate — AI settings, not workflow refs

Anti-patterns

  • const KEY = "sk_live_…" in any project file
  • Committing .env with real credentials
  • Putting the webhook secret string inside webhooks/*.json
  • Sending secrets to the browser / runtime client
Validate. Ask the agent to run runtime.validate — it checks refs exist and scans backend files for obvious literal secrets.

Related: Webhooks · Workflows · Data templates

Appbricx

Full-stack AI app builder for teams. Hosted cloud or private deploy into your account — multi-tenant, sandboxed, credit-metered.

Product

How it worksDemoCapabilitiesPricingPrivate cloudBYOKFAQ

Resources

DocumentationBlogFor freelancersFor agenciesSupport

Company

ContactPrivate cloud / agencyPrivacyTerms

© 2026 Appbricx. All rights reserved.

TermsPrivacyCookiesAcceptable Use