Receive a Segment webhook event
curl --request POST \
--url https://api.orbit.devotel.io/api/v1/integrations/webhooks/segment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "identify",
"messageId": "msg_01H9K2QY",
"userId": "user_8471",
"traits": {
"email": "dana@example.com",
"first_name": "Dana"
}
}
'import requests
url = "https://api.orbit.devotel.io/api/v1/integrations/webhooks/segment"
payload = {
"type": "identify",
"messageId": "msg_01H9K2QY",
"userId": "user_8471",
"traits": {
"email": "dana@example.com",
"first_name": "Dana"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'identify',
messageId: 'msg_01H9K2QY',
userId: 'user_8471',
traits: {email: 'dana@example.com', first_name: 'Dana'}
})
};
fetch('https://api.orbit.devotel.io/api/v1/integrations/webhooks/segment', 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.orbit.devotel.io/api/v1/integrations/webhooks/segment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'identify',
'messageId' => 'msg_01H9K2QY',
'userId' => 'user_8471',
'traits' => [
'email' => 'dana@example.com',
'first_name' => 'Dana'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.orbit.devotel.io/api/v1/integrations/webhooks/segment"
payload := strings.NewReader("{\n \"type\": \"identify\",\n \"messageId\": \"msg_01H9K2QY\",\n \"userId\": \"user_8471\",\n \"traits\": {\n \"email\": \"dana@example.com\",\n \"first_name\": \"Dana\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.orbit.devotel.io/api/v1/integrations/webhooks/segment")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"identify\",\n \"messageId\": \"msg_01H9K2QY\",\n \"userId\": \"user_8471\",\n \"traits\": {\n \"email\": \"dana@example.com\",\n \"first_name\": \"Dana\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/api/v1/integrations/webhooks/segment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"identify\",\n \"messageId\": \"msg_01H9K2QY\",\n \"userId\": \"user_8471\",\n \"traits\": {\n \"email\": \"dana@example.com\",\n \"first_name\": \"Dana\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"received": true,
"type": "<string>",
"duplicate": true,
"contact_id": "<string>"
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docs_url": "<string>"
}
}Integrations
Receive a Segment webhook event
Ingests events from a Segment workspace configured as a Source that POSTs identify, track, group and alias calls into Orbit for the tenant Source named by the ?source= query parameter. Identifies upsert contacts, tracks and groups persist for campaign triggers, and aliases reconcile split identities. The per-Source x-signature HMAC (SHA-1 over the raw body) is the authentication — Segment calls this endpoint, not your application. Re-deliveries dedupe on messageId.
POST
/
api
/
v1
/
integrations
/
webhooks
/
segment
Receive a Segment webhook event
curl --request POST \
--url https://api.orbit.devotel.io/api/v1/integrations/webhooks/segment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "identify",
"messageId": "msg_01H9K2QY",
"userId": "user_8471",
"traits": {
"email": "dana@example.com",
"first_name": "Dana"
}
}
'import requests
url = "https://api.orbit.devotel.io/api/v1/integrations/webhooks/segment"
payload = {
"type": "identify",
"messageId": "msg_01H9K2QY",
"userId": "user_8471",
"traits": {
"email": "dana@example.com",
"first_name": "Dana"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'identify',
messageId: 'msg_01H9K2QY',
userId: 'user_8471',
traits: {email: 'dana@example.com', first_name: 'Dana'}
})
};
fetch('https://api.orbit.devotel.io/api/v1/integrations/webhooks/segment', 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.orbit.devotel.io/api/v1/integrations/webhooks/segment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'identify',
'messageId' => 'msg_01H9K2QY',
'userId' => 'user_8471',
'traits' => [
'email' => 'dana@example.com',
'first_name' => 'Dana'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.orbit.devotel.io/api/v1/integrations/webhooks/segment"
payload := strings.NewReader("{\n \"type\": \"identify\",\n \"messageId\": \"msg_01H9K2QY\",\n \"userId\": \"user_8471\",\n \"traits\": {\n \"email\": \"dana@example.com\",\n \"first_name\": \"Dana\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.orbit.devotel.io/api/v1/integrations/webhooks/segment")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"identify\",\n \"messageId\": \"msg_01H9K2QY\",\n \"userId\": \"user_8471\",\n \"traits\": {\n \"email\": \"dana@example.com\",\n \"first_name\": \"Dana\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/api/v1/integrations/webhooks/segment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"identify\",\n \"messageId\": \"msg_01H9K2QY\",\n \"userId\": \"user_8471\",\n \"traits\": {\n \"email\": \"dana@example.com\",\n \"first_name\": \"Dana\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"received": true,
"type": "<string>",
"duplicate": true,
"contact_id": "<string>"
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docs_url": "<string>"
}
}Authorizations
BearerApiKey
Dashboard JWT token from Clerk
Query Parameters
The Orbit Segment Source id this workspace was configured to post to.
Body
application/json
⌘I