Sample - Asana API
POST/ooo_entries

Create an OOO entry

Creates a new out-of-office entry for a user in a workspace. Supply user, workspace, start_date, and end_date in the data object, and use opt_fields to request additional properties in the response. A 201 response returns the complete newly created OOO entry.

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

1 parameter · 1 body field
opt_fieldsarray<string>optional
A comma-separated list of optional response properties to include, such as `created_by`, `created_by.name`, `end_date`, `start_date`, `user`, or `user.name`. Omit this parameter to use the endpoint's default response fields.

The OOO entry to create for a user and workspace.

dataobjectoptional
The OOO entry data. Include `user`, `workspace`, `start_date`, and `end_date`.

6 status codes
201Returns the complete newly created OOO entry, including the requested optional fields.
dataobjectoptional
400Returned when the request is missing or contains a malformed parameter or body value.
errorsarray<object>optional
401Returned when a valid authentication token is not provided.
errorsarray<object>optional
403Returned when the authenticated user does not have permission to create the OOO entry.
errorsarray<object>optional
404Returned when the request method or path is unknown, or a referenced object does not exist.
errorsarray<object>optional
500Returned when a server-side problem prevents the OOO entry from being created.
errorsarray<object>optional

Error handling

A 400 is returned when the request is missing or contains malformed information, including any of user, workspace, start_date, or end_date. A 401 is returned when you do not provide a valid authentication token, and a 403 is returned when the authenticated user lacks permission to create the entry. A 404 is returned when the request method, path, or referenced object is not found; a 500 is returned for a server-side failure.