openapi: 3.1.1 info: title: WorkOS admin-portal user-management.users.feature-flags API description: WorkOS REST API version: '1.0' contact: name: WorkOS url: https://workos.com email: support@workos.com license: name: MIT url: https://opensource.org/license/MIT servers: - url: https://api.workos.com description: Production - url: https://api.workos-test.com description: Staging security: - bearer: [] tags: - name: user-management.users.feature-flags description: Manage user-scoped feature flags. x-displayName: User Feature Flags paths: /user_management/users/{userId}/feature-flags: get: description: Get a list of all enabled feature flags for the provided user. This includes feature flags enabled specifically for the user as well as any organizations that the user is a member of. operationId: UserlandUserFeatureFlagsController_list parameters: - name: userId required: true in: path description: The ID of the user. schema: example: user_01E4ZCR3C56J083X43JQXF3JK5 type: string - name: before required: false in: query description: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. schema: example: obj_1234567890 type: string - name: after required: false in: query description: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. schema: example: obj_1234567890 type: string - name: limit required: false in: query description: Upper limit on the number of objects to return, between `1` and `100`. schema: minimum: 1 maximum: 100 default: 10 example: 10 type: integer - name: order required: false in: query description: Order the results by the creation time. schema: $ref: '#/components/schemas/PaginationOrder' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/FlagList' '404': description: Not Found content: application/json: schema: type: object properties: message: type: string description: A human-readable description of the error. example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.' required: - message summary: List Enabled Feature Flags for a User tags: - user-management.users.feature-flags components: schemas: Flag: type: object properties: object: type: string description: Distinguishes the Feature Flag object. const: feature_flag id: type: string description: Unique identifier of the Feature Flag. example: flag_01EHZNVPK3SFK441A1RGBFSHRT slug: type: string description: A unique key to reference the Feature Flag. example: advanced-analytics name: type: string description: A descriptive name for the Feature Flag. This field does not need to be unique. example: Advanced Analytics description: type: - string - 'null' description: A description for the Feature Flag. example: Enable advanced analytics dashboard feature owner: description: The owner of the Feature Flag. oneOf: - type: object properties: email: type: string description: The email address of the flag owner. example: jane@example.com first_name: type: - string - 'null' description: The first name of the flag owner. example: Jane last_name: type: - string - 'null' description: The last name of the flag owner. example: Doe required: - email - first_name - last_name - type: 'null' tags: type: array items: type: string description: Labels assigned to the Feature Flag for categorizing and filtering. example: - reports enabled: type: boolean description: Specifies whether the Feature Flag is active for the current environment. example: true default_value: type: boolean description: The value returned for users and organizations who don't match any configured targeting rules. example: false created_at: format: date-time type: string description: An ISO 8601 timestamp. example: '2026-01-15T12:00:00.000Z' updated_at: format: date-time type: string description: An ISO 8601 timestamp. example: '2026-01-15T12:00:00.000Z' required: - object - id - slug - name - description - owner - tags - enabled - default_value - created_at - updated_at PaginationOrder: type: string enum: - normal - desc - asc example: desc default: desc FlagList: type: object properties: object: type: string description: Indicates this is a list response. const: list data: type: array items: $ref: '#/components/schemas/Flag' description: The list of records for the current page. list_metadata: type: object properties: before: type: - string - 'null' description: An object ID that defines your place in the list. When the ID is not present, you are at the start of the list. example: flag_01HXYZ123456789ABCDEFGHIJ after: type: - string - 'null' description: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. example: flag_01HXYZ987654321KJIHGFEDCBA required: - before - after description: Pagination cursors for navigating between pages of results. required: - object - data - list_metadata securitySchemes: bearer: scheme: bearer bearerFormat: JWT type: http description: 'Your WorkOS API key prefixed with `sk_`. Pass it as a Bearer token: `Authorization: Bearer sk_example_123456789`.' access_token: scheme: bearer bearerFormat: JWT type: http description: An SSO access token returned from the Get a Profile and Token endpoint.