{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"<b>Required scope: </b><code>portfolios:write</code>\n\nCreates a new portfolio in the given workspace with the supplied name.\n\nNote that portfolios created in the Asana UI may have some state\n(like the “Priority” custom field) which is automatically added\nto the portfolio when it is created. Portfolios created via our\nAPI will *not* be created with the same initial state to allow\nintegrations to create their own starting state on a portfolio.","properties":{"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":["archived","color","created_at","created_by","created_by.name","current_status_update","current_status_update.resource_subtype","current_status_update.title","custom_field_settings","custom_field_settings.custom_field","custom_field_settings.custom_field.asana_created_field","custom_field_settings.custom_field.created_by","custom_field_settings.custom_field.created_by.name","custom_field_settings.custom_field.currency_code","custom_field_settings.custom_field.custom_label","custom_field_settings.custom_field.custom_label_position","custom_field_settings.custom_field.date_value","custom_field_settings.custom_field.date_value.date","custom_field_settings.custom_field.date_value.date_time","custom_field_settings.custom_field.default_access_level","custom_field_settings.custom_field.description","custom_field_settings.custom_field.display_value","custom_field_settings.custom_field.enabled","custom_field_settings.custom_field.enum_options","custom_field_settings.custom_field.enum_options.color","custom_field_settings.custom_field.enum_options.enabled","custom_field_settings.custom_field.enum_options.name","custom_field_settings.custom_field.enum_value","custom_field_settings.custom_field.enum_value.color","custom_field_settings.custom_field.enum_value.enabled","custom_field_settings.custom_field.enum_value.name","custom_field_settings.custom_field.format","custom_field_settings.custom_field.has_notifications_enabled","custom_field_settings.custom_field.html_text_value","custom_field_settings.custom_field.id_prefix","custom_field_settings.custom_field.input_restrictions","custom_field_settings.custom_field.is_formula_field","custom_field_settings.custom_field.is_global_to_workspace","custom_field_settings.custom_field.is_lookup_field","custom_field_settings.custom_field.is_value_read_only","custom_field_settings.custom_field.multi_enum_values","custom_field_settings.custom_field.multi_enum_values.color","custom_field_settings.custom_field.multi_enum_values.enabled","custom_field_settings.custom_field.multi_enum_values.name","custom_field_settings.custom_field.name","custom_field_settings.custom_field.number_value","custom_field_settings.custom_field.people_value","custom_field_settings.custom_field.people_value.name","custom_field_settings.custom_field.precision","custom_field_settings.custom_field.privacy_setting","custom_field_settings.custom_field.reference_value","custom_field_settings.custom_field.reference_value.name","custom_field_settings.custom_field.representation_type","custom_field_settings.custom_field.resource_subtype","custom_field_settings.custom_field.text_value","custom_field_settings.custom_field.type","custom_field_settings.is_important","custom_field_settings.parent","custom_field_settings.parent.name","custom_field_settings.parent.resource_subtype","custom_field_settings.project","custom_field_settings.project.name","custom_field_settings.project.resource_subtype","custom_fields","custom_fields.date_value","custom_fields.date_value.date","custom_fields.date_value.date_time","custom_fields.display_value","custom_fields.enabled","custom_fields.enum_options","custom_fields.enum_options.color","custom_fields.enum_options.enabled","custom_fields.enum_options.name","custom_fields.enum_value","custom_fields.enum_value.color","custom_fields.enum_value.enabled","custom_fields.enum_value.name","custom_fields.id_prefix","custom_fields.input_restrictions","custom_fields.is_formula_field","custom_fields.is_lookup_field","custom_fields.multi_enum_values","custom_fields.multi_enum_values.color","custom_fields.multi_enum_values.enabled","custom_fields.multi_enum_values.name","custom_fields.name","custom_fields.number_value","custom_fields.representation_type","custom_fields.text_value","custom_fields.type","custom_type","custom_type.asana_created_type_identifier","custom_type.name","default_access_level","due_on","members","members.name","name","owner","owner.name","permalink_url","privacy_setting","project_templates","project_templates.name","public","resource_subtype","start_on","workspace","workspace.name"]},"examples":[["archived","color","created_at","created_by","created_by.name","current_status_update","current_status_update.resource_subtype","current_status_update.title","custom_field_settings","custom_field_settings.custom_field","custom_field_settings.custom_field.asana_created_field","custom_field_settings.custom_field.created_by","custom_field_settings.custom_field.created_by.name","custom_field_settings.custom_field.currency_code","custom_field_settings.custom_field.custom_label","custom_field_settings.custom_field.custom_label_position","custom_field_settings.custom_field.date_value","custom_field_settings.custom_field.date_value.date","custom_field_settings.custom_field.date_value.date_time","custom_field_settings.custom_field.default_access_level","custom_field_settings.custom_field.description","custom_field_settings.custom_field.display_value","custom_field_settings.custom_field.enabled","custom_field_settings.custom_field.enum_options","custom_field_settings.custom_field.enum_options.color","custom_field_settings.custom_field.enum_options.enabled","custom_field_settings.custom_field.enum_options.name","custom_field_settings.custom_field.enum_value","custom_field_settings.custom_field.enum_value.color","custom_field_settings.custom_field.enum_value.enabled","custom_field_settings.custom_field.enum_value.name","custom_field_settings.custom_field.format","custom_field_settings.custom_field.has_notifications_enabled","custom_field_settings.custom_field.html_text_value","custom_field_settings.custom_field.id_prefix","custom_field_settings.custom_field.input_restrictions","custom_field_settings.custom_field.is_formula_field","custom_field_settings.custom_field.is_global_to_workspace","custom_field_settings.custom_field.is_lookup_field","custom_field_settings.custom_field.is_value_read_only","custom_field_settings.custom_field.multi_enum_values","custom_field_settings.custom_field.multi_enum_values.color","custom_field_settings.custom_field.multi_enum_values.enabled","custom_field_settings.custom_field.multi_enum_values.name","custom_field_settings.custom_field.name","custom_field_settings.custom_field.number_value","custom_field_settings.custom_field.people_value","custom_field_settings.custom_field.people_value.name","custom_field_settings.custom_field.precision","custom_field_settings.custom_field.privacy_setting","custom_field_settings.custom_field.reference_value","custom_field_settings.custom_field.reference_value.name","custom_field_settings.custom_field.representation_type","custom_field_settings.custom_field.resource_subtype","custom_field_settings.custom_field.text_value","custom_field_settings.custom_field.type","custom_field_settings.is_important","custom_field_settings.parent","custom_field_settings.parent.name","custom_field_settings.parent.resource_subtype","custom_field_settings.project","custom_field_settings.project.name","custom_field_settings.project.resource_subtype","custom_fields","custom_fields.date_value","custom_fields.date_value.date","custom_fields.date_value.date_time","custom_fields.display_value","custom_fields.enabled","custom_fields.enum_options","custom_fields.enum_options.color","custom_fields.enum_options.enabled","custom_fields.enum_options.name","custom_fields.enum_value","custom_fields.enum_value.color","custom_fields.enum_value.enabled","custom_fields.enum_value.name","custom_fields.id_prefix","custom_fields.input_restrictions","custom_fields.is_formula_field","custom_fields.is_lookup_field","custom_fields.multi_enum_values","custom_fields.multi_enum_values.color","custom_fields.multi_enum_values.enabled","custom_fields.multi_enum_values.name","custom_fields.name","custom_fields.number_value","custom_fields.representation_type","custom_fields.text_value","custom_fields.type","custom_type","custom_type.asana_created_type_identifier","custom_type.name","default_access_level","due_on","members","members.name","name","owner","owner.name","permalink_url","privacy_setting","project_templates","project_templates.name","public","resource_subtype","start_on","workspace","workspace.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/PortfolioRequest"}}}},"required":["body"],"additionalProperties":false,"definitions":{"PortfolioRequest":{"allOf":[{"$ref":"#/definitions/PortfolioBase"},{"type":"object","properties":{"workspace":{"type":"string","description":"*Create-only*. The workspace or organization that the portfolio belongs to.","examples":["167589"]},"custom_type":{"type":["string","null"],"description":"*Conditional:* You can only set custom_type if portfolio `resource_subtype` is `custom`. GID or globally-unique identifier of a portfolio's custom type. The type must be valid for portfolios, and some Asana-created custom types cannot be assigned via the API; attempting either returns an error explaining which condition failed.","examples":["12345"]}}}]},"PortfolioBase":{"allOf":[{"$ref":"#/definitions/PortfolioCompact"},{"type":"object","properties":{"archived":{"description":"[Opt In](/docs/inputoutput-options). True if the portfolio is archived, false if not. Archived portfolios do not show in the UI by default and may be treated differently for queries.","type":"boolean","examples":[false]},"color":{"description":"Color of the portfolio.","type":"string","enum":["dark-pink","dark-green","dark-blue","dark-red","dark-teal","dark-brown","dark-orange","dark-purple","dark-warm-gray","light-pink","light-green","light-blue","light-red","light-teal","light-brown","light-orange","light-purple","light-warm-gray"],"examples":["light-green"]},"start_on":{"description":"The day on which work for this portfolio begins, or null if the portfolio has no start date. This takes a date with `YYYY-MM-DD` format. *Note: `due_on` must be present in the request when setting or unsetting the `start_on` parameter. Additionally, `start_on` and `due_on` cannot be the same date.*","type":["string","null"],"format":"date","examples":["2019-09-14"]},"due_on":{"description":"The day on which this portfolio is due. This takes a date with format YYYY-MM-DD.","type":["string","null"],"format":"date","examples":["2019-09-15"]},"default_access_level":{"description":"The default access level when inviting new members to the portfolio","type":"string","enum":["admin","editor","viewer"],"examples":["viewer"]},"public":{"description":"Defines whether the portfolio is public to its workspace members. `true` if the portfolio is public to workspace members, `false` if it's visible only to members of the portfolio. New portfolios are private by default.","type":"boolean","examples":[false]}}}]},"PortfolioCompact":{"description":"A *portfolio* gives a high-level overview of the status of multiple initiatives in Asana. Portfolios provide a dashboard overview of the state of multiple projects, including a progress report and the most recent [project status](/reference/project-statuses) update.\nPortfolios have some restrictions on size. Each portfolio has a max of 1500 items and, like projects, a max of 20 custom fields.","type":"object","properties":{"name":{"description":"The name of the portfolio.","type":"string","examples":["Bug Portfolio"]},"resource_subtype":{"type":"string","description":"The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.","enum":["default_portfolio","custom"],"examples":["default_portfolio"]}}}}},"name":"Create a portfolio","id":"asana.createportfolio","example":{"body":{}},"maxRequests":1,"summary":false}}