APIs & Integrations

Nusnus
Contributor

Is it possible to create a timeline event for a contact or only a company?

SOLVE

When I try to use the API with a company id, it works just fine, when I try it with a contact id, it fails saying it can't find it:

ERROR: {"eventErrorEntityType":"OBJECT_NOT_FOUND","status":"error","message":"Object not found companyId : 50401","correlationId":"245941c7-7ff2-482e-8832-b0de9cc155c6","identifierName":"companyId","identifierValue":"50401","eventErrorEntityType":"OBJECT_NOT_FOUND","requestId":"e856f7e745c20db60135230ae0d87990"}

API: https://developers.hubspot.com/docs/methods/timeline/create-or-update-event

 

And I set the objectId field to the VID of the contact of course.

0 Upvotes
1 Accepted solution
JasminLin
Solution
HubSpot Employee
HubSpot Employee

Is it possible to create a timeline event for a contact or only a company?

SOLVE

Hi @Nusnus , from the error message you provided, it is not able to find a companyId of 50401. From your description, you are saying that the error only comes up when you use a contact vid (so I'm assuming 50401 is a contact vid) , so I'm wondering if you are creating an event on a contact when the event type is configured to be objectType Company instead of Contact. Can you check your timeline event type to see if the event you are trying to create has an objectType of Contact or Company? https://developers.hubspot.com/docs/methods/timeline/get-event-types

 

 

View solution in original post

2 Replies 2
JasminLin
Solution
HubSpot Employee
HubSpot Employee

Is it possible to create a timeline event for a contact or only a company?

SOLVE

Hi @Nusnus , from the error message you provided, it is not able to find a companyId of 50401. From your description, you are saying that the error only comes up when you use a contact vid (so I'm assuming 50401 is a contact vid) , so I'm wondering if you are creating an event on a contact when the event type is configured to be objectType Company instead of Contact. Can you check your timeline event type to see if the event you are trying to create has an objectType of Contact or Company? https://developers.hubspot.com/docs/methods/timeline/get-event-types

 

 

Nusnus
Contributor

Is it possible to create a timeline event for a contact or only a company?

SOLVE

Yes you were right!

Thank you - problem solved !

0 Upvotes