# Create task 400 response code but no error data

**URL:** <https://forum.asana.com/t/create-task-400-response-code-but-no-error-data/88433>\
**Category:** API & Developers\
**Created:** [9 July 2020 17:05 UTC](https://forum.asana.com/t/create-task-400-response-code-but-no-error-data/88433 "2020-07-09T17:05:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon61788213](https://luna1.co/8d76cd.png) [@anon61788213](https://forum.asana.com/u/anon61788213)\
**Post date:** [9 July 2020 17:05 UTC](https://forum.asana.com/t/create-task-400-response-code-but-no-error-data/88433/1 "2020-07-09T17:05:51Z")

</div>

Hi, so I’ve been having an issue attempting to create a task via the Asana API. I’m using PHP/cURL and most of the time the ability works but I’ve recently been experiencing 400 return codes via the following URL that I post to:-

[https://app.asana.com/api/1.0/tasks](https://app.asana.com/api/1.0/tasks)?

Like I say I get a 400 response but no ‘error’ data with it as expected, to help narrow down the exact problem. My PHP debugging just says the response is ‘false’. The following is a snippet of what I’m debugging to see the 400 and response:-

$this-\>response = curl\_exec($curl); = ‘false’  
$this-\>responseCode = curl\_getinfo($curl, CURLINFO\_HTTP\_CODE); = 400

Is there anything else I need to POST to the API to get a more coherent data response upon error?

Many thanks

---

<div class="post-metadata">

**Author:** ![anon61788213](https://luna1.co/8d76cd.png) [@anon61788213](https://forum.asana.com/u/anon61788213)\
**Post date:** [10 July 2020 11:13 UTC](https://forum.asana.com/t/create-task-400-response-code-but-no-error-data/88433/2 "2020-07-10T11:13:05Z")

</div>

Upon further investigation the create task returns NULL and fails to create the task. Before I attempt to create the task I create a project, which works successfully.

For reference here is the JSON I’m attempting to post to create the task:-

{  
“data”:{  
“workspace”:“360142226816574”,  
“assignee”:“727823641356243”,  
“projects”:[“1184059315729550”],  
“custom\_fields”:{  
“707926551301031”:“707926551301032”,  
“827799850883241”:“859088912919009”  
},  
“name”:“Fixed Dev Task Name”,  
“start\_on”:“2020-07-16”,  
“due\_at”:“2020-07-16T10:30:00Z”  
}  
}

Many thanks

---

<div class="post-metadata">

**Author:** ![anon61788213](https://luna1.co/8d76cd.png) [@anon61788213](https://forum.asana.com/u/anon61788213)\
**Post date:** [13 July 2020 11:23 UTC](https://forum.asana.com/t/create-task-400-response-code-but-no-error-data/88433/3 "2020-07-13T11:23:51Z")

</div>

So I managed to figure this out - seems as though you can’t have the ‘start\_on’ and ‘due\_at’ / ‘due\_on’ fields having the same date information.

Hope this helps someone

---

<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:** [13 July 2020 18:48 UTC](https://forum.asana.com/t/create-task-400-response-code-but-no-error-data/88433/4 "2020-07-13T18:48:13Z")

</div>

> [@anon61788213](#):
>
> you can’t have the ‘start\_on’ and ‘due\_at’ / ‘due\_on’ fields having the same date information.

@Ross_Grambo maybe this could be added to the API docs? 🙂

---

<div class="post-metadata">

**Author:** ![Ross\_Grambo](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/ross_grambo/32/68568_2.png) [@Ross\_Grambo](https://forum.asana.com/u/Ross_Grambo)\
**Post date:** [14 July 2020 18:44 UTC](https://forum.asana.com/t/create-task-400-response-code-but-no-error-data/88433/5 "2020-07-14T18:44:28Z")

</div>

Creating a task now 🙂

---

<div class="post-metadata">

**Author:** ![Joe\_Boloten](https://luna1.co/8d76cd.png) [@Joe\_Boloten](https://forum.asana.com/u/Joe_Boloten)\
**Post date:** [26 May 2023 14:30 UTC](https://forum.asana.com/t/create-task-400-response-code-but-no-error-data/88433/6 "2023-05-26T14:30:36Z")

</div>

just helped me!

---

<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 18:55 UTC](https://forum.asana.com/t/create-task-400-response-code-but-no-error-data/88433/7 "2025-05-30T18:55:17Z")

</div>


