Create a New Variation
1 min
POST
https://api.optimizely.com/flags/v1//projects/{project_id}/flags/{flag_key}/variations
project_idintegerThe project identifier
flag_keystringThe Flag identifier
bodyobject
201<p>Successful retrieval, creation or update of a Variation for a Flag.</p>
<p>The response includes RESTful JSON (<a href="https://restfuljson.org/" target="_blank">https://restfuljson.org/</a>) styled links. If a
link is not present in the response, it indicates a user is not authorized to access
the related resource.</p>
400Malformed requests and invalid parameter names and types
401Invalid credentials
403Do not have permission to perform the operation
curl --request POST \
--url https://api.optimizely.com/flags/v1//projects/{project_id}/flags/{flag_key}/variations \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"key": "high_discount",
"name": "High Discount"
}'