# Problem with Timeline API Event creation

**URL:** <https://community.hubspot.com/t/problem-with-timeline-api-event-creation/19530>\
**Category:** APIs & Integrations\
**Tags:** timeline-and-extensions-apis\
**Created:** [March 19, 2020, 1:06pm UTC](https://community.hubspot.com/t/problem-with-timeline-api-event-creation/19530 "2020-03-19T13:06:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![constantin1980](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/constantin1980/32/78108_2.png) [@constantin1980](https://community.hubspot.com/u/constantin1980)\
**Post date:** [March 19, 2020, 1:06pm UTC](https://community.hubspot.com/t/problem-with-timeline-api-event-creation/19530/1 "2020-03-19T13:06:52Z")

</div>

Hello,  
I always get an Error while trying to create a Timeline Event with the API.

The Eventtype 1002382 exits.

I created the call as PUT with this payload {“[id":“7f53cfe9-5453-44c3-92f8-978794d29330”,“eventTypeId”:“1002382”,“eventType”:“test”,“email”:"kontaktbooking@gmail.com](mailto:id%22:%227f53cfe9-5453-44c3-92f8-978794d29330%22,%22eventTypeId%22:%221002382%22,%22eventType%22:%22test%22,%22email%22:%22kontaktbooking@gmail.com)”}

URL: [https://api.hubapi.com/integrations/v1/213542/timeline/event](https://api.hubapi.com/integrations/v1/213542/timeline/event)

Result is always {“status”:“error”,“message”:“internal error”,“correlationId”:“76584e0a-39e2-4bff-8820-2dab85136b03”,“requestId”:“c2f0ce70-acfb-4b09-a9fc-9a3e43e3d582”}  
Auth seems to be in place cause if i alter the bearer i get an authentication error.  
The ids of the entities (appid,eventid) are correct like in upper example  
The structure of the event should also be in place.  
Any hint would be highly appreciated. The error message here is not really helpful

---

<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:** [March 20, 2020, 3:20am UTC](https://community.hubspot.com/t/problem-with-timeline-api-event-creation/19530/2 "2020-03-20T03:20:56Z")

</div>

Hey @constantin1980,

When I install your app 213xxx on my own portal and tried to PUT a timeline event using the [Create or update a timeline event endpoint](https://developers.hubspot.com/docs/methods/timeline/create-or-update-event) with the following POST body:

`{"id":"7f53cfe9-5453-44c3-92f8-978794d29330","eventTypeId":"1002382","eventType":"test","email":"kontaktbooking@gmail.com"}`

and I was able to PUT it successfully.

Based on your error message it looks like a 500 internal server error. These errors are almost always transient delayed somewhere in the stack. In this case, could you retry these requests and see if it resolve your issue?

---

<div class="post-metadata">

**Author:** ![constantin1980](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/constantin1980/32/78108_2.png) [@constantin1980](https://community.hubspot.com/u/constantin1980)\
**Post date:** [March 20, 2020, 8:13am UTC](https://community.hubspot.com/t/problem-with-timeline-api-event-creation/19530/3 "2020-03-20T08:13:52Z")

</div>

Hello

Its still not working

I redid connection with oauth to my portal id (7178964)  
I tried

curl “[https://api.hubapi.com/integrations/v1/213542/timeline/event](https://api.hubapi.com/integrations/v1/213542/timeline/event)” \  
-X PUT \  
-d “{“[id":“62788492-f5c3-42c2-877b-e3aaa0f2b544”,“eventTypeId”:“1002382”,“eventType”:“test”,“email”:"kontaktbooking@gmail.com](mailto:id%22:%2262788492-f5c3-42c2-877b-e3aaa0f2b544%22,%22eventTypeId%22:%221002382%22,%22eventType%22:%22test%22,%22email%22:%22kontaktbooking@gmail.com)”}” \  
-H “Authorization: Bearer secrettoken”

curl “[https://api.hubapi.com/integrations/v1/213542/timeline/event](https://api.hubapi.com/integrations/v1/213542/timeline/event)” -X PUT -d “{“[id":“62788492-f5c3-42c2-877b-e3aaa0f2b544”,“eventTypeId”:“1002382”,“eventType”:“test”,“email”:"kontaktbooking@gmail.com](mailto:id%22:%2262788492-f5c3-42c2-877b-e3aaa0f2b544%22,%22eventTypeId%22:%221002382%22,%22eventType%22:%22test%22,%22email%22:%22kontaktbooking@gmail.com)”}” -H “Authorization: Bearer secrettoken”

MY secret token i have removed her from the posts for sec reasons

Still the same results

Can there something wrong with my portal ?

Regards c

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [March 20, 2020, 2:05pm UTC](https://community.hubspot.com/t/problem-with-timeline-api-event-creation/19530/4 "2020-03-20T14:05:43Z")

</div>

Hi, @constantin1980.

Like @WendyGoh, I installed your app in my account and was able to create a contact record with the same payload:

 ![Resulting contact.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/5/b/5b8d4d35b973f3a302e4473dfd284843ddc8959a.png)

I made the actual `PUT` request within [Postman](https://www.postman.com/).

Are you making the `curl` requests within your terminal?

If so, could you try making the requests in a REST client to see if you get a different response? If the request succeeds, we’ll know that the issue lies in your app or terminal environment.

---

<div class="post-metadata">

**Author:** ![constantin1980](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/constantin1980/32/78108_2.png) [@constantin1980](https://community.hubspot.com/u/constantin1980)\
**Post date:** [March 20, 2020, 5:04pm UTC](https://community.hubspot.com/t/problem-with-timeline-api-event-creation/19530/5 "2020-03-20T17:04:24Z")

</div>

![screenshot_391.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/b/8/b820ddfa519f907734dfbba8e59985af58b84340.png)

It is not working with postman as well (same result)  
I tried with 4 tools and the code (which integrates alot other systems ase)

Is there losg on your side to check ?

Can it be something in our portal ? (cause it works on yours)

Who could check that.

We really need to progress on that

Thx alot

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [March 20, 2020, 5:55pm UTC](https://community.hubspot.com/t/problem-with-timeline-api-event-creation/19530/6 "2020-03-20T17:55:42Z")

</div>

Hi, @constantin1980.

You can actually view your app’s error log [here](https://app.hubspot.com/developer/7104982/application/213542/monitoring/api) in your developer account.

I see that your most recent failed requests have the header `Content-Type: text/plain`. Requests which failed earlier today have `Content-Type: application/x-www-form-urlencoded`.

Neither of these match what is defined in [the documentation](https://developers.hubspot.com/docs/methods/timeline/create-or-update-event). Could you change the header to `Content-Type: application/json` and try again?

For comparison, the only headers I manually set in Postman are `Content-Type: application/json` and the `Authorization` header:

 ![My Postman Headers.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/7/9788c57fe9e7146b61682dae2533ecb3ef7787a2.jpeg)  
My Postman headers  
 ![My Postman Body.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/8/e/8e9f3e72f25f424c8bb6c1d3d7c3cdb57d20efc0.png)  
My Postman body
