# PHP API - Custom Fields value not submitting

**URL:** <https://forum.asana.com/t/php-api-custom-fields-value-not-submitting/130164>\
**Category:** API & Developers\
**Created:** [28 July 2021 12:27 UTC](https://forum.asana.com/t/php-api-custom-fields-value-not-submitting/130164 "2021-07-28T12:27:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bipin\_Panchani](https://luna1.co/8d76cd.png) [@Bipin\_Panchani](https://forum.asana.com/u/Bipin_Panchani)\
**Post date:** [28 July 2021 12:27 UTC](https://forum.asana.com/t/php-api-custom-fields-value-not-submitting/130164/1 "2021-07-28T12:27:01Z")

</div>

I am using asana php api and all working fine. But now i want to submit custom field value. I have created custom field in particular asana project. But when I am trying to submit through API, it is not submitting. I am not sure what should pass as parameter in php API. Below is custom field ids:

// documentos - 227624521239196  
// Amortização - 320114643060735

And below is my api code:

$custField = array(“documentos” =\> “Amortização”);

$result = $asana-\>createTask(array(  
‘workspace’ =\> ‘xxxxxxxxxx’,  
‘custom\_fields’ =\> $custField,   
‘name’ =\> ‘xxxxxx’,  
‘notes’ =\> ‘xxxxx’,  
‘tags’ =\> ‘xxxxxx’,  
‘due\_on’ =\> ‘xxxxxx’,  
‘assignee’ =\> ‘xxxxxxx’,  
‘followers’ =\> ‘xxxxxx’  
));

---

<div class="post-metadata">

**Author:** ![Bastien\_Siebman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/bastien_siebman/32/172354_2.png) [@Bastien\_Siebman](https://forum.asana.com/u/Bastien_Siebman)\
**Post date:** [29 July 2021 08:41 UTC](https://forum.asana.com/t/php-api-custom-fields-value-not-submitting/130164/2 "2021-07-29T08:41:18Z")

</div>

Hi,

The structure of your `custom_fields` is wrong, you need to pass couples of id-value.

---

<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:05 UTC](https://forum.asana.com/t/php-api-custom-fields-value-not-submitting/130164/3 "2025-05-30T19:05:22Z")

</div>

Closed on 30 May 2025 19:05 UTC


