Add a webhook endpoint
Relaypoint sends an HTTPS POST to this URL for each event you choose. The response includes the signing secret once.
Authentication
Bearer tokenbearerAuth
Create a key under Settings › API keys and send it as Authorization: Bearer YOUR_KEY.
Request bodyrequired
Responses
400A parameter is missing or wrong. error.field names it.application/json
POST/webhook-endpoints
curl https://api.relaypoint.example/v1/webhook-endpoints \
--request POST \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://example.com/hooks/relaypoint",
"events": [
"conversation.created",
"conversation.closed"
]
}'const response = await fetch('https://api.relaypoint.example/v1/webhook-endpoints', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://example.com/hooks/relaypoint',
events: ['conversation.created', 'conversation.closed']
})
})
console.log(response.status, await response.text());import requests
response = requests.post(
"https://api.relaypoint.example/v1/webhook-endpoints",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"url": "https://example.com/hooks/relaypoint",
"events": [
"conversation.created",
"conversation.closed"
]
}
)
print(response.status_code)
print(response.text)<?php
$ch = curl_init('https://api.relaypoint.example/v1/webhook-endpoints');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_TOKEN',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://example.com/hooks/relaypoint',
'events' => [
'conversation.created',
'conversation.closed',
],
]),
]);
$response = curl_exec($ch);
if ($response === false) {
exit('Request failed: ' . curl_error($ch) . PHP_EOL);
}
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), PHP_EOL, $response, PHP_EOL;
curl_close($ch);package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
requestUrl := "https://api.relaypoint.example/v1/webhook-endpoints"
payload := strings.NewReader(`{
"url": "https://example.com/hooks/relaypoint",
"events": [
"conversation.created",
"conversation.closed"
]
}`)
req, _ := http.NewRequest("POST", requestUrl, payload)
req.Header.Add("Authorization", "Bearer YOUR_TOKEN")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}Response
{
"id": "whe_7c1n4r",
"url": "https://example.com/hooks/relaypoint",
"events": [
"conversation.created",
"conversation.closed"
],
"status": "active",
"created_at": "2026-11-27T10:15:00Z",
"signing_secret": "YOUR_SECRET"
}Was this page helpful?