# How to create a task with custom field using AOI

**URL:** <https://forum.asana.com/t/how-to-create-a-task-with-custom-field-using-aoi/38267>\
**Category:** API & Developers\
**Created:** [31 December 2018 21:29 UTC](https://forum.asana.com/t/how-to-create-a-task-with-custom-field-using-aoi/38267 "2018-12-31T21:29:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [31 December 2018 21:29 UTC](https://forum.asana.com/t/how-to-create-a-task-with-custom-field-using-aoi/38267/1 "2018-12-31T21:29:49Z")

</div>

@aurobind.ravichandra FYI I moved your question to the Developers & API public secton so others can participate.

> [@On another topic](https://forum.asana.com/t/38266/1):
>
> I am looking to create a new task with custom field using the API and running into issues.
> 
> I am able to create a task without custom field using this following.  
> /tasks?name=XXXXX&notes=XXXXXXX&projects=0000000
> 
> How can I set a value for the custom field when creating the task.

The best thing to do is if you can post the code you tried which did not work.

Having said that, I need to mention that I tried and was never successful in adding a task with a custom field value via CURL (see [Api & Custom Fields - #12 by Phil\_Seeman](https://forum.asana.com/t/api-custom-fields/1733/12) for specifics).

cc: @Joe_Trollo

---

<div class="post-metadata">

**Author:** ![Matt\_Bramlage](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/matt_bramlage/32/145_2.png) [@Matt\_Bramlage](https://forum.asana.com/u/Matt_Bramlage)\
**Post date:** [3 January 2019 00:38 UTC](https://forum.asana.com/t/how-to-create-a-task-with-custom-field-using-aoi/38267/2 "2019-01-03T00:38:40Z")

</div>

Thanks folks

I added an answer that should work for this case in the topic Phil posted [Api & Custom Fields - #18 by Matt\_Bramlage](https://forum.asana.com/t/api-custom-fields/1733/18) that ought to also cover this question (tl;dr: use square brackets like `custom_fields[1234567890]=Value` as if the ID were a key in an associative array). Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/system/32/276370_2.png) [@system](https://forum.asana.com/u/system)\
**Post date:** [30 May 2025 19:08 UTC](https://forum.asana.com/t/how-to-create-a-task-with-custom-field-using-aoi/38267/3 "2025-05-30T19:08:13Z")

</div>

Closed on 30 May 2025 19:08 UTC


