Schematic features API

The features API from Schematic — 11 operation(s) for features.

Documentation

Specifications

SDKs

Schemas & Data

Other Resources

OpenAPI Specification

schematic-features-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Schematic accesstokens features API
  version: '0.1'
  description: Schematic API
  x-rules-engine-schema-version: v97288f60
servers:
- url: https://api.schematichq.com
security:
- ApiKeyAuth: []
tags:
- name: features
paths:
  /features:
    get:
      operationId: listFeatures
      summary: List features
      tags:
      - features
      parameters:
      - name: boolean_require_event
        in: query
        description: Only return boolean features if there is an associated event. Automatically includes boolean in the feature types filter.
        schema:
          type: boolean
          description: Only return boolean features if there is an associated event. Automatically includes boolean in the feature types filter.
      - name: feature_type
        in: query
        description: Filter by one or more feature types (boolean, event, trait)
        schema:
          type: array
          description: Filter by one or more feature types (boolean, event, trait)
          items:
            $ref: '#/components/schemas/FeatureType'
          maxItems: 100
      - name: ids
        in: query
        schema:
          type: array
          items:
            type: string
          maxItems: 100
      - name: plan_version_id
        in: query
        description: Filter by plan version ID when used with without_plan_entitlement_for; if not provided, the latest published version is used
        schema:
          type: string
          description: Filter by plan version ID when used with without_plan_entitlement_for; if not provided, the latest published version is used
      - name: q
        in: query
        description: Search by feature name or ID
        schema:
          type: string
          description: Search by feature name or ID
          maxLength: 512
      - name: without_company_override_for
        in: query
        description: Filter out features that already have a company override for the specified company ID
        schema:
          type: string
          description: Filter out features that already have a company override for the specified company ID
      - name: without_plan_entitlement_for
        in: query
        description: Filter out features that already have a plan entitlement for the specified plan ID
        schema:
          type: string
          description: Filter out features that already have a plan entitlement for the specified plan ID
      - name: limit
        in: query
        description: Page limit (default 100)
        schema:
          type: integer
          description: Page limit (default 100)
          format: int64
          example: '100'
      - name: offset
        in: query
        description: Page offset (default 0)
        schema:
          type: integer
          description: Page offset (default 0)
          format: int64
          example: '0'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/FeatureDetailResponseData'
                    title: ListFeaturesResponseData
                    maxItems: 250
                  params:
                    type: object
                    description: Input parameters
                    properties:
                      boolean_require_event:
                        type: boolean
                        description: Only return boolean features if there is an associated event. Automatically includes boolean in the feature types filter.
                      feature_type:
                        type: array
                        description: Filter by one or more feature types (boolean, event, trait)
                        items:
                          $ref: '#/components/schemas/FeatureType'
                        maxItems: 100
                      ids:
                        type: array
                        items:
                          type: string
                        maxItems: 100
                      limit:
                        type: integer
                        description: Page limit (default 100)
                        format: int64
                        example: '100'
                      offset:
                        type: integer
                        description: Page offset (default 0)
                        format: int64
                        example: '0'
                      plan_version_id:
                        type: string
                        description: Filter by plan version ID when used with without_plan_entitlement_for; if not provided, the latest published version is used
                      q:
                        type: string
                        description: Search by feature name or ID
                        maxLength: 512
                      without_company_override_for:
                        type: string
                        description: Filter out features that already have a company override for the specified company ID
                      without_plan_entitlement_for:
                        type: string
                        description: Filter out features that already have a plan entitlement for the specified plan ID
                    title: ListFeaturesParams
                required:
                - data
                - params
                title: ListFeaturesResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
    post:
      operationId: createFeature
      summary: Create feature
      tags:
      - features
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFeatureRequestBody'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/FeatureDetailResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: CreateFeatureParams
                required:
                - data
                - params
                title: CreateFeatureResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /features/{feature_id}:
    get:
      operationId: getFeature
      summary: Get feature
      tags:
      - features
      parameters:
      - name: feature_id
        in: path
        description: feature_id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/FeatureDetailResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: GetFeatureParams
                required:
                - data
                - params
                title: GetFeatureResponse
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
    put:
      operationId: updateFeature
      summary: Update feature
      tags:
      - features
      parameters:
      - name: feature_id
        in: path
        description: feature_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateFeatureRequestBody'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/FeatureDetailResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: UpdateFeatureParams
                required:
                - data
                - params
                title: UpdateFeatureResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
    delete:
      operationId: deleteFeature
      summary: Delete feature
      tags:
      - features
      parameters:
      - name: feature_id
        in: path
        description: feature_id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DeleteResponse'
                  params:
                    type: object
                    description: Input parameters
                    title: DeleteFeatureParams
                required:
                - data
                - params
                title: DeleteFeatureResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /features/billing-linked:
    post:
      operationId: upsertFeatureForBillingProduct
      summary: Upsert feature for billing product
      tags:
      - features
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBillingLinkedFeatureRequestBody'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/FeatureDetailResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: UpsertFeatureForBillingProductParams
                required:
                - data
                - params
                title: UpsertFeatureForBillingProductResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /features/count:
    get:
      operationId: countFeatures
      summary: Count features
      tags:
      - features
      parameters:
      - name: boolean_require_event
        in: query
        description: Only return boolean features if there is an associated event. Automatically includes boolean in the feature types filter.
        schema:
          type: boolean
          description: Only return boolean features if there is an associated event. Automatically includes boolean in the feature types filter.
      - name: feature_type
        in: query
        description: Filter by one or more feature types (boolean, event, trait)
        schema:
          type: array
          description: Filter by one or more feature types (boolean, event, trait)
          items:
            $ref: '#/components/schemas/FeatureType'
          maxItems: 100
      - name: ids
        in: query
        schema:
          type: array
          items:
            type: string
          maxItems: 100
      - name: plan_version_id
        in: query
        description: Filter by plan version ID when used with without_plan_entitlement_for; if not provided, the latest published version is used
        schema:
          type: string
          description: Filter by plan version ID when used with without_plan_entitlement_for; if not provided, the latest published version is used
      - name: q
        in: query
        description: Search by feature name or ID
        schema:
          type: string
          description: Search by feature name or ID
          maxLength: 512
      - name: without_company_override_for
        in: query
        description: Filter out features that already have a company override for the specified company ID
        schema:
          type: string
          description: Filter out features that already have a company override for the specified company ID
      - name: without_plan_entitlement_for
        in: query
        description: Filter out features that already have a plan entitlement for the specified plan ID
        schema:
          type: string
          description: Filter out features that already have a plan entitlement for the specified plan ID
      - name: limit
        in: query
        description: Page limit (default 100)
        schema:
          type: integer
          description: Page limit (default 100)
          format: int64
          example: '100'
      - name: offset
        in: query
        description: Page offset (default 0)
        schema:
          type: integer
          description: Page offset (default 0)
          format: int64
          example: '0'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CountResponse'
                  params:
                    type: object
                    description: Input parameters
                    properties:
                      boolean_require_event:
                        type: boolean
                        description: Only return boolean features if there is an associated event. Automatically includes boolean in the feature types filter.
                      feature_type:
                        type: array
                        description: Filter by one or more feature types (boolean, event, trait)
                        items:
                          $ref: '#/components/schemas/FeatureType'
                        maxItems: 100
                      ids:
                        type: array
                        items:
                          type: string
                        maxItems: 100
                      limit:
                        type: integer
                        description: Page limit (default 100)
                        format: int64
                        example: '100'
                      offset:
                        type: integer
                        description: Page offset (default 0)
                        format: int64
                        example: '0'
                      plan_version_id:
                        type: string
                        description: Filter by plan version ID when used with without_plan_entitlement_for; if not provided, the latest published version is used
                      q:
                        type: string
                        description: Search by feature name or ID
                        maxLength: 512
                      without_company_override_for:
                        type: string
                        description: Filter out features that already have a company override for the specified company ID
                      without_plan_entitlement_for:
                        type: string
                        description: Filter out features that already have a plan entitlement for the specified plan ID
                    title: CountFeaturesParams
                required:
                - data
                - params
                title: CountFeaturesResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /flags:
    get:
      operationId: listFlags
      summary: List flags
      tags:
      - features
      parameters:
      - name: feature_id
        in: query
        schema:
          type: string
      - name: ids
        in: query
        schema:
          type: array
          items:
            type: string
          maxItems: 100
      - name: q
        in: query
        description: Search by flag name, key, or ID
        schema:
          type: string
          description: Search by flag name, key, or ID
          maxLength: 512
      - name: limit
        in: query
        description: Page limit (default 100)
        schema:
          type: integer
          description: Page limit (default 100)
          format: int64
          example: '100'
      - name: offset
        in: query
        description: Page offset (default 0)
        schema:
          type: integer
          description: Page offset (default 0)
          format: int64
          example: '0'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/FlagDetailResponseData'
                    title: ListFlagsResponseData
                    maxItems: 250
                  params:
                    type: object
                    description: Input parameters
                    properties:
                      feature_id:
                        type: string
                      ids:
                        type: array
                        items:
                          type: string
                        maxItems: 100
                      limit:
                        type: integer
                        description: Page limit (default 100)
                        format: int64
                        example: '100'
                      offset:
                        type: integer
                        description: Page offset (default 0)
                        format: int64
                        example: '0'
                      q:
                        type: string
                        description: Search by flag name, key, or ID
                        maxLength: 512
                    title: ListFlagsParams
                required:
                - data
                - params
                title: ListFlagsResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
    post:
      operationId: createFlag
      summary: Create flag
      tags:
      - features
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFlagRequestBody'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/FlagDetailResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: CreateFlagParams
                required:
                - data
                - params
                title: CreateFlagResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /flags/{flag_id}:
    get:
      operationId: getFlag
      summary: Get flag
      tags:
      - features
      parameters:
      - name: flag_id
        in: path
        description: flag_id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/FlagDetailResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: GetFlagParams
                required:
                - data
                - params
                title: GetFlagResponse
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
    put:
      operationId: updateFlag
      summary: Update flag
      tags:
      - features
      parameters:
      - name: flag_id
        in: path
        description: flag_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFlagRequestBody'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/FlagDetailResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: UpdateFlagParams
                required:
                - data
                - params
                title: UpdateFlagResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
    delete:
      operationId: deleteFlag
      summary: Delete flag
      tags:
      - features
      parameters:
      - name: flag_id
        in: path
        description: flag_id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DeleteResponse'
                  params:
                    type: object
                    description: Input parameters
                    title: DeleteFlagParams
                required:
                - data
                - params
                title: DeleteFlagResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /flags/{flag_id}/rules:
    put:
      operationId: updateFlagRules
      summary: Update flag rules
      tags:
      - features
      parameters:
      - name: flag_id
        in: path
        description: flag_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateFlagRulesRequestBody'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/RulesDetailResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: UpdateFlagRulesParams
                required:
                - data
                - params
                title: UpdateFlagRulesResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /flags/{key}/check:
    post:
      operationId: checkFlag
      summary: Check flag
      tags:
      - features
      parameters:
      - name: key
        in: path
        description: key
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckFlagRequestBody'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CheckFlagResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: CheckFlagParams
                required:
                - data
                - params
                title: CheckFlagResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /flags/check:
    post:
      operationId: checkFlags
      summary: Check flags
      tags:
      - features
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckFlagRequestBody'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CheckFlagsResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: CheckFlagsParams
                required:
                - data
                - params
                title: CheckFlagsResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /flags/check-bulk:
    post:
      operationId: checkFlagsBulk
      summary: Check flags bulk
      tags:
      - features
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckFlagsBulkRequestBody'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CheckFlagsBulkResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: CheckFlagsBulkParams
                required:
                - data
                - params
                title: CheckFlagsBulkResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /flags/count:
    get:
      operationId: countFlags
      summary: Count flags
      tags:
      - features
      parameters:
      - name: feature_id
        in: query
        schema:
          type: string
      - name: ids
        in: query
        schema:
          type: array
          items:
            type: string
          maxItems: 100
      - name: q
        in: query
        description: Search by flag name, key, or ID
        schema:
          type: string
          description: Search by flag name, key, or ID
          maxLength: 512
      - name: limit
        in: query
        description: Page limit (default 100)
        schema:
          type: integer
          description: Page limit (default 100)
          format: int64
          example: '100'
      - name: offset
        in: query
        description: Page offset (default 0)
        schema:
          type: integer
          description: Page offset (default 0)
          format: int64
          example: '0'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CountResponse'
                  params:
                    type: object
                    description: Input parameters
                    properties:
                      feature_id:
                        type: string
                      ids:
                        type: array
                        items:
                          type: string
                        maxItems: 100
                      limit:
                        type: integer
                        description: Page limit (default 100)
                        format: int64
                        example: '100'
                      offset:
                        type: integer
                        description: Page offset (default 0)
                        format: int64
                        example: '0'
                      q:
                        type: string
                        description: Search by flag name, key, or ID
                        maxLength: 512
                    title: CountFlagsParams
                required:
                - data
                - params
                title: CountFlagsResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
compone

# --- truncated at 32 KB (62 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/schematic/refs/heads/main/openapi/schematic-features-api-openapi.yml