{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"<b>Required scope: </b><code>portfolios:write</code>\n\nAn existing portfolio can be updated by making a PUT request on the URL for\nthat portfolio. Only the fields provided in the `data` block will be updated;\nany unspecified fields will remain unchanged.\n\nReturns the complete updated portfolio record.","properties":{"path":{"type":"object","properties":{"portfolio_gid":{"type":"string","examples":["12345"],"description":"Globally unique identifier for the portfolio."}},"required":["portfolio_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":["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/PortfolioUpdateRequest"}}}},"required":["path","body"],"additionalProperties":false,"definitions":{"PortfolioUpdateRequest":{"allOf":[{"$ref":"#/definitions/PortfolioBase"},{"type":"object","properties":{"custom_fields":{"description":"An object where each key is the GID of a custom field and its corresponding value is either an enum GID, string, number, or object (depending on the custom field type). See the [custom fields guide](/docs/custom-fields-guide) for details on creating and updating custom field values.","type":"object","additionalProperties":{"type":"string","description":"\"{custom_field_gid}\" => Value (can be text, enum GID, a number, etc.). For date, use format \"YYYY-MM-DD\" (e.g., 2019-09-15). For date-time, use ISO 8601 date string in UTC (e.g., 2019-09-15T02:06:58.147Z)."},"examples":[{"5678904321":"On Hold","4578152156":"Not Started"}]},"html_custom_fields":{"description":"An object where each key is the GID of a text custom field and the corresponding value is a rich text HTML string. Only text-type custom fields support this parameter. Values must be wrapped in <body></body> tags. See the [custom fields guide](/docs/custom-fields-guide) and [rich text](/docs/rich-text) for details on supported formatting.","type":"object","additionalProperties":{"type":"string","description":"\"{custom_field_gid}\" => HTML string (e.g., \"<body>Text content</body>\")"},"examples":[{"5678904321":"<body><strong>Bold text</strong></body>","4578152156":"<body><code>Code block</code></body>"}]},"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":"Update a portfolio","id":"asana.updateportfolio","example":{"path":{"portfolio_gid":"12345"},"body":{}},"maxRequests":1,"summary":false}}