# 500 Returned on Creating Timeline Event Type

**URL:** <https://community.hubspot.com/t/500-returned-on-creating-timeline-event-type/15959>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [August 27, 2019, 2:47pm UTC](https://community.hubspot.com/t/500-returned-on-creating-timeline-event-type/15959 "2019-08-27T14:47:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrockJenken](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/brockjenken/32/53612_2.png) [@BrockJenken](https://community.hubspot.com/u/BrockJenken)\
**Post date:** [August 27, 2019, 2:47pm UTC](https://community.hubspot.com/t/500-returned-on-creating-timeline-event-type/15959/1 "2019-08-27T14:47:54Z")

</div>

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](https://api.hubapi.com/integrations/v1/6256213/timeline/event-types?hapikey=%7Bhapikey%7D&application-id=6256213&userId=Brock%20Jenken)

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

_Header_ **:** {“Content-Type”: “application/json”}

_Body_ **:** {

“name”: “session”,  
&nbsp;&nbsp;&nbsp;&nbsp;“applicationId”: “6256213”,  
&nbsp;&nbsp;&nbsp;&nbsp;“objectType”: “CONTACT”,  
&nbsp;&nbsp;&nbsp;&nbsp;“headerTemplate”: "Attended ",  
&nbsp;&nbsp;&nbsp;&nbsp;“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!

---

<div class="post-metadata">

**Author:** ![WendyGoh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wendygoh/32/42320_2.png) [@WendyGoh](https://community.hubspot.com/u/WendyGoh)\
**Post date:** [August 28, 2019, 3:37am UTC](https://community.hubspot.com/t/500-returned-on-creating-timeline-event-type/15959/2 "2019-08-28T03:37:00Z")

</div>

Hi @BrockJenken,

When looking to create the timeline event type using this endpoint documented [here](https://developers.hubspot.com/docs/methods/timeline/create-event-type):

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

```auto
 {
 "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:

 ![session_event.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/c/1/c13ac42ec4d10bc11659f4414eddee1e7e43247b.png)

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?

---

<div class="post-metadata">

**Author:** ![BrockJenken](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/brockjenken/32/53612_2.png) [@BrockJenken](https://community.hubspot.com/u/BrockJenken)\
**Post date:** [August 28, 2019, 2:27pm UTC](https://community.hubspot.com/t/500-returned-on-creating-timeline-event-type/15959/3 "2019-08-28T14:27:36Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![WendyGoh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wendygoh/32/42320_2.png) [@WendyGoh](https://community.hubspot.com/u/WendyGoh)\
**Post date:** [August 29, 2019, 2:11am UTC](https://community.hubspot.com/t/500-returned-on-creating-timeline-event-type/15959/4 "2019-08-29T02:11:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![BrockJenken](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/brockjenken/32/53612_2.png) [@BrockJenken](https://community.hubspot.com/u/BrockJenken)\
**Post date:** [August 29, 2019, 2:24pm UTC](https://community.hubspot.com/t/500-returned-on-creating-timeline-event-type/15959/5 "2019-08-29T14:24:58Z")

</div>

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

Thank you so much!

---

<div class="post-metadata">

**Author:** ![WendyGoh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wendygoh/32/42320_2.png) [@WendyGoh](https://community.hubspot.com/u/WendyGoh)\
**Post date:** [August 30, 2019, 6:52am UTC](https://community.hubspot.com/t/500-returned-on-creating-timeline-event-type/15959/6 "2019-08-30T06:52:12Z")

</div>

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](https://developers.hubspot.com/docs/methods/timeline/timeline-overview) is stated here: [Integration Platform API Prerequisites](https://developers.hubspot.com/docs/faq/integration-platform-api-requirements) where you would need to create an app in HubSpot: [How do I create an app in HubSpot?](https://developers.hubspot.com/docs/faq/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:

 ![app id.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/7/e/7e415ba5f5d1d1ea190a1d717c714031aa703d11.png)

and not the Test portal Hub ID.

You can learn more about the usage of the test account here: [Test accounts](https://developers.hubspot.com/docs/faq/how-do-i-create-a-test-account).

---

<div class="post-metadata">

**Author:** ![BrockJenken](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/brockjenken/32/53612_2.png) [@BrockJenken](https://community.hubspot.com/u/BrockJenken)\
**Post date:** [August 30, 2019, 3:20pm UTC](https://community.hubspot.com/t/500-returned-on-creating-timeline-event-type/15959/7 "2019-08-30T15:20:57Z")

</div>

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!
