Create a Feature
1 min
POST
https://api.optimizely.com/v2/features
acceptstringGenerated from available response content types
bodyobject<p>A string in JSON format that includes all the fields to create a new Feature. Note this endpoint is incompatible with Full Stack Targeted Rollouts projects
(default in accounts created after July 2020) and with non-legacy Full Stack projects (default in projects created after February 2021).
See the compatible API at <a href="https://library.optimizely.com/docs/api/flags/v1/index.html#tag/Flags" target="_blank">https://library.optimizely.com/docs/api/flags/v1/index.html#tag/Flags</a>.</p>
201Successfully created the Feature
400Invalid request body content
401Invalid credentials
defaultUnexpected error
curl --request POST \
--url https://api.optimizely.com/v2/features \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"key": "new_checkout_page",
"project_id": "",
"variables": [
{
"default_value": "0.05",
"key": "",
"type": "double"
}
]
}'