Sample - Asana API
POST/portfolios

Create a portfolio

Creates a new portfolio in a workspace with the supplied portfolio data. Use the data body property to provide the portfolio details and opt_fields to request additional properties in the response. Portfolios created through the API do not receive the initial UI-managed state automatically.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter · 1 body field
opt_fieldsarray<string>optional
Comma-separated list of optional response properties to include, including nested properties such as `created_by.name` and `custom_field_settings.custom_field`; omit it to use the default response fields.

The portfolio data to create.

dataobjectoptional
Object containing the portfolio properties to create, including workspace and custom type information where applicable.

6 status codes
201Returns the newly created portfolio record.
dataobjectoptional
400Returned when a parameter is missing or malformed.
errorsarray<object>optional
401Returned when a valid authentication token is not provided.
errorsarray<object>optional
403Returned when the authenticated user does not have access to the requested operation or properties.
errorsarray<object>optional
404Returned when the request does not specify a known action or the referenced object does not exist.
errorsarray<object>optional
500Returned when a server-side problem occurs; the response may include an error phrase.
errorsarray<object>optional

Error handling

A 400 is returned when a parameter is missing or malformed. A 401 is returned when the request does not include a valid authentication token; a 403 is returned when the authenticated user cannot access the requested portfolio operation; and a 404 is returned when the request does not identify a known action or object. A 500 is returned when a server-side problem occurs. Send the portfolio data in data and use opt_fields only with supported property names.