curl --location --request PUT 'https://app.asana.com/api/1.0/enum_options/' \
--header 'Content-Type: application/json' \
--data-raw '{
"data": {
"color": "blue",
"enabled": true,
"name": "Low",
"insert_after": "12345",
"insert_before": "12345"
}
}'
{
"data": {
"gid": "12345",
"resource_type": "task",
"color": "blue",
"enabled": true,
"name": "Low"
}
}
POST /custom_fields/custom_field_gid/enum_options
endpoint.enabled
field to false with the PUT /enum_options/enum_option_gid
endpoint. Other attributes can be updated similarly.enabled
is always set to true
, meaning the enum option is a selectable value for the custom field. Setting enabled=false
is equivalent to “trashing” the enum option in the Asana web app within the “Edit Fields” dialog. The enum option will no longer be selectable but, if the enum option value was previously set within a task, the task will retain the value.insert_before
or insert_after
to reference an existing enum option. Only one of insert_before
and insert_after
can be provided when creating a new enum option.POST /custom_fields/custom_field_gid/enum_options/insert
endpoint.POST /custom_fields/custom_field_gid/enum_options
endpoint.enabled
field to false with the PUT /enum_options/enum_option_gid
endpoint. Other attributes can be updated similarly.enabled
is always set to true
, meaning the enum option is a selectable value for the custom field. Setting enabled=false
is equivalent to “trashing” the enum option in the Asana web app within the “Edit Fields” dialog. The enum option will no longer be selectable but, if the enum option value was previously set within a task, the task will retain the value.insert_before
or insert_after
to reference an existing enum option. Only one of insert_before
and insert_after
can be provided when creating a new enum option.POST /custom_fields/custom_field_gid/enum_options/insert
endpoint.