Sample - Asana API
POST/projects/{project_gid}/addCustomFieldSetting

Add a custom field to a project

Creates a custom field setting that associates a custom field with a project. Supply custom_field and optionally mark the field as important or position it relative to another setting. Use either insert_before or insert_after when controlling the setting's position, not both.

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

1 parameter · 1 body field
opt_fieldsarray<string>optional
Comma-separated response properties to include, including nested custom field properties such as `custom_field.created_by.name`; omit this parameter to use the default response fields.

Information for associating a custom field with the project.

dataobjectoptional

6 status codes
200Returns the created custom field setting for the project.
dataobjectoptional
400Returned when `custom_field` is missing or malformed, or when both `insert_before` and `insert_after` are supplied.
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 modify the project or access the requested objects.
errorsarray<object>optional
404Returned when the requested action, project, custom field, or referenced setting does not exist.
errorsarray<object>optional
500Returned when a server-side problem prevents the custom field setting from being created.
errorsarray<object>optional

Error handling

A 400 is returned when custom_field is missing, a value is malformed, or both insert_before and insert_after are supplied. A 401 is returned when no valid authentication token is provided, and a 403 is returned when the authenticated user lacks permission to modify the project or the required projects:write scope. A 404 indicates that the project, custom field, or referenced setting does not exist, while a 500 indicates a server-side failure.