Events HTTP API

Last updated October 12, 2021

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

If you have a Marketing Hub Enterprise account, use this API to trigger a custom behavioral event using an HTTP GET request. Event completions can be tracked in HubSpot and used to segment contacts, score leads, and more.

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.

Parameters

All parameters below are used in the request URL.

Please note: all symbols in a contact's email address must be encoded, except for the following:

  • @ symbol
  • hyphen -
  • underscore _ 
  • period .
Required Parameters How to use Description
HubSpot Hub (portal) ID &_a=XXXXXX Your HubSpot Hub ID. See this page for help finding your Hub ID.
Event ID &_n= 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 Associates the event with a known HubSpot contact. If the contact doesn't yet exist in HubSpot, it will be created.
Contact Revenue &_m=20 Any numerical amount that you provide here will increment the contact's Revenue field within the Web Analytics History section.
Any Contact Property &{property}={value} If your account was created before September 8, 2021 and is set up to allow contact properties to be updated through the tracking code, you can also include any contact properties with the event that you’re triggering. This will populate the corresponding contact property for the contact specified by the email parameter. 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} Ties the event to a record based on an external ID (not the HubSpot contact's ID). Unlike email, including this id will not automatically create a contact record. You would need to have some event associating the ID with an email, such as 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.