Contact POST isn't working

contacts

#1

Hello

I am trying to post contacts back to HubPpot after modifying some properties. Here is what the json I am trying to post looks like:

[
  {
    "vid": "1234",
    "properties": [
      {
        "property": "country",
        "value": "united states"
      },
      {
        "property": "firstname",
        "value": "Joe"
      },
      {
        "property": "jobtitle",
        "value": "worker"
      },
      {
        "property": "primary_role",
        "value": "worker"
      },
      {
        "property": "company",
        "value": "workers llc"
      },
      {
        "property": "state",
        "value": "CO"
      },
      {
        "property": "email",
        "value": "test@gmail.com"
      },
      {
        "property": "lastname",
        "value": "Shmoe"
      }
    ]
  },
  {
    "vid": "12345",
    "properties": [
      {
        "property": "country",
        "value": "united states"
      },
      {
        "property": "firstname",
        "value": "Cool"
      },
      {
        "property": "jobtitle",
        "value": "TBD"
      },
      {
        "property": "primary_role",
        "value": "Advocate"
      },
      {
        "property": "company",
        "value": "Hubspot, Inc."
      },
      {
        "property": "state",
        "value": "CA"
      },
      {
       "property": "email",
        "value": "coolrobot@hubspot.com"
      },
      {
        "property": "lastname",
        "value": "Robot (Sample contact)"
      }
    ]
  },
  {
    "vid": "12346",
    "properties": [
      {
        "property": "country",
        "value": "US of A"
      },
      {
        "property": "firstname",
        "value": "Joe2"
      },
      {
        "property": "jobtitle",
        "value": "worker"
      },
      {
        "property": "primary_role",
        "value": "worker"
      },
      {
        "property": "company",
        "value": "workers llc"
      },
      {
        "property": "state",
        "value": "NY"
      },
      {
        "property": "email",
        "value": "worker@workers.com"
      },
      {
        "property": "lastname",
        "value": "Schmoe2"
      }
    ]
  }
]

When I try to post it I get a 200 OK status and nothing in the contact changes. Any ideas as to why this is?
I am following the directions of https://developers.hubspot.com/docs/methods/contacts/batch_create_or_update

Thank you


#2

Hi @gkochmann,

That appears to be valid to me. Are you sure that the specified vids exist in your portal? If you specify a vid that doesn’t exist, that update will be dropped. If you’re looking to create/update contacts by email, you should replace the vid field with email.