Create Variable Definition
1 min
POST
https://api.optimizely.com/flags/v1//projects/{project_id}/flags/{flag_key}/variable_definitions
flag_keystringThe Flag identifier
project_idintegerThe project identifier
acceptstringGenerated from available response content types
bodyobject
200Create a variable definition
400Malformed requests and invalid parameter names and types
401Invalid credentials
403Do not have permission to perform the operation
404Not found. No content
409Conflicting resource state with requested action
curl --request POST \
--url https://api.optimizely.com/flags/v1//projects/{project_id}/flags/{flag_key}/variable_definitions \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"default_value": "0.0",
"key": "amount",
"type": "double"
}'