- Attachments
- Batch API
- Custom Fields
- Events
- Goals
- Get goalsGET
- Create a goalPOST
- Delete a goalDELETE
- Get a goalGET
- Update a goalPUT
- Add a collaborator to a goalPOST
- Add a subgoal to a parent goalPOST
- Add a project/portfolio as supporting work for a goal.POST
- Get parent goals from a goalGET
- Remove a collaborator from a goalPOST
- Remove a subgoal from a goalPOST
- Remove a project/portfolio as supporting work for a goal.POST
- Create a goal metricPOST
- Update a goal metricPOST
- Get subgoals from a goalGET
- Get supporting work from a goalGET
- Jobs
- Organization Exports
- Teams
- Portfolio Memberships
- Portfolios
- Custom Field Settings
- Project Memberships
- Project Statuses
- Projects
- Get multiple projects
- Create a project
- Delete a project
- Get a project
- Update a project
- Add a custom field to a project
- Add followers to a project
- Add users to a project
- Duplicate a project
- Remove a custom field from a project
- Remove followers from a project
- Remove users from a project
- Get task count of a project
- Get projects a task is in
- Get a team's projects
- Create a project in a team
- Get all projects in a workspace
- Create a project in a workspace
- Sections
- Tasks
- Get tasks from a project
- Get tasks from a section
- Get tasks from a tag
- Get multiple tasks
- Create a task
- Delete a task
- Get a task
- Update a task
- Set dependencies for a task
- Set dependents for a task
- Add followers to a task
- Add a project to a task
- Add a tag to a task
- Get dependencies from a task
- Get dependents from a task
- Duplicate a task
- Unlink dependencies from a task
- Unlink dependents from a task
- Remove followers from a task
- Remove a project from a task
- Remove a tag from a task
- Set the parent of a task
- Get subtasks from a task
- Create a subtask
- Get tasks from a user task list
- Search tasks in a workspace
- Stories
- Tags
- Team Memberships
- Users
- Time Periods
- User Task Lists
- Workspace Memberships
- Webhooks
- Workspaces
- Typeahead
Create an enum option
POST
/custom_fields/{custom_field_gid}/enum_options
Custom Fields
Locked custom fields can only have enum options added by the user who locked the field.
Returns the full record of the newly created enum option.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://app.asana.com/api/1.0/custom_fields//enum_options' \
--header 'Content-Type: application/json' \
--data-raw '{
"data": {
"color": "blue",
"enabled": true,
"name": "Low",
"insert_after": "12345",
"insert_before": "12345"
}
}'
Response Response Example
201 - Example 1
{
"data": {
"gid": "12345",
"resource_type": "task",
"color": "blue",
"enabled": true,
"name": "Low"
}
}
Request
Path Params
custom_field_gid
string
required
Body Params application/json
data
object (EnumOptionRequest)
optional
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.insert_after
string
optional
Example:
12345
insert_before
string
optional
Example:
12345
color
string
optional
Example:
blue
enabled
boolean
optional
Example:
true
name
string
optional
Example:
Low
Examples
Responses
🟢201Custom field enum option successfully created.
application/json
Body
data
object (EnumOption)
optional
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.gid
string
read-onlyoptional
Example:
12345
resource_type
string
read-onlyoptional
Example:
task
color
string
optional
Example:
blue
enabled
boolean
optional
Example:
true
name
string
optional
Example:
Low
🟠400400
🟠401401
🟠403403
🟠404404
🔴500500
Modified at 2022-09-13 02:00:31