500 Internal Server Error for create contact API

I have made a POST request using ASP.Net and I get 500 internal Server error, the response is like this:

{StatusCode: 500, ReasonPhrase: 'Internal Server Error', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
  Cache-Control: no-store, no-cache
  Date: Sun, 19 Nov 2017 12:50:19 GMT
  Pragma: no-cache
  Server: Apache-Coyote
  Set-Cookie: JSESSIONID=518609309FC9598531D2FF24DC0A8FDB; Path=/; Secure; HttpOnly
  Set-Cookie: app-lb=!Dj1mhXwC7a0PN5kvitCrYAxHQKcFLmUzCAdKhgkRdG0E3ucNJMDgGlzi4fe9rJrLeiS3qXdAMBIUCEBpaMjm62S2uXMj5cZZlhMqDG3hOumvIE6viZspxxqHl3+At39S0OdidE6NZjlJ4osCI0+2O1Loss0r5fk=; path=/; Httponly; Secure
  Strict-Transport-Security: max-age=31536000; includeSubDomains
  Vary: Accept-Encoding
  X-Cnection: close
  X-FRAME-OPTIONS: SAMEORIGIN
  X-Mashery-Message-ID: 1d24b080-453e-4b0d-8813-633a552c61da
  X-Mashery-Responder: prod-j-worker-us-west-1b-60.mashery.com
  X-Plan-QPS-Allotted: 25
  X-Plan-QPS-Current: 1
  X-Plan-Quota-Allotted: 125000
  X-Plan-Quota-Current: 64
  X-Plan-Quota-Reset: Monday, November 20, 2017 12:00:00 AM GMT
  X-Robots-Tag: noindex, nofollow
  transfer-encoding: chunked
  Connection: keep-alive
  Content-Language: en-US
  Content-Type: application/json; charset=UTF-8
  Expires: Sun, 19 Nov 2017 12:50:19 GMT
}}

my request is like this after JSON convert:

{“addresses”:null,“birthday”:“0001-01-01T00:00:00”,“company”:{“company_name”:“vgt1”,“id”:0},“contact_type”:null,“custom_fields”:null,“date_created”:“0001-01-01T00:00:00”,“email_addresses”:[{“email”:“kamleshyadav989@gmail.com”,“field”:null}],“family_name”:“Yadav”,“fax_numbers”:null,“given_name”:“Kamlesh”,“job_title”:“adf1”,“last_updated”:“0001-01-01T00:00:00”,“lead_source_id”:0,“middle_name”:null,“notes”:null,“opt_in_reason”:null,“owner_id”:0,“phone_numbers”:[{“extension”:null,“field”:null,“number”:“08013271643”,“type”:null}],“preferred_locale”:null,“preferred_name”:null,“prefix”:null,“relationships”:null,“source_type”:null,“suffix”:null,“tag_ids”:null,“time_zone”:null,“website”:null,“id”:0}

Please let me know what is the wrong here. If you need more Info let me know.

It’s the quotes you’re using. Change both “ and ” to "

{
	"addresses": null,
	"birthday": "0001-01-01T00:00:00",
	"company": {
		"company_name": "vgt1",
		"id": 0
	},
	"contact_type": null,
	"custom_fields": null,
	"date_created": "0001-01-01T00:00:00",
	"email_addresses": [{
		"email": "kamleshyadav989@gmail.com",
		"field": null
	}],
	"family_name": "Yadav",
	"fax_numbers": null,
	"given_name": "Kamlesh",
	"job_title": "adf1",
	"last_updated": "0001-01-01T00:00:00",
	"lead_source_id": 0,
	"middle_name": null,
	"notes": null,
	"opt_in_reason": null,
	"owner_id": 0,
	"phone_numbers": [{
		"extension": null,
		"field": null,
		"number": "08013271643",
		"type": null
	}],
	"preferred_locale": null,
	"preferred_name": null,
	"prefix": null,
	"relationships": null,
	"source_type": null,
	"suffix": null,
	"tag_ids": null,
	"time_zone": null,
	"website": null,
	"id": 0
}

I tried this , but issue persists, I didn’t understand why pasting here changed quotes that time, now its ok but this json you see is created by JsonConvert C# class. using postman gives same error

Quotes only changes here but inside request its ok23 AM

So the following works. Do NOT use null. Use empty strings or empty arrays but never null:

{
“addresses”: [
],
“birthday”: “2017-11-20T02:43:46.425Z”,
“company”: {
“company_name”: “vgt1”,
“id”: 0
},
“date_created”: “0001-01-01T00:00:00”,
“email_addresses”: [
{
“email”: "kamleshyadav989@gmail.com",
“field”: “EMAIL1”
}
],
“family_name”: “string”,
“fax_numbers”: [],
“given_name”: “Yadav”,
“job_title”: “string”,
“last_updated”: “2017-11-20T02:43:46.425Z”,
“lead_source_id”: 0,
“middle_name”: “string”,
“notes”: “string”,
“opt_in_reason”: “string”,
“owner_id”: 0,
“phone_numbers”: [
{
“extension”: “string”,
“field”: “PHONE1”,
“number”: “08013271643”,
“type”: “”
}
],
“preferred_locale”: “en_US”,
“preferred_name”: “string”,
“prefix”: “”,
“source_type”: “WEBFORM”,
“suffix”: “”,
“tag_ids”: [],
“time_zone”: “”,
“website”: “”
}

This worked. Thanks