500 Returned on Creating Timeline Event Type

Hi there!

I have been trying to create event types for the timeline, however, I’ve been getting a 500 response every time I make a request!
Here is the request I am making:
POST URL: https://api.hubapi.com/integrations/v1/6256213/timeline/event-types?hapikey={hapikey}&application-id=6256213&userId=Brock%20Jenken

({hapikey} is a placeholder here for the real key)

Header: {“Content-Type”: “application/json”}

Body: {

“name”: “session”,
    “applicationId”: “6256213”,
    “objectType”: “CONTACT”,
    “headerTemplate”: "Attended ",
    “detailTemplate”: “Session occurred at”
}

From that request I get this response:
Status Code: 500

Body: {
“status”: “error”,
“message”: “internal error”,
“correlationId”: “f2fe8bee-52d2-4802-a0ab-1f2a90d13065”,
“requestId”: “e417a4ba2f2470799ad8973cdf166993”
}

Any help would be greatly appreciated, and I thank you in advance!

Hi @BrockJenken,

When looking to create the timeline event type using this endpoint documented here:

The POST url should include the userId as well. As an example of the POST request url that I sent through:

https://api.hubspot.com/integrations/v1/197994/timeline/event-types?hapikey={{hapikey}}&userId={{user_id}}

With this POST body

 {
 "name": "session",
 "applicationId": "197994",
 "objectType": "CONTACT",
 "headerTemplate": "Attended ",
 "detailTemplate": "Session occurred at"
}

And I’m able to see that the session event got created just fine in my dev portal:

Additionally, one thing to note: You do not have to include the application-id as a parameter at the back of the url as you’ve already included it on the url as such /v1/6256213.

Could you try this out and let me know if you’re still seeing the 500 internal error?

Hi Wendy,

Thank you for getting back to me!

I tried removing the application-id from the URL, but I am still getting the same issue.

My original eURL does include the userId parameter, but I am wondering if the value is correct. I have it curently as the username present beside my hapikey in the page to access the hapikey.

Here is the 500 error that was returned:

{
“status”: “error”,
“message”: “internal error”,
“correlationId”: “c987dd68-5a35-4557-b8dc-b9466ce2cd5d”,
“requestId”: “e5f150215e4b5354acb68d4fe0cebd7f”
}

Thank you for your help!

Hi @BrockJenken,

Thanks for testing that out. In this case, do you mind sharing with me the following:

  • Your dev portal id
  • Your application id

So that I can further test thing out on my end to see if I’m encountering any 500 errors.

Of course!
My dev portal id is 6211335 and my application id is 6256213.

Thank you so much!

Hi @BrockJenken,

Thank you for sharing that across with me!

When taking a look into your dev portal 6211335 I noticed that the “application id” is a test accounts hub ID (under the Testing tab) and not an application id (under the Apps tab)

The prerequisites for using the Timeline API is stated here: Integration Platform API Prerequisites where you would need to create an app in HubSpot: How do I create an app in HubSpot?

Simply put, the application id here when creating timeline event type is referring to this app id:

and not the Test portal Hub ID.

You can learn more about the usage of the test account here: Test accounts.

Hi Wendy,

Thank you so much for your help. I apolgoize for missing such an early step; thanks for pointing me in the right direction!
Have a wonderful rest of the day!