Discrepancy in contact timeline/ possibly incorrect vid being returned from API


We use the API to sync new users from our system into hubspot as contacts. We use the batch update api (contacts/v1/contact/batch) to create the new contacts and then immediately query for the new users by email so we can get the hubspot vid back (contacts/v1/contact/emails/batch/). We use the hubspot vid to uniquely identify our users as hubspot contacts.
On November 11, we created a new user in our system and queried to get the vid back, but instead of a new vid, we got a vid already associated with a contact (with a different email address). This resulted in sending emails to the wrong user.
When looking at this contact’s timeline, I see a weird discrepancy where it says the contact was created on November 11 (which is the date we tried to create the new contact), but then there are email events going all the way back to september with the other email address.
Is there a known bug in the API that could cause this to happen?


@Katherine_Wallace was the contact ever merged with another record? When two records are merged, one email address gets used as the email property for the record, but internally the unused email address still identifies the merged contact record, so when looking up the other email you’ll get the merged contact, and any emails sent to the other email address will also be in the timeline of the merged record.


We never merged the contact as far as I know. The users in question are two different people with two different email addresses and certainly should never have been merged. Is there a way to check if that happened? I have described how we use the API, is there any way they could have been merged unintentionally by something through the api? I have an open support ticket related to this issue (Ticket number: #423683)


We have figured out where the problem was. Thank you for your help