APIs & Integrations

silvacarl
Member

Can the events API get events without having to specific a specific contact?

we would like to iterate through events without having to specify a specific contact ID:

 

curl --request GET --url 'https://api.hubapi.com/events/v3/events?objectType=contact&eventType=e_visited_page

 

but it does not appear possible?

 

also can the API pull events that are just for a specific hs_title?

0 Upvotes
2 Replies 2
silvacarl
Member

Can the events API get events without having to specific a specific contact?

when i do this: 

 

curl --request GET --url 'https://api.hubapi.com/reports/v2/events?hapikey=demo'

 

it just comes back blank: []

 

i am trying to find where i can extract contact web events like this:

 

idobjectTypeobjectIdeventTypeoccurredAtURLTitle
leviathan-8e60e63e-c54d-319b-8f74-9edd38111ea0CONTACT44505e_visited_page2020-09-28T20:43:35.278Zhttps://app.hubspot.com/documents/6612416/view/67871605?accessId=51003aDocuments | HubSpot
0 Upvotes
webdew
Guide | Diamond Partner
Guide | Diamond Partner

Can the events API get events without having to specific a specific contact?

Hi @silvacarl ,

you can get an event with the event id by using this api https://api.hubapi.com/reports/v2/events/{event_id}?hapikey=demo , for more info please refer to this doc https://legacydocs.hubspot.com/docs/methods/events/get_event_by_id If you want to get all the events then you can use this api https://api.hubapi.com/reports/v2/events?hapikey=demo Reference doc link https://legacydocs.hubspot.com/docs/methods/events/get_events

Hope this helps!


If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards. 

0 Upvotes