A Feature Flag controls feature availability for organizations and users in your application.
Get the details of an existing feature flag by its slug.
import { WorkOS } from '@workos-inc/node'; const workos = new WorkOS('sk_example_123456789'); const featureFlag = await workos.featureFlags.getFeatureFlag('advanced-analytics'); console.log(featureFlag);
GET/feature-flags /:slugParameters Returns Get a list of all of your existing feature flags matching the criteria specified.
import { WorkOS } from '@workos-inc/node'; const workos = new WorkOS('sk_example_123456789'); const featureFlags = await workos.featureFlags.listFeatureFlags(); console.log(featureFlags.data);
GET/feature-flagsParameters Returns objectEnables a feature flag in the current environment.
import { WorkOS } from '@workos-inc/node'; const workos = new WorkOS('sk_example_123456789'); const featureFlag = await workos.featureFlags.enableFeatureFlag('advanced-analytics'); console.log(featureFlag);
PUT/feature-flags /:slug /enableParameters Returns Disables a feature flag in the current environment.
import { WorkOS } from '@workos-inc/node'; const workos = new WorkOS('sk_example_123456789'); const featureFlag = await workos.featureFlags.disableFeatureFlag('advanced-analytics'); console.log(featureFlag);
PUT/feature-flags /:slug /disableParameters Returns