Layer Configuration
How to edit a layer's config — settings UI, JSON editor, and per-layer crons.
Each layer has a config JSON document. The settings tab is a UI on top
of that JSON; advanced users can edit JSON directly.
Settings UI
The standard way. Each template renders its own form using shadcn primitives
- react-hook-form. Changes are validated against the template's
config_schemaand applied immediately on save.
Raw JSON editor
For Project Admins, click View as JSON at the bottom of the settings tab. You can edit the raw config and save. Validation still applies.
Per-layer cron
Most templates have at least one *-scheduled command. The default cron
comes from the template; you can override per-layer:
{
"schedule": { "cron": "37 9 * * *" }
}The scheduler uses COALESCE(pl.schedule->>'cron', template_default_cron)
to ensure exactly one cron per layer — no double execution.
Useful for:
- Timezone-specific batching — your project's timezone is
Asia/Tokyobut the template default is UTC. - Spreading load — many projects share the default cron; override busy ones.
- Per-client SLAs — premium clients on faster cadence.
Common config patterns
Distribution mode (Social Distribution)
{
"distributionMode": "automatic" | "custom" | "manual",
"willPublish": true | false
}automatic lets the system schedule and publish on its own. custom lets
you control the scheduling cadence. manual queues posts for a human
approval step before they can be scheduled.
CAPI (Meta / TikTok Ads)
{
"capi": {
"enabled": true,
"pixel_id": "1234567890",
"access_token_vault_id": "vault_abc"
}
}access_token_vault_id references an entry in the
Layers credential vault — the actual token never
appears in config.
Diff & rollback
Every config change is recorded. Click History in the settings tab to see prior versions and rollback.