Create a new timeline event type
curl --request POST \
--url https://api.hubapi.com/integrations/v1/{application-id}/timeline/event-typesimport requests
url = "https://api.hubapi.com/integrations/v1/{application-id}/timeline/event-types"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.hubapi.com/integrations/v1/{application-id}/timeline/event-types', 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://api.hubapi.com/integrations/v1/{application-id}/timeline/event-types",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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://api.hubapi.com/integrations/v1/{application-id}/timeline/event-types"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hubapi.com/integrations/v1/{application-id}/timeline/event-types")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/integrations/v1/{application-id}/timeline/event-types")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body[
{
"name": "New Event Type",
"applicationId": "123",
"objectType": "CONTACT",
"headerTemplate": "# Title for event {{id}}\\nThis is an event for {{objectType}}",
"detailTemplate": "This event happened on {{#formatDate timestamp}}{{/formatDate}}"
},
{
"id": 261,
"name": "Test Event Type",
"headerTemplate": "# Title for event {{id}}\\nThis is an event for {{objectType}}",
"detailTemplate": "This event happened on {{#formatDate timestamp}}{{/formatDate}}",
"applicationId": 123,
"objectType": "CONTACT"
}
]v1
Create a new timeline event type
Create a new timeline event type template to begin sending event data to HubSpot.
the
v1 and v3 timeline events APIs are only available for app partners with existing v1/v3 timeline events defined in their public app. - If your app doesn’t include any timeline events yet, requests to this endpoint will fail. Instead, you can get started on latest version of the developer platform. Note that you’ll need to request approval before you can define app events for your app. Learn more in the app events overview.
- If your app includes a
v1/v3timeline event, learn how to migrate it to the developer platform. You don’t need to request approval before migrating existing event types.
POST
/
integrations
/
v1
/
{application-id}
/
timeline
/
event-types
Create a new timeline event type
curl --request POST \
--url https://api.hubapi.com/integrations/v1/{application-id}/timeline/event-typesimport requests
url = "https://api.hubapi.com/integrations/v1/{application-id}/timeline/event-types"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.hubapi.com/integrations/v1/{application-id}/timeline/event-types', 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://api.hubapi.com/integrations/v1/{application-id}/timeline/event-types",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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://api.hubapi.com/integrations/v1/{application-id}/timeline/event-types"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hubapi.com/integrations/v1/{application-id}/timeline/event-types")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/integrations/v1/{application-id}/timeline/event-types")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body[
{
"name": "New Event Type",
"applicationId": "123",
"objectType": "CONTACT",
"headerTemplate": "# Title for event {{id}}\\nThis is an event for {{objectType}}",
"detailTemplate": "This event happened on {{#formatDate timestamp}}{{/formatDate}}"
},
{
"id": 261,
"name": "Test Event Type",
"headerTemplate": "# Title for event {{id}}\\nThis is an event for {{objectType}}",
"detailTemplate": "This event happened on {{#formatDate timestamp}}{{/formatDate}}",
"applicationId": 123,
"objectType": "CONTACT"
}
]Scope requirements
Scope requirements
Antwort
200 - application/json
Successful response - Get the details of a specific timeline event type by its id
The response is of type object.
Zuletzt geändert am 1. April 2026
⌘I