For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
13.5kProductPricingSign inStart free trialBook a demo
DocsAPIsSDKsEnterprise EdgeGuidesAcademyRelease notes
DocsAPIsSDKsEnterprise EdgeGuidesAcademyRelease notes
    • API overview
  • Client API
  • Frontend API
  • Admin API
      • POSTMove feature to project
      • PUT[BETA] Update a milestone strategy
      • GET[BETA] Get partial updates (SDK)
      • PUT[BETA] Change a feature environment safeguard
      • DEL[BETA] Delete a feature environment safeguard
      • POSTValidate a feature flag name.
      • GETGet all tags for a feature.
      • POSTAdds a tag to a feature.
      • PUTUpdates multiple tags for a feature.
      • DELRemoves a tag from a feature.
      • GETGet a feature environment
      • POSTDisable a feature flag
      • POSTEnable a feature flag
      • POSTBulk enable a list of features
      • POSTBulk disable a list of features
      • GETGet feature flag strategies
      • POSTAdd a strategy to a feature flag
      • GETGet a strategy configuration
      • PUTUpdate a strategy
      • DELDelete a strategy from a feature flag
      • PATCHChange specific properties of a strategy
      • POSTSet strategy sort order
      • GETGet all features in a project
      • POSTAdd a new feature flag
      • POSTClone a feature flag
      • GETGet a feature
      • PUTUpdate a feature flag
      • DELArchive a feature flag
      • PATCHModify a feature flag
      • POSTMark features as stale / not stale
      • GETGet variants for a feature in an environment
      • PUTCreate (overwrite) variants for a feature in an environment
      • PATCHPatch a feature's variants in an environment
      • PUTCreate (overwrite) variants for a feature flag in multiple environments
      • POSTValidates archive features
      • POSTArchives a list of features
      • GET[BETA] Get feature lifecycle
      • POST[BETA] Set feature completed
      • POST[BETA] Set feature uncompleted
      • POST[BETA] Create a feature link
      • PUT[BETA] Update a feature link
      • DEL[BETA] Delete a feature link
      • GET[BETA] Get all features lifecycle stage count
      • POSTValidate constraint
      • POSTAdd feature to favorites
      • DELRemove feature from favorites
      • POSTAdd project to favorites
      • DELRemove project from favorites

Unleash reduces the risk of releasing new features, drives innovation by streamlining the software release process, and increases revenue by optimizing end-user experience. While we serve the needs of the world's largest, most security-conscious organizations, we are also rated the “Easiest Feature Management system to use” by G2.

GitHubGitHubLinkedInLinkedInX (Twitter)X (Twitter)SlackSlackStack OverflowStack OverflowYouTubeYouTube

Server SDKs

  • Node.js
  • Java
  • Go
  • Rust
  • Ruby
  • Python
  • .NET
  • PHP
  • All SDKs

Frontend SDKs

  • JavaScript
  • React
  • Next.js
  • Vue
  • iOS
  • Android
  • Flutter

Feature Flag use cases

  • Secure, scalable feature flags
  • Rollbacks
  • FedRAMP, SOC2, ISO2700 compliance
  • Progressive or gradual rollouts
  • Trunk-based development
  • Software kill switches
  • A/B testing
  • Feature management
  • Canary releases

Product

  • Quickstart
  • Unleash architecture
  • Pricing
  • Product vision
  • Open live demo
  • Open source
  • Enterprise feature management platform
  • Unleash vs LaunchDarkly

Support

  • Help center
  • Status
  • Changelog
Made in a cosy atmosphere in the Nordic countries.Copyright © 2026 Unleash
LogoLogo
13.5kProductPricingSign inStart free trialBook a demo
Admin APIFeature flags

Add a new feature flag

||View as Markdown|
POST
https://app.unleash-instance.example.com/api/admin/projects/:projectId/features
POST
/api/admin/projects/:projectId/features
$curl -X POST https://app.unleash-instance.example.com/api/admin/projects/projectId/features \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "disable-comments"
>}'
1{
2 "name": "disable-comments",
3 "type": "kill-switch",
4 "description": "Controls disabling of the comments section in case of an incident",
5 "archived": true,
6 "project": "dx-squad",
7 "enabled": true,
8 "stale": false,
9 "favorite": true,
10 "impressionData": false,
11 "createdAt": "2023-01-28T15:21:39.975Z",
12 "createdBy": {
13 "id": 123,
14 "name": "User",
15 "imageUrl": "https://example.com/242x200.png"
16 },
17 "archivedAt": "2023-01-29T15:21:39.975Z",
18 "environments": [
19 {
20 "name": "my-dev-env",
21 "enabled": true,
22 "featureName": "disable-comments",
23 "environment": "development",
24 "type": "development",
25 "sortOrder": 3,
26 "variantCount": 1.1,
27 "strategies": [
28 {
29 "name": "flexibleRollout",
30 "id": "6b5157cb-343a-41e7-bfa3-7b4ec3044840",
31 "title": "Gradual Rollout 25-Prod",
32 "disabled": false,
33 "featureName": "myAwesomeFeature",
34 "sortOrder": 9999,
35 "segments": [
36 1,
37 2
38 ],
39 "constraints": [
40 {
41 "contextName": "appName",
42 "operator": "IN",
43 "caseInsensitive": false,
44 "inverted": false,
45 "values": [
46 "my-app",
47 "my-other-app"
48 ],
49 "value": "my-app"
50 }
51 ],
52 "variants": [
53 {
54 "name": "blue_group",
55 "weight": 1,
56 "weightType": "fix",
57 "stickiness": "custom.context.field",
58 "payload": {
59 "type": "json",
60 "value": "{\"color\": \"red\"}"
61 }
62 }
63 ],
64 "parameters": {}
65 }
66 ],
67 "variants": [
68 {
69 "name": "blue_group",
70 "weight": 1.1,
71 "weightType": "variable",
72 "stickiness": "custom.context.field",
73 "payload": {
74 "type": "json",
75 "value": "{\"color\": \"red\"}"
76 },
77 "overrides": [
78 {
79 "contextName": "userId",
80 "values": [
81 "red",
82 "blue"
83 ]
84 }
85 ]
86 }
87 ],
88 "changeRequestIds": [
89 1.1
90 ],
91 "milestoneName": "Phase One",
92 "milestoneOrder": 0,
93 "totalMilestones": 0,
94 "lastSeenAt": "2023-01-28T16:21:39.975Z",
95 "hasStrategies": true,
96 "hasEnabledStrategies": true,
97 "releasePlans": [
98 {
99 "id": "01JB9GGTGQYEQ9D40R17T3YVW2",
100 "discriminator": "plan",
101 "name": "My release plan",
102 "featureName": "my-feature",
103 "environment": "production",
104 "createdByUserId": 53,
105 "createdAt": "2022-01-01T00:00:00Z",
106 "milestones": [
107 {
108 "id": "01JB9GGTGQYEQ9D40R17T3YVW1",
109 "name": "My milestone",
110 "sortOrder": 1,
111 "releasePlanDefinitionId": "01JB9GGTGQYEQ9D40R17T3YVW2",
112 "startedAt": "2024-01-01T00:00:00.000Z",
113 "transitionCondition": {
114 "intervalMinutes": 30
115 },
116 "progressionExecutedAt": "2024-01-01T00:00:00.000Z",
117 "pausedAt": "2024-01-01T00:00:00.000Z",
118 "strategies": [
119 {
120 "id": "01JB9GGTGQYEQ9D40R17T3YVW3",
121 "milestoneId": "01JB9GGTGQYEQ9D40R17T3YVW1",
122 "sortOrder": 9999,
123 "name": "flexibleRollout",
124 "strategyName": "flexibleRollout",
125 "title": "Gradual Rollout 25-Prod",
126 "parameters": {
127 "groupId": "some_new",
128 "rollout": "25",
129 "stickiness": "sessionId"
130 },
131 "constraints": [
132 {
133 "contextName": "appName",
134 "operator": "IN",
135 "caseInsensitive": false,
136 "inverted": false,
137 "values": [
138 "1",
139 "2"
140 ]
141 }
142 ],
143 "variants": [
144 {
145 "name": "blue_group",
146 "weight": 1,
147 "weightType": "fix",
148 "stickiness": "custom.context.field",
149 "payload": {
150 "type": "json",
151 "value": "{\"color\": \"red\"}"
152 }
153 }
154 ],
155 "segments": [
156 1,
157 2
158 ],
159 "disabled": false
160 }
161 ]
162 }
163 ],
164 "releasePlanTemplateId": "01JB9GGTGQYEQ9D40R17T3YVW2",
165 "description": "This is my release plan",
166 "activeMilestoneId": "01JB9GGTGQYEQ9D40R17T3YVW1",
167 "safeguards": [
168 {
169 "id": "01JB9GGTGQYEQ9D40R17T3YVW1",
170 "action": {
171 "type": "pauseReleasePlanProgressions",
172 "id": "01JB9GGTGQYEQ9D40R17T3YVW2"
173 },
174 "triggerCondition": {
175 "operator": ">",
176 "threshold": 100
177 },
178 "impactMetric": {
179 "id": "01JB9GGTGQYEQ9D40R17T3YVW1",
180 "metricName": "unleash_counter_feature_toggle_usage_total",
181 "timeRange": "day",
182 "aggregationMode": "rps",
183 "labelSelectors": {
184 "environment": [
185 "development"
186 ],
187 "project": [
188 "default"
189 ]
190 },
191 "source": "internal"
192 }
193 }
194 ]
195 }
196 ],
197 "safeguards": [
198 {
199 "id": "01JB9GGTGQYEQ9D40R17T3YVW1",
200 "action": {
201 "type": "disableFeatureEnvironment",
202 "featureName": "string",
203 "environment": "string",
204 "project": "string"
205 },
206 "triggerCondition": {
207 "operator": ">",
208 "threshold": 100
209 },
210 "impactMetric": {
211 "id": "01JB9GGTGQYEQ9D40R17T3YVW1",
212 "metricName": "unleash_counter_feature_toggle_usage_total",
213 "timeRange": "day",
214 "aggregationMode": "rps",
215 "labelSelectors": {
216 "environment": [
217 "development"
218 ],
219 "project": [
220 "default"
221 ]
222 },
223 "source": "internal"
224 }
225 }
226 ],
227 "yes": 974,
228 "no": 50
229 }
230 ],
231 "tags": [
232 {
233 "value": "a-tag-value",
234 "type": "simple",
235 "color": "#FFFFFF"
236 }
237 ],
238 "children": [
239 "some-feature"
240 ],
241 "lifecycle": {
242 "stage": "initial",
243 "enteredStageAt": "2023-01-28T15:21:39.975Z",
244 "status": "kept"
245 },
246 "dependencies": [
247 {
248 "feature": "some-feature",
249 "enabled": true,
250 "variants": [
251 "some-feature-blue-variant"
252 ]
253 }
254 ],
255 "collaborators": {
256 "users": [
257 {
258 "id": 123,
259 "name": "User",
260 "imageUrl": "https://example.com/242x200.png"
261 }
262 ]
263 },
264 "links": [
265 {
266 "id": "01JTJNCJ5XVP2KPJFA03YRBZCA",
267 "url": "https://github.com/search?q=cleanupReminder&type=code",
268 "title": "Github cleanup",
269 "feature": "disable-comments"
270 }
271 ],
272 "lastSeenAt": "2023-01-28T16:21:39.975Z",
273 "variants": [
274 {
275 "name": "blue_group",
276 "weight": 1.1,
277 "weightType": "variable",
278 "stickiness": "custom.context.field",
279 "payload": {
280 "type": "json",
281 "value": "{\"color\": \"red\"}"
282 },
283 "overrides": [
284 {
285 "contextName": "userId",
286 "values": [
287 "red",
288 "blue"
289 ]
290 }
291 ]
292 }
293 ],
294 "strategies": [
295 {}
296 ]
297}
Create a new feature flag in a specified project.
Was this page helpful?
Previous

Clone a feature flag

Next
Built with

Authentication

Authorizationstring
API key needed to access this API
OR
AuthorizationBearer
API key needed to access this API, in Bearer token format

Path parameters

projectIdstringRequired

Request

createFeatureSchema
namestringRequired
Unique feature name
typeenumOptional

The feature flag’s type. One of experiment, kill-switch, release, operational, or permission

Allowed values:
descriptionstring or nullOptional
Detailed description of the feature
impressionDatabooleanOptional

true if the impression data collection is enabled for the feature, otherwise false.

tagslist of objectsOptional
Tags to add to the feature.

Response

featureSchema
namestring
Unique feature name
typestring

Type of the flag e.g. experiment, kill-switch, release, operational, permission

descriptionstring or null
Detailed description of the feature
archivedboolean

true if the feature is archived

projectstring
Name of the project the feature belongs to
enabledboolean

true if the feature is enabled, otherwise false.

staleboolean

true if the feature is stale based on the age and feature type, otherwise false.

favoriteboolean

true if the feature was favorited, otherwise false.

impressionDataboolean

true if the impression data collection is enabled for the feature, otherwise false.

createdAtstring or nullformat: "date-time"
The date the feature was created
createdByobject
User who created the feature flag
archivedAtstring or nullformat: "date-time"
The date the feature was archived
environmentslist of objects
The list of environments where the feature can be used
tagslist of objects or null
The list of feature tags
childrenlist of strings
The list of child feature names. This is an experimental field and may change.
lifecycleobject
Current lifecycle stage of the feature
dependencieslist of objects
The list of parent dependencies. This is an experimental field and may change.
collaboratorsobject
Information related to users who have made changes to this feature flage.
linkslist of objects
The list of links. This is an experimental field and may change.
lastSeenAtstring or nullformat: "date-time"Deprecated
The date when metrics where last collected for the feature. This field was deprecated in v5, use the one in featureEnvironmentSchema
variantslist of objectsDeprecated
The list of feature variants
strategieslist of objectsDeprecated
This was deprecated in v5 and will be removed in a future major version

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
415
Unsupported Media Type Error