First steps

Your first remote config

Define a typed config value in the dashboard, fetch it from any SDK with cohort targeting, and roll forward or back without an app release.

Sankofa Remote Config (a.k.a. Config) gives you typed, versioned, cohort-targetable values you can change without redeploying your app. It shares the same decision-handshake plumbing as Switch, so reads are local and free after the first call.

Use it for: feature toggles that need richer-than-boolean values, hardcoded magic numbers (timeouts, retry caps, thresholds), copy that needs to ship faster than your release cadence, or lightweight A/B parameter tuning that doesn't warrant a full experiment.

1. Create a config item

  1. Open Config → Items

    From the project nav, Config → Items, click New item.

  2. Name the key in snake_case

    Examples: max_upload_mb, support_email, home_hero_copy, retry_backoff_ms.

  3. Pick a type

    Sankofa supports string, int, float, bool, and json. Once published, the type is immutable — pick carefully.

  4. Set a default value

    The default is what every user sees until you ship a cohort-specific override. For our example pick int with default 25.

2. Fetch from your SDK

Reads are typed at the call site — pass the expected return type and a fallback. The fallback runs whenever the engine is unreachable, the snapshot is empty, or a key is missing.

TypeScript
import { Sankofa } from "@sankofa/browser";
import { configPlugin, getConfig } from "@sankofa/config";

await Sankofa.init({
apiKey: process.env.NEXT_PUBLIC_SANKOFA_KEY!,
endpoint: "https://api.sankofa.dev",
plugins: [configPlugin()],
});

const config = getConfig()!;
const maxMB = config.getNumber("max_upload_mb", 25);

3. Ship a cohort-specific override

Open the item in the dashboard and click Add override.

  1. Pick a cohort

    For example, Pro plan customers (cohorts are defined under People → Cohorts).

  2. Set the override value

    For Pro customers, raise max_upload_mb to 200.

  3. Publish

    Within ≤ 30 seconds (next handshake) Pro users see 200; everyone else stays on the default 25. No code change, no app release.

4. Version, audit, and roll back

Every publish creates an immutable version with the actor, timestamp, and full diff captured.

  • History — open Config → Items → <your item> → History to see every change.
  • Diff — click any two versions to see what overrides changed.
  • Roll back — click Restore on a previous version. The next handshake reverts users to that payload.
  • Schedule — schedule a value to take effect at a specific UTC timestamp (Pro tier and above).

When to use Config vs. Switch

You need…Use
an on/off toggleSwitch
a numeric, string, or JSON valueConfig
an A/B variant with stat-sig metricsSwitch variants or Config A/B experiments
a value that depends on a cohort, but should never enable a new code pathConfig
a value that gates a code pathSwitch

Both share the same decision handshake, so using both costs the same as using one.

What's next

Edit this page on GitHub