v7

latestOpenAPI 3.0.3raw.githubusercontent.com2026-08-013764062.2 MB
Strategies

Create a strategy

Creates a custom strategy type based on the supplied data.

post/api/admin/strategies

Request body

namestring required

The name of the strategy type. Must be unique.

titlestring

The title of the strategy

descriptionstring

A description of the strategy type.

editableboolean

Whether the strategy type is editable or not. Defaults to true.

deprecatedboolean

Whether the strategy type is deprecated or not. Defaults to false.

Example request

{
  "name": "my-custom-strategy",
  "title": "My awesome strategy",
  "description": "Enable the feature for users who have not logged in before.",
  "deprecated": true,
  "parameters": [
    {
      "name": "Rollout percentage",
      "type": "percentage",
      "description": "How many percent of users should see this feature?"
    }
  ]
}

Response

The resource was successfully created.

titlestring nullable

An optional title for the strategy

namestring required

The name (type) of the strategy

displayNamestring nullable required

A human friendly name for the strategy

descriptionstring nullable required

A short description of the strategy

editableboolean required

Whether the strategy can be edited or not. Strategies bundled with Unleash cannot be edited.

deprecatedboolean required

Example response

{
  "title": "GradualRollout - Prod25",
  "name": "flexibleRollout",
  "displayName": "Gradual Rollout",
  "description": "Gradual rollout to logged in users",
  "editable": true,
  "deprecated": true,
  "parameters": [
    {
      "name": "percentage",
      "type": "percentage",
      "description": "Gradual rollout to logged in users",
      "required": true
    }
  ]
}