Create an enum option
<b>Required scope: </b><code>custom_fields:write</code>
Creates an enum option and adds it to this custom field’s list of enum options. A custom field can have at most 500 enum options (including disabled options). By default new enum options are inserted at the end of a custom field’s list. 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
- Base URL: https://app.asana.com/api/1.0
- URL: https://app.asana.com/api/1.0/custom_fields/{custom_field_gid}/enum_options
- Auth: one of:
- HTTP bearer
- OAuth 2 (authorization code, authorization URL https://app.asana.com/-/oauth_authorize, token URL https://app.asana.com/-/oauth_token, scopes: custom_fields:write)
Query parameters
This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. Properties can include nested fields. To learn more, see the input/output options guide.
Request body
Example request
{
"data": {
"gid": "12345",
"resource_type": "enum_option",
"name": "Low",
"enabled": true,
"color": "blue",
"insert_before": "12345",
"insert_after": "12345"
}
}Response
Custom field enum option successfully created.
Example response
{
"data": {
"gid": "12345",
"resource_type": "enum_option",
"name": "Low",
"enabled": true,
"color": "blue"
}
}Changes
No operation changes recorded.