Management SDK (beta)

We’ve released a strongly typed TypeScript SDK for interacting with your Reflag account. It provides a simple, maintainable way to integrating Reflag flag management into your backend services.

What’s included

This initial release focuses on core feature flag operations:

  • List flags: Retrieve all feature flags in an application
  • Create flags: Define new feature flags
  • Toggle flags for companies: Enable or disable features for specific companies
  • Toggle flags for users: Enable or disable features for individual users

With the SDK, you can automate workflows that previously required manual API integration.

Use cases

  • Integrate feature control into internal tools (e.g. back-office systems)
  • Allow users to opt into experimental features directly from your product

See the Customer Admin Panel example for a practical implementation.

How to use it

Toggling a feature for a specific user is straight forward:

import { Api } from '@reflag/management-sdk';

const reflag = createAppClient("app-123", {
  accessToken: process.env.REFLAG_API_KEY,
});

// enable 'new-checkout' for 'user-1'
const updatedUserFlags = await reflag.updateUserFlags({
  envId: 'env-456',
  userId: 'user-1',
  updates: [{ flagKey: 'new-checkout', specificTargetValue: true }],
});

See Common Workflows for more examples