# Flip a feature flag from your own workflow with the WorkOS API

DevFeed: [Flip a feature flag from your own workflow with the WorkOS API](<https://devfeed.tech/articles/flip-a-feature-flag-from-your-own-workflow-with-the-workos-api-121080.md>)

Original publisher: [Read original article](<https://workos.com/blog/feature-flag-targets-api>)

Author: WorkOS

Published: 2026-11-05T00:00:00Z

Content type: tutorial

Language: en

Sources: [WorkOS](<https://devfeed.tech/sources/workos-blog.md>)

Topics: [workflow automation](<https://devfeed.tech/topics/workflow-automation.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [automation](<https://devfeed.tech/tags/automation.md>), [billing](<https://devfeed.tech/tags/billing.md>), [crm](<https://devfeed.tech/tags/crm.md>), [feature-flags](<https://devfeed.tech/tags/feature-flags.md>), [organizations](<https://devfeed.tech/tags/organizations.md>), [target](<https://devfeed.tech/tags/target.md>), [users](<https://devfeed.tech/tags/users.md>), [workflow](<https://devfeed.tech/tags/workflow.md>), [workos](<https://devfeed.tech/tags/workos.md>)

## AI overview

WorkOS targeting endpoints let server-side workflows grant or revoke a feature for an organization or user: POST adds a target and DELETE removes it in the API key's environment. Removal restores the flag's default value, so per-customer access should use a false default if deletion is meant to revoke access. For CRM or billing webhooks, keep the API key server-side, make retries idempotent using event IDs, return failures for provider retries, and log the event, target, flag, actor and time. Changes reach users through their existing session: feature_flags claims update at sign-in or session refresh and count toward a 3,072-byte token limit; the Node runtime client keeps flags out of the token and syncs in the background every 30 seconds by default, requiring @workos-inc/node 12 or later to confirm changes.

## Source excerpt

Use the WorkOS Feature Flags targeting endpoints to add and remove organizations and users from your own systems, and learn what removing a target really does.