Frontegg Feature Flags API

The Feature Flags API from Frontegg — 2 operation(s) for feature flags.

Documentation

Specifications

Other Resources

OpenAPI Specification

frontegg-feature-flags-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Multi-Apps Overview Account Invitations Feature Flags API
  description: Frontegg’s Multi-Apps feature simplifies and streamlines application management, delivering a seamless user experience. This section includes all necessary endpoints for managing applications and copying application settings across environments. All endpoints are categorized as **Management Endpoints**, requiring environment-level authorization and providing full control over entitlement resources.
  version: '1.0'
  x-metadata:
    note: Trigger publish artifacts job, remove this x-metadata after publishing
servers:
- url: https://api.frontegg.com/applications
  description: EU Region
- url: https://api.us.frontegg.com/applications
  description: US Region
- url: https://api.ca.frontegg.com/applications
  description: CA Region
- url: https://api.au.frontegg.com/applications
  description: AU Region
- url: https://{domain}.frontegg.com/applications
  description: Frontegg sub-domain for use with user tokens
  variables:
    domain:
      default: app-xxx
tags:
- name: Feature Flags
  x-displayName: Feature Flags
paths:
  /resources/feature-flags/v1:
    servers:
    - url: https://api.frontegg.com/entitlements
      description: EU Region
    - url: https://api.us.frontegg.com/entitlements
      description: US Region
    - url: https://api.ca.frontegg.com/entitlements
      description: CA Region
    - url: https://api.au.frontegg.com/entitlements
      description: AU Region
    - url: https://{domain}.frontegg.com/entitlements
      description: Frontegg sub-domain for use with user tokens
      variables:
        domain:
          default: app-xxx
    get:
      operationId: FeatureFlagsControllerV1_getFeatureFlags
      x-tag: Feature Flags
      summary: Get Feature Flags
      description: Retrieve a paginated list of feature flags with search, filtering, and sorting capabilities by name or creation date (`createdAt` or `name` fields).
      parameters:
      - name: offset
        required: false
        in: query
        description: Page offset of the results to return
        example: '0'
        schema:
          default: 0
          type: number
      - name: limit
        required: false
        in: query
        description: Number of results per page
        example: '10'
        schema:
          default: 10
          type: number
      - name: filter
        required: false
        in: query
        description: Search input, searchable by `name`
        example: search-text
        schema:
          type: string
      - name: orderBy
        required: false
        in: query
        description: Field to order results by create date (`createdAt`) or name (`name`)
        example: name
        schema:
          type: string
      - name: sortType
        required: false
        in: query
        description: Sort type, ASC for ascending, DESC for descending
        example: ASC
        schema:
          enum:
          - ASC
          - DESC
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/PageDto'
                - properties:
                    items:
                      type: array
                      items:
                        $ref: '#/components/schemas/FeatureFlagDto'
                    hasNext:
                      type: boolean
      tags:
      - Feature Flags
      security:
      - bearer: []
    post:
      operationId: FeatureFlagsControllerV1_createFeatureFlag
      x-tag: Feature Flags
      summary: Create Feature Flag
      description: Create a new feature flag with configurable on/off states, default treatments, targeting rules, and custom metadata for controlled feature rollouts.
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFeatureFlagDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeatureFlagDto'
      tags:
      - Feature Flags
      security:
      - bearer: []
  /resources/feature-flags/v1/{id}:
    servers:
    - url: https://api.frontegg.com/entitlements
      description: EU Region
    - url: https://api.us.frontegg.com/entitlements
      description: US Region
    - url: https://api.ca.frontegg.com/entitlements
      description: CA Region
    - url: https://api.au.frontegg.com/entitlements
      description: AU Region
    - url: https://{domain}.frontegg.com/entitlements
      description: Frontegg sub-domain for use with user tokens
      variables:
        domain:
          default: app-xxx
    get:
      operationId: FeatureFlagsControllerV1_getSingleFeatureFlag
      x-tag: Feature Flags
      summary: Get Single Feature Flag
      description: Retrieve detailed information for a specific feature flag by its unique ID, including configuration, rules, and associated feature details.
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeatureFlagDto'
      tags:
      - Feature Flags
      security:
      - bearer: []
    patch:
      operationId: FeatureFlagsControllerV1_updateFeatureFlag
      x-tag: Feature Flags
      summary: Update Feature Flag
      description: Update an existing feature flag's configuration, including its on/off state, treatments, targeting rules, and metadata.
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateFeatureFlagDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeatureFlagDto'
      tags:
      - Feature Flags
      security:
      - bearer: []
    delete:
      operationId: FeatureFlagsControllerV1_deleteFeatureFlag
      x-tag: Feature Flags
      summary: Delete Feature Flag
      description: Delete a specific feature flag by its unique ID, permanently removing the feature flag and its associated configuration.
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      responses:
        '200':
          description: ''
      tags:
      - Feature Flags
      security:
      - bearer: []
components:
  schemas:
    FeatureFlagFeature:
      type: object
      properties:
        id:
          type: string
          description: UUID string representing the feature ID
          example: e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3
        key:
          type: string
          description: String representing the feature key
          example: test-feature
        name:
          type: string
          description: String representing the feature name
          example: Test Feature
    RuleDto:
      type: object
      properties:
        description:
          type: string
          description: String that represents the description of the rule
          example: This is the first rule
        conditionLogic:
          type: string
          description: Enum that represents the rule conditions logic
          example: and
          enum:
          - and
        conditions:
          description: Array of conditions
          type: array
          items:
            $ref: '#/components/schemas/ConditionDto'
        treatment:
          type: string
          description: String that represents the treatment for this rule
          example: 'true'
          enum:
          - 'true'
          - 'false'
      required:
      - description
      - conditionLogic
      - conditions
      - treatment
    UpdateFeatureFlagDto:
      type: object
      properties:
        name:
          type: string
          description: String that represent the feature flag name
          example: Test Feature Flag
        'on':
          type: boolean
          description: Boolean indicating whether the feature flag is on
          example: true
        offTreatment:
          type: string
          description: Enum that represents the treatment in case feature flag is off
          example: 'false'
          enum:
          - 'true'
          - 'false'
        defaultTreatment:
          type: string
          description: Enum that represents the default treatment
          example: 'true'
          enum:
          - 'true'
          - 'false'
        featureId:
          type: string
          description: UUID string that represents the related feature ID
          example: '26f1b6b8-0317-452c-becd-68a5f782417d '
        description:
          type: string
          description: String the represents the feature flag description
          example: This is a test feature flag
        metadata:
          type: string
          description: JSON String that represents additional custom metadata to the feature flag entity
          example: '{}'
        rules:
          description: Array of rules that represents the set of conditions targeting the feature
          type: array
          items:
            $ref: '#/components/schemas/RuleDto'
    FeatureFlagDto:
      type: object
      properties:
        id:
          type: string
          description: UUID string that represents the feature flag ID
          example: e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3
        name:
          type: string
          description: String that represent the feature flag name
          example: Test Feature Flag
        'on':
          type: boolean
          description: Boolean indicating whether the feature flag is on
          example: true
        offTreatment:
          type: string
          description: Enum that represents the treatment in case feature flag is off
          example: 'false'
          enum:
          - 'true'
          - 'false'
        defaultTreatment:
          type: string
          description: Enum that represents the default treatment
          example: 'true'
          enum:
          - 'true'
          - 'false'
        feature:
          description: Object that represents the related feature
          allOf:
          - $ref: '#/components/schemas/FeatureFlagFeature'
        description:
          type: string
          description: String the represents the feature flag description
          example: This is a test feature flag
        metadata:
          type: string
          description: JSON String that represents additional custom metadata to the feature flag entity
          example: '{}'
        rules:
          description: Array of rules that represents the set of conditions targeting the feature
          type: array
          items:
            $ref: '#/components/schemas/RuleDto'
        updatedAt:
          format: date-time
          type: string
          description: Date when feature flag was created
          example: '2022-01-01T00:00:00'
        createdAt:
          format: date-time
          type: string
          description: Date when feature flag was last updated
          example: '2022-01-01T00:00:00'
    CreateFeatureFlagDto:
      type: object
      properties:
        name:
          type: string
          description: String that represent the feature flag name
          example: Test Feature Flag
        'on':
          type: boolean
          description: Boolean indicating whether the feature flag is on
          example: true
        offTreatment:
          type: string
          description: Enum that represents the treatment in case feature flag is off
          example: 'false'
          enum:
          - 'true'
          - 'false'
        defaultTreatment:
          type: string
          description: Enum that represents the default treatment
          example: 'true'
          enum:
          - 'true'
          - 'false'
        featureId:
          type: string
          description: UUID string that represents the related feature ID
          example: '26f1b6b8-0317-452c-becd-68a5f782417d '
        description:
          type: string
          description: String the represents the feature flag description
          example: This is a test feature flag
        metadata:
          type: string
          description: JSON String that represents additional custom metadata to the feature flag entity
          example: '{}'
        rules:
          description: Array of rules that represents the set of conditions targeting the feature
          type: array
          items:
            $ref: '#/components/schemas/RuleDto'
      required:
      - name
      - 'on'
      - offTreatment
      - defaultTreatment
      - featureId
    ConditionDto:
      type: object
      properties:
        attribute:
          type: string
          description: String representing an attribute with a subset of condition(s) that is used in code to enact targeting rules
          example: myCustomAttribute
        attributeType:
          type: string
          description: Enum that represents the attribute type (`frontegg` or `custom`)
          example: custom
          enum:
          - custom
          - frontegg
        negate:
          type: boolean
          description: Boolean that indicates whether the condition should negate the operation
          example: false
        op:
          type: string
          description: Enum that represents the operation applied to the condition
          example: in_list
          enum:
          - in_list
          - starts_with
          - ends_with
          - contains
          - matches
          - equal
          - greater_than
          - greater_than_equal
          - lower_than
          - lower_than_equal
          - between_numeric
          - is
          - 'on'
          - between_date
          - on_or_after
          - on_or_before
        value:
          type: object
          description: Object that contains the condition data according to selected operation, each operation requires different structure (see [documentation](https://docs.frontegg.com/docs/entitlements-backend-sdk#operations-and-corresponding-object-structure))
          example:
            list:
            - valueA
            - valueB
      required:
      - attribute
      - attributeType
      - negate
      - op
      - value
    PageDto:
      type: object
      properties: {}
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http
x-tagGroups:
- name: Management
  tags:
  - Applications settings