Timeline overview


I'm attempting to follow this docs article:

I followed the pre req and created a dev account and created a new app.

Got the hapi key, user id, and the app id.

Attempt to create an event type and it gives me this error:
{"status":"error","message":"UserId not provided in request", ...

I can't figure out where I'm going wrong since I'm just copying and pasting the command from the article
curl -X POST -H "Content-Type: application/json" -d '
"name" : "Example event type",
"applicationId": xxxxx


Hi @scotts

Try wrapping your URL in single quotes, so the command becomes like this:

curl -X POST -H "Content-Type: application/json" -d '{"name" : "Billing", "applicationId": [app-id]}' 'https://api.hubapi.com/integrations/v1/[app-id]/timeline/event-types?hapikey=[hapi]&userId=[userId]'



Okay that worked, that's frustrating lol

Any particular reason why I had to wrap it in single quotes?


Glad that worked!

I'm not a curl expert, but I think it's because the URL has parameters - if params are present, you have to treat the URL as a string. I'll follow up with the keeper of the docs to see if we can alter the example curl request to avoid future confusion.


@Robert_Ainslie that would be amazing, thanks again!


Found the reason - it depends on the type of console you're using. Bash tries to turn ? and & into commands. So, on some terminals quotes aren't required, but they are in others.

I had the doc updated still, but, that's the reason.


@Robert_Ainslie Off topic to the original question but in the same timeline API docs.

The second step "2. Defining Event Properties" both curl commands require the application id to be in the request data.

curl -X POST -H "Content-Type: application/json" -d '
"name" : "webinarName",
"label" : "Webinar Name",
"propertyType": "String"

Needed to be

curl -X POST -H "Content-Type: application/json" -d '
"name" : "webinarName",
"label" : "Webinar Name",
"propertyType": "String",
"applicationId": <>


Before it would work correctly


Thanks for the heads up and can pass along as well.

The overview example should definitely include that, but my general recommendation is to view the specific doc for each of these calls, which includes more exhaustive detail. In this case, this one: https://developers.hubspot.com/docs/methods/timeline/create-event-type and this one: https://developers.hubspot.com/docs/methods/timeline/create-timeline-event-type-property