Events HTTP API

Last updated June 17, 2020

GET track.hubspot.com/v1/event/

Method Details

HTTP Methods:

GET

Response Format:

N/A

Requires Authentication?

No

Rate Limited?

No

Headers

User-Agent

Products:

Marketing

Required Scope:

business-intelligence

This API is used to trigger a custom HubSpot event using an HTTP GET call. Note: You must have a Marketing Hub Enterprise subscription for access to the events tool.

Use case for this endpoint: You can use this call to trigger any custom events in your HubSpot account. Those events can then be used to create smart lists, score leads, or email contacts.

Response details

If the request is successful, it will have a status code of 200 with no data in the body. The content-type will be image/gif, so it's possible to use HTTP API urls with <img> tags, though we recommend using the JavaScript API on webpages when possible.

Please note: Events will only be processed for accounts with  Marketing Hub Enterprise.

Required Parameters How to use Description
HubSpot Hub (portal) ID &_a=XXXXXX - Used in the request URL. Your HubSpot Hub ID. See this page for help finding your Hub ID.
Event ID &_n= - Used in the request URL The ID or name of the event you want to trigger. See here for more details.
Optional Parameters How to use Description
Contact Email Address &email=person@company.com - Used in the request URL If you want to tie the event that you're triggering to a contact in HubSpot, use this parameter. If the contact doesn't yet exist in HubSpot, it will be created. If the contact does exist, the event will be attributed to the existing contact.
Contact Revenue &_m=20 - Used in the request URL You can use Events to keep track of the monetary value that a contact is worth to you. Any numerical amount that you provide here will increment the "Revenue" field within the Web Analytics History section this value.
Any Contact Property &{property}={value} - Used in the request URL You can also include any contact property with the Event that you are triggering. This will populate the corresponding contact property for the contact specified by the email parameter. Make sure that the parameter you use here is the same as the property name (not the label) in the Contacts Settings area of HubSpot. For example, if you have a property with the name favorite_color, you can populate that property using &favorite_color=orange
External id &id={value} - Used in the request URL Ties the event to a record based on your external id. Unlike email, including this id will not automatically create a contact record, so you would need to have some event associating the id with an email (either a previous HTTP Event call with both the id and email, or by using the id with the JavaScript API for a visitor that was associated with an email address) to have the event update a specific contact if you're only including the id parameter. Also note that this id is treated as a completely external id, so there will not be a way to look up a contact record using this id.