Update Endpoint
curl --request PUT \
--url https://client-backend.oktivo.com/webhooks/endpoints/{webhookId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"eventTypes": [
{}
],
"description": "<string>",
"agentId": {},
"active": true
}
'import requests
url = "https://client-backend.oktivo.com/webhooks/endpoints/{webhookId}"
payload = {
"url": "<string>",
"eventTypes": [{}],
"description": "<string>",
"agentId": {},
"active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
eventTypes: [{}],
description: '<string>',
agentId: {},
active: true
})
};
fetch('https://client-backend.oktivo.com/webhooks/endpoints/{webhookId}', 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://client-backend.oktivo.com/webhooks/endpoints/{webhookId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'eventTypes' => [
[
]
],
'description' => '<string>',
'agentId' => [
],
'active' => true
]),
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://client-backend.oktivo.com/webhooks/endpoints/{webhookId}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"eventTypes\": [\n {}\n ],\n \"description\": \"<string>\",\n \"agentId\": {},\n \"active\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("https://client-backend.oktivo.com/webhooks/endpoints/{webhookId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"eventTypes\": [\n {}\n ],\n \"description\": \"<string>\",\n \"agentId\": {},\n \"active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-backend.oktivo.com/webhooks/endpoints/{webhookId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"eventTypes\": [\n {}\n ],\n \"description\": \"<string>\",\n \"agentId\": {},\n \"active\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"webhookId": "wh_abc123def456",
"url": "https://new-url.company.com/webhooks/oktivo",
"eventTypes": ["call.ended", "call.analysis_ready", "call.completed"],
"description": "Updated Salesforce integration",
"agentId": "agent_new_qualifier",
"active": true,
"createdAt": "2025-01-10T12:00:00.000Z"
}
}
{
"success": false,
"message": "Webhook endpoint not found"
}
Webhooks
Update Endpoint
Update a webhook endpoint’s URL, events, active status, or agent filter.
PUT
/
webhooks
/
endpoints
/
{webhookId}
Update Endpoint
curl --request PUT \
--url https://client-backend.oktivo.com/webhooks/endpoints/{webhookId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"eventTypes": [
{}
],
"description": "<string>",
"agentId": {},
"active": true
}
'import requests
url = "https://client-backend.oktivo.com/webhooks/endpoints/{webhookId}"
payload = {
"url": "<string>",
"eventTypes": [{}],
"description": "<string>",
"agentId": {},
"active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
eventTypes: [{}],
description: '<string>',
agentId: {},
active: true
})
};
fetch('https://client-backend.oktivo.com/webhooks/endpoints/{webhookId}', 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://client-backend.oktivo.com/webhooks/endpoints/{webhookId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'eventTypes' => [
[
]
],
'description' => '<string>',
'agentId' => [
],
'active' => true
]),
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://client-backend.oktivo.com/webhooks/endpoints/{webhookId}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"eventTypes\": [\n {}\n ],\n \"description\": \"<string>\",\n \"agentId\": {},\n \"active\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("https://client-backend.oktivo.com/webhooks/endpoints/{webhookId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"eventTypes\": [\n {}\n ],\n \"description\": \"<string>\",\n \"agentId\": {},\n \"active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-backend.oktivo.com/webhooks/endpoints/{webhookId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"eventTypes\": [\n {}\n ],\n \"description\": \"<string>\",\n \"agentId\": {},\n \"active\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"webhookId": "wh_abc123def456",
"url": "https://new-url.company.com/webhooks/oktivo",
"eventTypes": ["call.ended", "call.analysis_ready", "call.completed"],
"description": "Updated Salesforce integration",
"agentId": "agent_new_qualifier",
"active": true,
"createdAt": "2025-01-10T12:00:00.000Z"
}
}
{
"success": false,
"message": "Webhook endpoint not found"
}
Path Parameters
string
required
The unique identifier of the webhook endpoint to update.
Request Body
All fields are optional include only the fields you want to change.string
New delivery URL. Must use HTTPS.
array
Updated list of event types to subscribe to.
string
Updated description.
string | null
Update the agent filter. Set to a specific agent ID to filter, or
null to receive events from all agents.boolean
Set to
false to pause the endpoint (stops receiving events) or true to re-enable it.Response
boolean
Indicates if the update was successful.
object
The updated endpoint object.
{
"success": true,
"data": {
"webhookId": "wh_abc123def456",
"url": "https://new-url.company.com/webhooks/oktivo",
"eventTypes": ["call.ended", "call.analysis_ready", "call.completed"],
"description": "Updated Salesforce integration",
"agentId": "agent_new_qualifier",
"active": true,
"createdAt": "2025-01-10T12:00:00.000Z"
}
}
{
"success": false,
"message": "Webhook endpoint not found"
}
This endpoint requires JWT authentication.