{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"<b>Required scope: </b><code>custom_fields:write</code>\n\nCreates 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.\nLocked custom fields can only have enum options added by the user who locked the field.\nReturns the full record of the newly created enum option.","properties":{"path":{"type":"object","properties":{"custom_field_gid":{"type":"string","examples":["12345"],"description":"Globally unique identifier for the custom field."}},"required":["custom_field_gid"],"additionalProperties":false},"query":{"type":"object","properties":{"opt_pretty":{"type":"boolean","examples":[true],"description":"Provides “pretty” output.\nProvides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging."},"opt_fields":{"type":"array","items":{"type":"string","enum":["color","enabled","name"]},"examples":[["color","enabled","name"]],"description":"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](/docs/inputoutput-options#selecting-nested-fields)."}},"required":[],"additionalProperties":false},"body":{"type":"object","properties":{"data":{"$ref":"#/definitions/EnumOptionRequest"}}}},"required":["path"],"additionalProperties":false,"definitions":{"EnumOptionRequest":{"allOf":[{"$ref":"#/definitions/EnumOptionBase"},{"type":"object","properties":{"insert_before":{"type":"string","description":"An existing enum option within this custom field before which the new enum option should be inserted. Cannot be provided together with after_enum_option.","examples":["12345"]},"insert_after":{"type":"string","description":"An existing enum option within this custom field after which the new enum option should be inserted. Cannot be provided together with before_enum_option.","examples":["12345"]}}}]},"EnumOptionBase":{"$ref":"#/definitions/EnumOption"},"EnumOption":{"description":"Enum options are the possible values which an enum custom field can adopt. An enum custom field must contain at least 1 enum option but no more than 500.\n\nYou can add enum options to a custom field by using the `POST /custom_fields/custom_field_gid/enum_options` endpoint.\n\n**It is not possible to remove or delete an enum option**. Instead, enum options can be disabled by updating the `enabled` field to false with the `PUT /enum_options/enum_option_gid` endpoint. Other attributes can be updated similarly.\n\nOn creation of an enum option, `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.\n\nEnum options are an ordered list and by default new enum options are inserted at the end. Ordering in relation to existing enum options can be specified on creation by using `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.\n\nAn enum options list can be reordered with the `POST /custom_fields/custom_field_gid/enum_options/insert` endpoint.","type":"object","properties":{"name":{"description":"The name of the enum option.","type":"string","examples":["Low"]},"enabled":{"description":"Whether or not the enum option is a selectable value for the custom field.","type":"boolean","examples":[true]},"color":{"description":"The color of the enum option. Defaults to `none`.","type":"string","examples":["blue"]}}}}},"name":"Create an enum option","id":"asana.createenumoptionforcustomfield","example":{"path":{"custom_field_gid":"12345"}},"maxRequests":1,"summary":false}}