How do I specify custom_field_settings when creating a project?

I’d really like to set custom fields for projects i’m creating via API, rather than having to sequence calls to the ‘add custom field to project’ API call separately.

The docs for creating a project list setting "custom_fields", rather than "custom_field_settings" when creating a project.

I wasn’t aware that projects could have custom field values associated with them?!

The sample response does include "custom_field_settings" though, so I’m rather confused now.

Is this a documentation error? Am I missing something fundamental, here?

I’m going to try passing "custom_field_settings" in the hope that it’s merely the case that the docs are incorrect…

Boo: "custom_field_settings: Cannot write this property".

Ok, I’m confused. Why not? Why make us do extra API calls for this? :slight_smile:

Hi @Robert-Stuttaford,

First, the docs are not wrong. In Business and Enterprise subscriptions where Portfolios exist, you can have custom fields at the Project level which are surfaced as custom field settings in Portfolios. So that’s what the custom_fields property in a Project is for.

Second, I know of no way to add custom field settings when creating a project. AFAIK you’ll have to do those separate subsequent calls that you were trying to avoid.

Thanks, @Phil_Seeman :slight_smile: Totally going to take advantage of the custom-fields-in-portfolio thing!

1 Like

I’m wondering the same thing but am not as familiar with Asana’s API - What are the options to create a project with custom fields (priority) using the API?

ex: do I have to create the project then update it with custom fields?
/ what is the method using Portfolios?

Yes. First create the project, then add custom field settings to it using this endpoint:
https://developers.asana.com/docs/add-a-custom-field-to-a-project

I haven’t worked with Portfolios but I’m almost positive it’s the same concept.