Sample - Asana API
POST/custom_fields

Create a custom field

Creates a new custom field in a workspace. Supply a unique field name and a resource_subtype in the data property, using one of the supported custom field types: text, enum, multi_enum, number, date, or people. The workspace is fixed when the custom field is created and cannot be changed later.

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

1 parameter · 1 body field
opt_fieldsarray<string>optional
A comma-separated list of optional properties to include in the response, including nested properties such as `created_by.name` or `date_value.date`.

The custom field object to create in a workspace.

dataobjectoptional
The custom field definition, including its unique name and required resource subtype.

6 status codes
201Returns the newly created custom field object.
dataobjectoptional
400Returned when a parameter is missing or malformed, including an invalid custom field definition.
errorsarray<object>optional
401Returned when the request does not include a valid authentication token.
errorsarray<object>optional
403Returned when the authenticated user is not permitted to create custom fields in the workspace.
errorsarray<object>optional
404Returned when the request does not identify a known action or the specified object does not exist.
errorsarray<object>optional
500Returned when the API encounters a server problem; the response may include an error phrase for support diagnostics.
errorsarray<object>optional

Error handling

A 400 is returned when a parameter is missing or malformed. A 401 is returned when no valid authentication token is provided, and a 403 is returned when the authenticated user cannot perform the operation. A 404 or 500 is returned when the action or related object is not found or the API encounters a server problem; resource_subtype must be provided and the field name must be unique within the workspace.