Sample - Asana API
POST/time_tracking_categories

Create a time tracking category

Creates a new time tracking category in a workspace. Supply workspace and name in the data object, and use color when you want to set the category color. The response contains the newly created time tracking category.

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

1 parameter · 1 body field
opt_fieldsarray<string>optional
A comma-separated list of properties to include in the response, including nested properties; accepted values include `color`, `is_archived`, and `name`. Omit this parameter to use the default response fields.

Information for the time tracking category to create.

dataobjectoptional
Object containing the time tracking category details.

6 status codes
201Returns the newly created time tracking category record.
dataobjectoptional
400Returned when a parameter or request value is missing or malformed.
errorsarray<object>optional
401Returned when a valid authentication token was not provided with the request.
errorsarray<object>optional
403Returned when the authenticated user does not have access to the requested objects or properties.
errorsarray<object>optional
404Returned when the request method and path do not specify a known action, or the specified object does not exist.
errorsarray<object>optional
500Returned when a server-side problem occurs; the response may include an error phrase for support diagnosis.
errorsarray<object>optional

Error handling

A 400 is returned when a parameter or request value is missing or malformed. A 401 is returned when a valid authentication token is not provided, and a 403 is returned when the authenticated user cannot access the requested objects or properties. A 404 is returned when the method, path, or specified object is not recognized, while a 500 indicates a server-side problem. The authenticated user must have the time_tracking_categories:write scope, and workspace and name must be supplied in data.