API Post to Create Contact is not adding any properties

Hi,

I am playing with the API in my Dev Account and trying to add a contact using C# and Postman via the contacts api. The contact seems to be added in Hubspot but none of the data is transferred.

The request is going here https://api.hubapi.com/crm/v3/objects/contacts?hapikey=xxxxxx-xxxx-xxxx-xxxx-xxxxxx96caf

The test data is this

{“company”:“MU Ltd",“email”:"mark@mulitd.com”,“firstname”:“Mark”,“lastname”:“Ufland”,“phone”:“077676676767”,“website”:“mulitd.com”}

The response is this:

{

"id": "351",

"properties": {

    "createdate": "2021-06-24T09:18:29.818Z",

    "hs\_is\_unworked": "true",

    "hs\_marketable\_status": "false",

    "hs\_marketable\_until\_renewal": "false",

    "hs\_object\_id": "351",

    "lastmodifieddate": "2021-06-24T09:18:29.818Z"

},

"createdAt": "2021-06-24T09:18:29.818Z",

"updatedAt": "2021-06-24T09:18:29.818Z",

"archived": false

}

Do you have any ideas?

Thanks,

Mark

Thank you for your post @MUfland .

@dannio and @JBeatty , would you mind sharing your advice for @MUfland ?

Hi @MUfland,

I believe the issue here is the data of your request. From the API docs the example data they give is:

{
 "properties": {
 "company": "Biglytics",
 "email": "bcooper@biglytics.net",
 "firstname": "Bryan",
 "lastname": "Cooper",
 "phone": "(877) 929-0687",
 "website": "biglytics.net"
 }
}

So I would try to reformat your request data like this:

{"properties":{"company":"MU Ltd","email":"mark@mulitd.com","firstname":"Mark","lastname":"Ufland","phone":"077676676767","website":"mulitd.com"}}

Thank you Josh for your advice!

@MUfland Please check out ↑

Hi Josh,

Thanks for that, it did the trick. I must be getting old as I didn’t spot that when reading the docs. Sometimes you need another pair of eyes.

Regards,

Mark