Date Format in API call

I am trying to create a customer record via API with custom date field which is a date picker field type. When creating the customer I am getting an error.

{
 "validationResults": [
 {
 "isValid": false,
 "message": "2020-11-05 was not a valid long.",
 "error": "INVALID_LONG",
 "name": "coverage_start_date"
 }
 ],
 "status": "error",
 "message": "Property values were not valid",
 "correlationId": "4fe672e7-67f3-4a3d-b0ff-24a64d19c2df"
}

Here is my request using “value”: “2020-11-05” does HubSpot not supporting using this format?

{

 "properties": [
 {
 "property": "email",
 "value": "xxxxx@gmail.com"
 },
 {
 "property": "coverage_start_date",
 "value": "2020-11-05"
 },
 {
 "property": "firstname",
 "value": "James"
 },
 {
 "property": "lastname",
 "value": "Smith"
 },
 {
 "property": "website",
 "value": "http://google.com"
 },
 {
 "property": "company",
 "value": "Google"
 },
 {
 "property": "phone",
 "value": "555-122-2323"
 },
 {
 "property": "address",
 "value": "25 First Street"
 },
 {
 "property": "city",
 "value": "Cambridge"
 },
 {
 "property": "state",
 "value": "Surrey"
 },
 {
 "property": "zip",
 "value": "GU91YF"
 }
 ]
}

Hey, @Haigy :waving_hand: Thanks for including those details.

One question — which specific endpoint are you using to create new contacts(minus your HAPI key)? Was it the v3 or v1 endpoint?
I ask because using the v3 endpoint, I made a successful test using the exact formatting you provided — 2020-11-05

  • Created a date-picker property

  • Endpoint usedPOST/crm/v3/objects/contacts​

  • Request

    curl --request POST \
     --url 'https://api.hubapi.com/crm/v3/objects/contacts?hapikey=NOPE' \
     --header 'content-type: application/json' \
     --data '{
     "properties": {
     "email": "jayceelewis333@NOPE.com",
     "firstname": "NotNot",
     "lastname": "Jaycee",
     "api_test": "2020-11-05"
     }
    }'​
    
  • Response

    HTTP 201
    {
     "id": "29601",
     "properties": {
     "api_test": "2020-11-05",
     "createdate": "2022-06-23T16:07:40.211Z",
     "email": "jayceelewis333@NOPE.com",
     "firstname": "NotNot",
     "hs_all_contact_vids": "29601",
     "hs_email_domain": "NOPE.com",
     "hs_is_contact": "true",
     "hs_is_unworked": "true",
     "hs_marketable_status": "false",
     "hs_marketable_until_renewal": "false",
     "hs_object_id": "29601",
     "hs_pipeline": "contacts-lifecycle-pipeline",
     "lastmodifieddate": "2022-06-23T16:07:40.211Z",
     "lastname": "Jaycee"
     },
     "createdAt": "2022-06-23T16:07:40.211Z",
     "updatedAt": "2022-06-23T16:07:40.211Z",
     "archived": false
    }​
    

Thank you! — Jaycee

I was using V1. Using V3 it does get it to work.
Many thanks for the fast response.