Create a timeline event
curl --request POST \
--url 'https://api.hubapi.com/integrations/v1/{application}‐id/timeline/event'import requests
url = "https://api.hubapi.com/integrations/v1/{application}‐id/timeline/event"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.hubapi.com/integrations/v1/{application}‐id/timeline/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://api.hubapi.com/integrations/v1/{application}‐id/timeline/event",
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"
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")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/integrations/v1/{application}‐id/timeline/event")
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[
{
"id": "3",
"objectId": 1,
"eventTypeId": "123"
},
{
"id": "3",
"email": "test@test.com",
"eventTypeId": "123"
},
{
"id": "3",
"utk": "89b5afb740d41f4cd6651ac5237edf09",
"eventTypeId": "123"
},
{
"id": "1",
"objectId": 11,
"email": "santa.claus@far.com",
"eventTypeId": "123"
},
{
"id": "3",
"objectId": 1,
"eventTypeId": "123",
"extraData": {
"name": "JohnDoe",
"weather": "Cloudy"
}
},
{
"id": "3",
"objectId": 1,
"eventTypeId": "123",
"presentationId": "9876543",
"extraData": {
"name": "JohnDoe",
"weather": "Cloudy"
}
},
{
"id": "3",
"objectId": 1,
"eventTypeId": "123",
"timelineIFrame": {
"linkLabel": "View external data",
"iframeLabel": "Example iframe",
"iframeUri": "https://example.com",
"width": 800,
"height": 300
}
}
]v1
Create a timeline event
Create a new event, or update an existing event. Please see the Timeline Overview for more details about creating events. Events must include at least one identity parameter to be associated with a contact record. See the overview and the examples for more details.
POST
/
integrations
/
v1
/
{application}
‐id
/
timeline
/
event
Create a timeline event
curl --request POST \
--url 'https://api.hubapi.com/integrations/v1/{application}‐id/timeline/event'import requests
url = "https://api.hubapi.com/integrations/v1/{application}‐id/timeline/event"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.hubapi.com/integrations/v1/{application}‐id/timeline/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://api.hubapi.com/integrations/v1/{application}‐id/timeline/event",
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"
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")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/integrations/v1/{application}‐id/timeline/event")
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[
{
"id": "3",
"objectId": 1,
"eventTypeId": "123"
},
{
"id": "3",
"email": "test@test.com",
"eventTypeId": "123"
},
{
"id": "3",
"utk": "89b5afb740d41f4cd6651ac5237edf09",
"eventTypeId": "123"
},
{
"id": "1",
"objectId": 11,
"email": "santa.claus@far.com",
"eventTypeId": "123"
},
{
"id": "3",
"objectId": 1,
"eventTypeId": "123",
"extraData": {
"name": "JohnDoe",
"weather": "Cloudy"
}
},
{
"id": "3",
"objectId": 1,
"eventTypeId": "123",
"presentationId": "9876543",
"extraData": {
"name": "JohnDoe",
"weather": "Cloudy"
}
},
{
"id": "3",
"objectId": 1,
"eventTypeId": "123",
"timelineIFrame": {
"linkLabel": "View external data",
"iframeLabel": "Example iframe",
"iframeUri": "https://example.com",
"width": 800,
"height": 300
}
}
]Scope requirements
Scope requirements
Antwort
200 - application/json
Successful response - Create a new event, or update an existing event
The response is of type object.
Zuletzt geändert am 1. April 2026
⌘I