Create feature flag

Create a feature flag in your account, given a traffic type. This API does not configure the flag in any FME environment. Provide the feature flag details in the JSON body; path parameters specify the project and traffic type.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Access requirements

The Authorization Bearer (Admin API Key authorizing the request) must have one of the following roles and scopes:

Admin API Key roles accepted

  • API_ALL_GRANTED
  • API_FEATURE_FLAG_EDITOR

Admin API Key scopes accepted

  • GLOBAL
  • WORKSPACE

To learn more about Admin API Key roles and scopes, see API keys overview.


JSON Payload Posted

{
 "name": String, // Mandatory
 "description": String, // Optional
 "owners": [ // Optional
      {
        "id": String,
        "type": String
      }
    ]
}

Note: Owners are treated as metadata to help identify responsible stakeholders and filter feature flags. Owners are not automatically granted edit permissions. To manage who can edit a resource, use environment-level permissions or configure explicit editors.

The owners field specifies users or teams responsible for the feature flag. Each owner object requires an id and a type.

  • type must either be User or Team.
  • id must correspond to an existing user or team in the project (or workspace).
  • The _project_all_users team ID represents the All Project Users owner available in the FME UI.

For example:

{
  "name": "paywall_beta",
  "description": "description",
  "owners": [
    {
      "id": "EvGB7BeOTAWilAUxLcFlgA",
      "type": "User"
    },
    {
      "id": "_project_all_users",
      "type": "Team"
    }
  ]
}

If an invalid owner is provided, the API returns a 400 Invalid Owner response.

Path Params
string
required

The ID of the project (workspace) where you want to create the feature flag. After migration to Harness, get this value using the Get Projects (Workspaces) endpoint and the Harness project name.

string
required

The ID or case-sensitive name of the traffic type used to create the feature flag.

Form Data
json

JSON object that contains the name and (optionally) the description and owners of the feature flag.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
LoadingLoading…
Response
Choose an example:
application/json
text/plain