Updating the value of tags

Hi!

I’m using the API to create tasks and it’s all working brilliantly!

The tasks I’m creating have a set of tags that I want to populate with values. I don’t see any option to so neither through creating tasks nor through updating tasks. All I see is an option to add tags by specifying an array of tags gid.

image

The image above shows the tags. The only option at the moment is to update them manually. Any way to do it using API?

Thanks,
Nivi

Hi @Nivi_Mor and welcome to the forum!

Based on your screenshot, I’m fairly certain what you’re referring to are not tags but custom fields. For more info on those, see:

https://developers.asana.com/docs/#asana-custom-fields

1 Like

I figured it out. Found the answer here. First, we need to get the gids of custom_fields for a task. Then, when creating a task, specify an object for custom fields in the payload:
{
“data”: {
“name”: "Name of task,


"custom_fields: {
“12345”: “value”
“67890”: “98765”
},
“workspace”: “123”
}

Thanks for your help.