APIs & Integrations

Not applicable

Can not create event in timeline

Im using api to create new event show in contact timeline.
i have success send request but nothing show in contact timeline.
please help:

My POST request:
url: https://api.hubapi.com/integrations/v1/181313/timeline/event-types?hapikey=xxxx-xx-xx-xx-xxxxx&userI...
body:
{
"name":"New Event Type",
"applicationId":"181313",
"objectType":"CONTACT",
"headerTemplate":"Title for event ",
"detailTemplate":"This event happened on ",
"email": "phan.linda90@gmail.com"
}

success but nothing show in my contact timeline

0 Upvotes
2 Replies 2
cbarley
HubSpot Alumni
HubSpot Alumni

Can not create event in timeline

Hi @TechGuyVN, In order to use this endpoint, you'll need to go through the Oauth flow: https://developers.hubspot.com/docs/methods/oauth2/oauth2-overview, as a Hapikey won't have the proper permissions to your application. From the timeline api docs:

Note that you can't use the developer hapikey to create events. This is because the developer hapikey is only for setting up event-types from your development portal. To create an event for a HubSpot portal, that portal will need to grant access to your application via OAuth. Using our OAuth flow you'll need to obtain an access token for a portal and use that to add events to that portal's contacts

0 Upvotes
Not applicable

Can not create event in timeline

I tried curl too but nothing show:

curl -X PUion/json" -d '
{
"id": 380132,
"applicationId": 181313,
"name": "Example event type",
"headerTemplate": "Registered for [{{webinarName}}]",
"detailTemplate": "Registration occurred at {{#formatDate timestamp}}{{/formatDate}}",
"email": "khoi@gmail.com"
}' 'https://api.hubapi.com/integrations/v1/181313/timeline/event-types/380132?hapikey=xx-xx-xx-xx-xx&use...'

0 Upvotes