---
title: "Create a strategy"
method: POST
path: "/api/admin/strategies"
tags: ["Strategies"]
---

# Create a strategy

`POST /api/admin/strategies`

Creates a custom strategy type based on the supplied data.

## Request body

- CreateStrategySchema — The data required to create a strategy type. Refer to the docs on [custom strategy types](https://docs.getunleash.io/concepts/activation-strategies#custom-strategies) for more information.
  - `name` string, required — The name of the strategy type. Must be unique.
  - `title` string — The title of the strategy
  - `description` string — A description of the strategy type.
  - `editable` boolean — Whether the strategy type is editable or not. Defaults to `true`.
  - `deprecated` boolean — Whether the strategy type is deprecated or not. Defaults to `false`.
  - `parameters` object[], required — The parameter list lets you pass arguments to your custom activation strategy. These will be made available to your custom strategy implementation.
    - `name` string, required — The name of the parameter
    - `type` 'string' | 'percentage' | 'list' | 'number' | 'boolean', required — The [type of the parameter](https://docs.getunleash.io/concepts/activation-strategies#parameters)
    - `description` string — A description of this strategy parameter. Use this to indicate to the users what the parameter does.
    - `required` boolean — Whether this parameter must be configured when using the strategy. Defaults to `false`

## Response `201`

The resource was successfully created.

- StrategySchema — The [activation strategy](https://docs.getunleash.io/concepts/activation-strategies) schema
  - `title` string, nullable — An optional title for the strategy
  - `name` string, required — The name (type) of the strategy
  - `displayName` string, nullable, required — A human friendly name for the strategy
  - `description` string, nullable, required — A short description of the strategy
  - `editable` boolean, required — Whether the strategy can be edited or not. Strategies bundled with Unleash cannot be edited.
  - `deprecated` boolean, required
  - `parameters` object[], required — A list of relevant parameters for each strategy
    - `name` string
    - `type` string
    - `description` string
    - `required` boolean

## Other responses

- `401` — Authorization information is missing or invalid. Provide a valid API token as the `authorization` header, e.g. `authorization:*.*.my-admin-token`.
- `403` — The provided user credentials are valid, but the user does not have the necessary permissions to perform this operation
- `409` — The provided resource can not be created or updated because it would conflict with the current state of the resource or with an already existing resource, respectively.
- `415` — The operation does not support request payloads of the provided type. Please ensure that you're using one of the listed payload types and that you have specified the right content type in the "content-type" header.

---

[API](https://skmtc.net/unleash/apis/unleash-api-3.md) · [All operations](https://skmtc.net/unleash/apis/unleash-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/unleash/unleash-api-3/revisions/b2c3116e633e/schema)
