Skip to main content

Quick Start

Get a feature flag running in under 5 minutes.

1. Create an Account

Sign up at app.toggletown.com. You'll get a project with two default environments: Production and Development.

2. Create a Flag

  1. Open your project in the dashboard
  2. Click Create Flag
  3. Set the key to new-checkout and type to Boolean
  4. Toggle it on in the Development environment

3. Get Your API Key

Go to Project Settings > Environments and copy the API key for your Development environment. It looks like tt_live_....

4. Install an SDK

npm install @toggletown/sdk-js
import { ToggleTownClient } from '@toggletown/sdk-js';

const client = new ToggleTownClient('tt_live_your_key', {
apiUrl: 'https://api.toggletown.com',
});

await client.initialize();

const enabled = client.getBooleanFlag('new-checkout', false, {
userId: 'user-123',
});

if (enabled) {
showNewCheckout();
}

5. Toggle It

Go back to the dashboard and toggle new-checkout on or off. The SDK will pick up the change on its next poll (within 30 seconds by default).

What's Next?

  • Core Concepts — Learn about environments, targeting rules, and rollouts
  • SDK docs — Full reference for your SDK
  • REST API — Manage flags programmatically