APIs & Integrations

Richter
Member

Cannot create timeline event via Hubspot API

SOLVE

I cannot create a timeline event with developer api via oAUTH

get error 422 with message "eventTypeId must be greater than or equal to 1 (was 0)"
It appears the format must need to be different as compared to generating other things like Contacts.
In my developer portal, my body is below which you can see is setting eventTypeId. Must be something simple that I just have wrong in my call. Also, response copy below from dev portal.

{"properties":[{"property":"id","value":"11111"},{"property":"eventTypeId","value":"25605"},{"property":"DESCRIPTION","value":"Attended Webinar: 20170919-WBN-AdWeek-Add-Transparency"},{"property":"email","value":"bb@plainsmobile.com"}]}

{"status":"error","message":"unprocessable entity","correlationId":"34983d9e-2be3-4b3c-85a0-587f7f5e09e3","errors":["eventTypeId must be greater than or equal to 1 (was 0)","id may not be null (was null)"],"requestId":"5d6a1079476d970af765a72fbf66e925"}

0 Upvotes
1 Accepted solution
Richter
Solution
Member

Cannot create timeline event via Hubspot API

SOLVE

also would like to not on this issue that the timeline excepts the data sent to be in a different format than the property format. api is looking for something raw like this;
{
"id": params.id,
"eventTypeId": params.eventTypeId,
"DESCRIPTION": params.DESCRIPTION,
"email": params.email,
"timestamp": params.timestamp,
"DATE": params.DATE
}

View solution in original post

0 Upvotes
4 Replies 4
Richter
Member

Cannot create timeline event via Hubspot API

SOLVE

I resolved, I just had to click on check box in portal to show migration events. thanks for help

Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Cannot create timeline event via Hubspot API

SOLVE

Hi @Richter,

Have you checked the timeline filters on that particular object record? If that's not the issue, can you give me a link to the object record in HubSpot and also a link to your dev portal?

0 Upvotes
Richter
Solution
Member

Cannot create timeline event via Hubspot API

SOLVE

also would like to not on this issue that the timeline excepts the data sent to be in a different format than the property format. api is looking for something raw like this;
{
"id": params.id,
"eventTypeId": params.eventTypeId,
"DESCRIPTION": params.DESCRIPTION,
"email": params.email,
"timestamp": params.timestamp,
"DATE": params.DATE
}

0 Upvotes
Richter
Member

Cannot create timeline event via Hubspot API

SOLVE

I was able to create event now I just cannot see it in the company portal. Anybody know how to get the timeline events to show up?

0 Upvotes