メインコンテンツへスキップ
GET
/
v1
/
event
Events HTTP API
curl --request GET \
  --url https://track.hubspot.com/v1/event
import requests

url = "https://track.hubspot.com/v1/event"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://track.hubspot.com/v1/event', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://track.hubspot.com/v1/event",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://track.hubspot.com/v1/event"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://track.hubspot.com/v1/event")
.asString();
require 'uri'
require 'net/http'

url = URI("https://track.hubspot.com/v1/event")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
"https://track.hubspot.com/v1/event?_n=000000001625&_a=62515&email=testingapis@hubspot.com"
{
"status": "<string>",
"message": "<string>",
"correlationId": "<string>"
}
If you have an EU portal you must use the tracking server track-eu1.hubspot.com.
All symbols in a contact’s email address must be encoded, except for the following:
  • @ symbol
  • hyphen -
  • underscore _
  • period .

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.

Example URL

https://track.hubspot.com/v1/event?_n=000000001625&_a=62515&email=testingapis@hubspot.com

クエリパラメータ

_a
string
必須

Your HubSpot Hub ID. See this page for help finding your Hub ID.

_n
string
必須

The ID or name of the event you want to trigger.

email
string<email>

Associates the event with a known HubSpot contact. If the contact doesn't yet exist in HubSpot, it will be created. All symbols in a contact's email address must be encoded, except for the @ symbol, hyphen (-), underscore (_), and period (.).

_m
number

Any numerical amount that you provide here will increment the contact's Revenue field within the Web Analytics History section.

id
string

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.

レスポンス

Event triggered successfully. The content-type will be image/gif, so it's possible to use HTTP API urls with img tags.

The response is of type file.

最終更新日 2026年4月10日