Sample - Asana API
POST/portfolios/{portfolio_gid}/addItem

Add an item to a portfolio

Adds an item to a portfolio and places it at a specified position. Supply item and optionally use insert_before or insert_after to control ordering, but not both. A successful response contains an empty data object.

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

1 body field

Portfolio item insertion details wrapped in a data object. item is required; provide at most one of insert_before and insert_after.

dataobjectoptional

6 status codes
200Returns an empty `data` object after the item is successfully added to the portfolio.
dataobjectoptional
An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.
400Returned when `item` is missing, a parameter is malformed, or both `insert_before` and `insert_after` are provided.
errorsarray<object>optional
401Returned when the request does not include a valid authentication token.
errorsarray<object>optional
403Returned when the authenticated user does not have access to the portfolio or the required `portfolios:write` scope.
errorsarray<object>optional
404Returned when the portfolio or referenced item does not exist, or the method and path do not identify a known action.
errorsarray<object>optional
500Returned when the API encounters a server-side failure.
errorsarray<object>optional

Error handling

A 400 is returned when item is missing, the request is malformed, or both insert_before and insert_after are supplied. A 401 indicates that no valid authentication token was provided, while a 403 indicates that the authenticated user lacks access to the portfolio or the required portfolios:write scope. A 404 indicates that the portfolio or referenced item does not exist, and a 500 indicates a server-side failure.