# PHP SDK: Input could not be converted to a valid request

**URL:** <https://integration.keap.com/t/php-sdk-input-could-not-be-converted-to-a-valid-request/51244>\
**Category:** API Q&A\
**Created:** [August 31, 2018, 11:55pm UTC](https://integration.keap.com/t/php-sdk-input-could-not-be-converted-to-a-valid-request/51244 "2018-08-31T23:55:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![and\_dev](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/and_dev/32/4965_2.png) [@and\_dev](https://integration.keap.com/u/and_dev)\
**Post date:** [August 31, 2018, 11:55pm UTC](https://integration.keap.com/t/php-sdk-input-could-not-be-converted-to-a-valid-request/51244/1 "2018-08-31T23:55:58Z")

</div>

there are no real docs, but I used the schema from [https://developer.infusionsoft.com/docs/rest/#!/Appointment/createAppointmentUsingPOST](https://developer.infusionsoft.com/docs/rest/#!/Appointment/createAppointmentUsingPOST)

and I get:

> In RequestException.php line 113:
> 
> Client error: `POST https://api.infusionsoft.com/crm/rest/v1/tasks/?access_token=1234567890` resulted in a `400 Bad Request` response:  
> {“message”:“Input could not be converted to a valid request”}

your example:

```auto
{
  "contact_id": 0,
  "description": "string",
  "end_date": "string",
  "location": "string",
  "remind_time": 0,
  "start_date": "string",
  "title": "string",
  "user": 0
}

```

my data:

```
array:8 [
  "contact_id" => 92
  "description" => "text"
  "end_date" => DateTime @1530835200 {#1039
    date: 2018-07-06 00:00:00.0 UTC (+00:00)
  }
  "location" => ""
  "remind_time" => 0
  "start_date" => DateTime @1530748800 {#1040
    date: 2018-07-05 00:00:00.0 UTC (+00:00)
  }
  "title" => "multiday"
  "user" => 29
]

```

and yet, Input could not be converted to a valid request. What is wrong with the input? and what is wrong with returning a proper error messages for debug purposes?

enabling debug doesn’t help, logs show only headers and the same useless message

contact and user with those ids exist in my account

I have same error with Tasks. Only Notes are working fine (create only)
