firstname and lastname being overwritten

For some reason, I have an issue with Contacts where firstname and lastname is being overwritten for a record from a different record via the end point

https://api.hubapi.com/crm/v3/objects/contacts/batch/update

The JSON submitted is:

{“inputs”: [
{ “id”: “130054327897”, “properties”:
{ “firstname”: “Apple”, “lastname”: “Peel”, “email”: “ap@testcustomer.com”, “phone”: “9193810785”, “contact_type”: “Existing Customer”, “authorized_date”: “”, “testing_contact_accounting”: “CC”, “testing_contact_quality”: “” } },
{ “id”: “132853300302”, “properties”:
{ “firstname”: “Jack”, “lastname”: “**bleep**”, “email”: “jc@testcustomer.com”, “phone”: “9193810784”, “contact_type”: “Existing Customer”, “authorized_date”: “”, “testing_contact_accounting”: “Main”, “testing_contact_quality”: “” } },
{ “id”: “132862150705”, “properties”:
{ “firstname”: “Ugle”, “lastname”: “Joe”, “email”: “ugly@testcustomer.com”, “phone”: “9193810786”, “contact_type”: “Existing Customer”, “authorized_date”: “”, “testing_contact_accounting”: “”, “testing_contact_quality”: “Main” } },
{ “id”: “140478635924”, “properties”:
{ “firstname”: “General”, “lastname”: “Douglas”, “email”: “doug@testcustomer.com”, “phone”: “”, “contact_type”: “Existing Customer”, “authorized_date”: “2025-07-01”, “testing_contact_accounting”: “”, “testing_contact_quality”: “” } }
]}

The response looks correct however the firstname and lastname for the email 'doug@testcustomer.com’ is overwritten by 'ap@testcustomer.com’s firstname and lastname. If I then resubmit the same data a second, third etc, then it works correctly. The ‘id’ in each case is the record id which is pulled at the earlier stage so it is correct.

What’s stranger is if I don’t include firstname and lastname in the data submitted, I still see the same issue.

Thoughts?

Hi @GregDixon

"The API endpoint you are using is correct and should be updating the specific contact. I have used it in the past was working fine for me. But as it is not performing as it should be for you so you can contact HubSpot support regarding this. Also, please check the property history value to verify whether it is actually doing it ot not.
You can try the /upsert instead of /update also. "

I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.

Thanks!

Thanks GRajput. Yes I did try /upsert. I also tried /contacts/[contactid] to do then one by one but still even more weirdly, I had the same issue. When i run the data through the /update on Accounts Dashboard | HubSpot it works just fine. So something is going wrong with how I am pushing the change via CURL I guess?

Hey @GregDixon :waving_hand: I rean a quick test using your format but cannot reporduce the issue. Here’s what I did:

  • created 4 new contacts - The Testerr family

  • used your formatting to structure my request body

  • fired up Postman

  • sent this request

    {
     "inputs": [
     {
     "id": "140852720531",
     "properties": {
     "firstname": "Professor",
     "lastname": "Mittens",
     "email": "pmittens@testcustomer.com"
     }
     },
     {
     "id": "140852725657",
     "properties": {
     "firstname": "Captain",
     "lastname": "Patches",
     "email": "cpatches@testcustomer.com"
     }
     },
     {
     "id": "140856337234",
     "properties": {
     "firstname": "Baron",
     "lastname": "Von Floof",
     "email": "bvonfloof@testcustomer.com"
     }
     },
     {
     "id": "140856342047",
     "properties": {
     "firstname": "Chairman",
     "lastname": "Meow",
     "email": "cmeow@testcustomer.com"
     }
     }
     ]
    }​
    
  • received this response

    {
     "status": "COMPLETE",
     "results": [
     {
     "id": "140856342047",
     "properties": {
     "createdate": "2025-07-24T17:25:58.908Z",
     "email": "cmeow@testcustomer.com",
     "firstname": "Chairman",
     "hs_all_accessible_team_ids": "12073943",
     "hs_all_owner_ids": "198670650",
     "hs_all_team_ids": "12073943",
     "hs_count_is_unworked": "1",
     "hs_count_is_worked": "0",
     "hs_created_by_user_id": "10233975",
     "hs_email_domain": "testcustomer.com",
     "hs_full_name_or_email": "Chairman Meow",
     "hs_is_contact": "true",
     "hs_is_unworked": "true",
     "hs_object_id": "140856342047",
     "hs_object_source": "CRM_UI",
     "hs_object_source_id": "userId:10233975",
     "hs_object_source_label": "CRM_UI",
     "hs_object_source_user_id": "10233975",
     "hs_pipeline": "contacts-lifecycle-pipeline",
     "hs_updated_by_user_id": "10233975",
     "hs_user_ids_of_all_owners": "10233975",
     "hubspot_owner_assigneddate": "2025-07-24T17:25:58.908Z",
     "hubspot_owner_id": "198670650",
     "hubspot_team_id": "12073943",
     "lastmodifieddate": "2025-07-24T17:42:55.109Z",
     "lastname": "Meow",
     "lifecyclestage": "lead"
     },
     "createdAt": "2025-07-24T17:25:58.908Z",
     "updatedAt": "2025-07-24T17:42:55.109Z",
     "archived": false
     },
     {
     "id": "140852725657",
     "properties": {
     "createdate": "2025-07-24T17:25:46.849Z",
     "email": "cpatches@testcustomer.com",
     "firstname": "Captain",
     "hs_all_accessible_team_ids": "12073943",
     "hs_all_owner_ids": "198670650",
     "hs_all_team_ids": "12073943",
     "hs_count_is_unworked": "1",
     "hs_count_is_worked": "0",
     "hs_created_by_user_id": "10233975",
     "hs_email_domain": "testcustomer.com",
     "hs_full_name_or_email": "Captain Patches",
     "hs_is_contact": "true",
     "hs_is_unworked": "true",
     "hs_object_id": "140852725657",
     "hs_object_source": "CRM_UI",
     "hs_object_source_id": "userId:10233975",
     "hs_object_source_label": "CRM_UI",
     "hs_object_source_user_id": "10233975",
     "hs_pipeline": "contacts-lifecycle-pipeline",
     "hs_updated_by_user_id": "10233975",
     "hs_user_ids_of_all_owners": "10233975",
     "hubspot_owner_assigneddate": "2025-07-24T17:25:46.849Z",
     "hubspot_owner_id": "198670650",
     "hubspot_team_id": "12073943",
     "lastmodifieddate": "2025-07-24T17:42:55.109Z",
     "lastname": "Patches",
     "lifecyclestage": "lead"
     },
     "createdAt": "2025-07-24T17:25:46.849Z",
     "updatedAt": "2025-07-24T17:42:55.109Z",
     "archived": false
     },
     {
     "id": "140856337234",
     "properties": {
     "createdate": "2025-07-24T17:12:54.583Z",
     "email": "bvonfloof@testcustomer.com",
     "firstname": "Baron",
     "hs_all_accessible_team_ids": "12073943",
     "hs_all_owner_ids": "198670650",
     "hs_all_team_ids": "12073943",
     "hs_count_is_unworked": "1",
     "hs_count_is_worked": "0",
     "hs_created_by_user_id": "10233975",
     "hs_email_domain": "testcustomer.com",
     "hs_full_name_or_email": "Baron Von Floof",
     "hs_is_contact": "true",
     "hs_is_unworked": "true",
     "hs_object_id": "140856337234",
     "hs_object_source": "CRM_UI",
     "hs_object_source_id": "userId:10233975",
     "hs_object_source_label": "CRM_UI",
     "hs_object_source_user_id": "10233975",
     "hs_pipeline": "contacts-lifecycle-pipeline",
     "hs_updated_by_user_id": "10233975",
     "hs_user_ids_of_all_owners": "10233975",
     "hubspot_owner_assigneddate": "2025-07-24T17:12:54.583Z",
     "hubspot_owner_id": "198670650",
     "hubspot_team_id": "12073943",
     "lastmodifieddate": "2025-07-24T17:42:55.109Z",
     "lastname": "Von Floof",
     "lifecyclestage": "lead"
     },
     "createdAt": "2025-07-24T17:12:54.583Z",
     "updatedAt": "2025-07-24T17:42:55.109Z",
     "archived": false
     },
     {
     "id": "140852720531",
     "properties": {
     "createdate": "2025-07-24T17:13:08.208Z",
     "email": "pmittens@testcustomer.com",
     "firstname": "Professor",
     "hs_all_accessible_team_ids": "12073943",
     "hs_all_owner_ids": "198670650",
     "hs_all_team_ids": "12073943",
     "hs_count_is_unworked": "1",
     "hs_count_is_worked": "0",
     "hs_created_by_user_id": "10233975",
     "hs_email_domain": "testcustomer.com",
     "hs_full_name_or_email": "Professor Mittens",
     "hs_is_contact": "true",
     "hs_is_unworked": "true",
     "hs_object_id": "140852720531",
     "hs_object_source": "CRM_UI",
     "hs_object_source_id": "userId:10233975",
     "hs_object_source_label": "CRM_UI",
     "hs_object_source_user_id": "10233975",
     "hs_pipeline": "contacts-lifecycle-pipeline",
     "hs_updated_by_user_id": "10233975",
     "hs_user_ids_of_all_owners": "10233975",
     "hubspot_owner_assigneddate": "2025-07-24T17:13:08.208Z",
     "hubspot_owner_id": "198670650",
     "hubspot_team_id": "12073943",
     "lastmodifieddate": "2025-07-24T17:42:55.109Z",
     "lastname": "Mittens",
     "lifecyclestage": "lead"
     },
     "createdAt": "2025-07-24T17:13:08.208Z",
     "updatedAt": "2025-07-24T17:42:55.109Z",
     "archived": false
     }
     ],
     "startedAt": "2025-07-24T17:42:55.028Z",
     "completedAt": "2025-07-24T17:42:55.326Z"
    }​
    
  • no unexpected copying

Please try running the update one more time using Postman. This will help rule out any issues with your cURL script.

  • In Postman, send a POST request to https://api.hubapi.com/crm/v3/objects/contacts/batch/update with the exact JSON from your original post.
  • If a contact’s name is still overwritten, please immediately check the Property History for that contact’s First Name in the HubSpot UI.
  • Could you then share the response you get from Postman and a screenshot of that property history? Knowing what appears in the “Changed by” column is the key to solving this.

Thanks! — Jaycee

Thanks Jaycee. You passed IDs so I assumed you created these in HubSpot then copied these IDs into JSON to post correct?
Also, I am using a website to do this work with PHP that is creating the CURL then executing it. I wouldn’t be surprised if I’m missing some CURL parameters that may be causing this issue. Or a better way might be to use the PHP library that the HubSpot API documentation refers to? I can install it on my local and work it but how would that be called from the remotely hosted website?

Hey, @GregDixon :waving_hand: That is correct. Can you share a really_simple_example™ of your PHP here using the code block tool in the editor? I feel like we have PHP-giga brains that lurk around. We just need to summon them first. — Jaycee

Empty

Hey, @GregDixon :waving_hand: It looks like something didn’t post correctly :sad_but_relieved_face: — Jaycee