Handle outreach webhook (backwards compatibility)
curl --request POST \
--url https://your-instance.example.com/api/webhook/outreach \
--header 'Content-Type: application/json' \
--data '
{
"apiKey": "tk_live_5f7b1c2e8a1d4e0012c3b4a5",
"contact": {
"firstName": "Alex",
"lastName": "Morgan",
"phoneNumber": "+14165550100",
"email": "alex@example.com"
},
"automationId": "5f7b1c2e8a1d4e0012c3b4a5"
}
'import requests
url = "https://your-instance.example.com/api/webhook/outreach"
payload = {
"apiKey": "tk_live_5f7b1c2e8a1d4e0012c3b4a5",
"contact": {
"firstName": "Alex",
"lastName": "Morgan",
"phoneNumber": "+14165550100",
"email": "alex@example.com"
},
"automationId": "5f7b1c2e8a1d4e0012c3b4a5"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
apiKey: 'tk_live_5f7b1c2e8a1d4e0012c3b4a5',
contact: {
firstName: 'Alex',
lastName: 'Morgan',
phoneNumber: '+14165550100',
email: 'alex@example.com'
},
automationId: '5f7b1c2e8a1d4e0012c3b4a5'
})
};
fetch('https://your-instance.example.com/api/webhook/outreach', 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://your-instance.example.com/api/webhook/outreach",
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([
'apiKey' => 'tk_live_5f7b1c2e8a1d4e0012c3b4a5',
'contact' => [
'firstName' => 'Alex',
'lastName' => 'Morgan',
'phoneNumber' => '+14165550100',
'email' => 'alex@example.com'
],
'automationId' => '5f7b1c2e8a1d4e0012c3b4a5'
]),
CURLOPT_HTTPHEADER => [
"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://your-instance.example.com/api/webhook/outreach"
payload := strings.NewReader("{\n \"apiKey\": \"tk_live_5f7b1c2e8a1d4e0012c3b4a5\",\n \"contact\": {\n \"firstName\": \"Alex\",\n \"lastName\": \"Morgan\",\n \"phoneNumber\": \"+14165550100\",\n \"email\": \"alex@example.com\"\n },\n \"automationId\": \"5f7b1c2e8a1d4e0012c3b4a5\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://your-instance.example.com/api/webhook/outreach")
.header("Content-Type", "application/json")
.body("{\n \"apiKey\": \"tk_live_5f7b1c2e8a1d4e0012c3b4a5\",\n \"contact\": {\n \"firstName\": \"Alex\",\n \"lastName\": \"Morgan\",\n \"phoneNumber\": \"+14165550100\",\n \"email\": \"alex@example.com\"\n },\n \"automationId\": \"5f7b1c2e8a1d4e0012c3b4a5\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/webhook/outreach")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"apiKey\": \"tk_live_5f7b1c2e8a1d4e0012c3b4a5\",\n \"contact\": {\n \"firstName\": \"Alex\",\n \"lastName\": \"Morgan\",\n \"phoneNumber\": \"+14165550100\",\n \"email\": \"alex@example.com\"\n },\n \"automationId\": \"5f7b1c2e8a1d4e0012c3b4a5\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Data processed successfully",
"data": {
"contactId": "64b2c3d4e5f60012345678aa",
"applicationId": "64d2f9c5e8a1d4e001a0b1c2",
"conversationId": "64d2f9c5e8a1d4e001a0b1c3",
"mergeOutcome": "created"
}
}{
"error": "Webhook processing failed"
}{
"error": "Webhook processing failed"
}{
"error": "Webhook processing failed"
}{
"error": "Webhook processing failed"
}Webhooks
Handle outreach webhook (backwards compatibility)
Backwards-compatible alias that proxies to the outreach trigger handler. Authenticated via API key. New integrations should call the canonical /api/outreach/trigger endpoint directly; this route is kept so older customer integrations continue to work.
POST
/
api
/
webhook
/
outreach
Handle outreach webhook (backwards compatibility)
curl --request POST \
--url https://your-instance.example.com/api/webhook/outreach \
--header 'Content-Type: application/json' \
--data '
{
"apiKey": "tk_live_5f7b1c2e8a1d4e0012c3b4a5",
"contact": {
"firstName": "Alex",
"lastName": "Morgan",
"phoneNumber": "+14165550100",
"email": "alex@example.com"
},
"automationId": "5f7b1c2e8a1d4e0012c3b4a5"
}
'import requests
url = "https://your-instance.example.com/api/webhook/outreach"
payload = {
"apiKey": "tk_live_5f7b1c2e8a1d4e0012c3b4a5",
"contact": {
"firstName": "Alex",
"lastName": "Morgan",
"phoneNumber": "+14165550100",
"email": "alex@example.com"
},
"automationId": "5f7b1c2e8a1d4e0012c3b4a5"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
apiKey: 'tk_live_5f7b1c2e8a1d4e0012c3b4a5',
contact: {
firstName: 'Alex',
lastName: 'Morgan',
phoneNumber: '+14165550100',
email: 'alex@example.com'
},
automationId: '5f7b1c2e8a1d4e0012c3b4a5'
})
};
fetch('https://your-instance.example.com/api/webhook/outreach', 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://your-instance.example.com/api/webhook/outreach",
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([
'apiKey' => 'tk_live_5f7b1c2e8a1d4e0012c3b4a5',
'contact' => [
'firstName' => 'Alex',
'lastName' => 'Morgan',
'phoneNumber' => '+14165550100',
'email' => 'alex@example.com'
],
'automationId' => '5f7b1c2e8a1d4e0012c3b4a5'
]),
CURLOPT_HTTPHEADER => [
"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://your-instance.example.com/api/webhook/outreach"
payload := strings.NewReader("{\n \"apiKey\": \"tk_live_5f7b1c2e8a1d4e0012c3b4a5\",\n \"contact\": {\n \"firstName\": \"Alex\",\n \"lastName\": \"Morgan\",\n \"phoneNumber\": \"+14165550100\",\n \"email\": \"alex@example.com\"\n },\n \"automationId\": \"5f7b1c2e8a1d4e0012c3b4a5\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://your-instance.example.com/api/webhook/outreach")
.header("Content-Type", "application/json")
.body("{\n \"apiKey\": \"tk_live_5f7b1c2e8a1d4e0012c3b4a5\",\n \"contact\": {\n \"firstName\": \"Alex\",\n \"lastName\": \"Morgan\",\n \"phoneNumber\": \"+14165550100\",\n \"email\": \"alex@example.com\"\n },\n \"automationId\": \"5f7b1c2e8a1d4e0012c3b4a5\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/webhook/outreach")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"apiKey\": \"tk_live_5f7b1c2e8a1d4e0012c3b4a5\",\n \"contact\": {\n \"firstName\": \"Alex\",\n \"lastName\": \"Morgan\",\n \"phoneNumber\": \"+14165550100\",\n \"email\": \"alex@example.com\"\n },\n \"automationId\": \"5f7b1c2e8a1d4e0012c3b4a5\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Data processed successfully",
"data": {
"contactId": "64b2c3d4e5f60012345678aa",
"applicationId": "64d2f9c5e8a1d4e001a0b1c2",
"conversationId": "64d2f9c5e8a1d4e001a0b1c3",
"mergeOutcome": "created"
}
}{
"error": "Webhook processing failed"
}{
"error": "Webhook processing failed"
}{
"error": "Webhook processing failed"
}{
"error": "Webhook processing failed"
}Body
application/json
Arbitrary outreach payload forwarded to outreach trigger handler
Response
Outreach processed. Same shape as POST /api/outreach — the legacy webhook route is a thin alias.
⌘I