Sample - Asana API
POST/allocations

Create an allocation

Creates a new allocation for an assignee, parent object, and date range. Supply assignee, end_date, parent, and start_date within the allocation data, and use opt_fields to request additional response properties. A 201 response returns the full record of the newly created allocation.

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

1 parameter · 1 body field
opt_fieldsarray<string>optional
A comma-separated list of optional allocation properties to include in the response, including nested properties such as `assignee.name` and `parent.resource_subtype`. Defaults to the default response fields when omitted.

The allocation to create.

dataobjectoptional
The allocation attributes to create, including the assignee, parent object, start date, and end date. The allocation data must include `assignee`, `end_date`, `parent`, and `start_date`.

7 status codes
201Returns the newly created allocation record, including the properties selected by `opt_fields`.
dataobjectoptional
400Returned when a request parameter is missing or malformed.
errorsarray<object>optional
401Returned when the request does not include a valid authentication token.
errorsarray<object>optional
402Returned when the requested object or object mutation exceeds the account's current premium level.
errorsarray<object>optional
403Returned when the request is valid but the authenticated user does not have access to the requested object or property.
errorsarray<object>optional
404Returned when the request method and path do not identify a known action, or the specified object does not exist.
errorsarray<object>optional
500Returned when the API encounters a server-side problem.
errorsarray<object>optional

Error handling

A 400 is returned when a parameter is missing or malformed, a 401 when no valid authentication token is provided, and a 402 when the requested object or mutation exceeds the account's premium level. A 403 is returned when the authenticated user cannot access the requested object or property, a 404 when the path, method, or specified object is not found, and a 500 for a server-side failure. The allocation data must include assignee, end_date, parent, and start_date.