Update Webhook
curl --request PATCH \
--url https://app.opencomputer.dev/api/webhooks/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"url": "<string>",
"eventTypes": [
"<string>"
],
"enabled": true,
"rotateSecret": true,
"name": "<string>"
}
'import requests
url = "https://app.opencomputer.dev/api/webhooks/{id}"
payload = {
"url": "<string>",
"eventTypes": ["<string>"],
"enabled": True,
"rotateSecret": True,
"name": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
eventTypes: ['<string>'],
enabled: true,
rotateSecret: true,
name: '<string>'
})
};
fetch('https://app.opencomputer.dev/api/webhooks/{id}', 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://app.opencomputer.dev/api/webhooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'eventTypes' => [
'<string>'
],
'enabled' => true,
'rotateSecret' => true,
'name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://app.opencomputer.dev/api/webhooks/{id}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"eventTypes\": [\n \"<string>\"\n ],\n \"enabled\": true,\n \"rotateSecret\": true,\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.patch("https://app.opencomputer.dev/api/webhooks/{id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"eventTypes\": [\n \"<string>\"\n ],\n \"enabled\": true,\n \"rotateSecret\": true,\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.opencomputer.dev/api/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"eventTypes\": [\n \"<string>\"\n ],\n \"enabled\": true,\n \"rotateSecret\": true,\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "whk_3f9a2c",
"name": "prod",
"url": "https://app.example.com/oc-webhook",
"eventTypes": ["sandbox.stopped", "sandbox.ready"],
"sandboxId": null,
"enabled": true,
"hasSecret": true,
"createdAt": "2026-06-24T12:00:00Z",
"updatedAt": "2026-06-24T12:05:00Z"
}
Webhooks
Update Webhook
PATCH
/
api
/
webhooks
/
{id}
Update Webhook
curl --request PATCH \
--url https://app.opencomputer.dev/api/webhooks/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"url": "<string>",
"eventTypes": [
"<string>"
],
"enabled": true,
"rotateSecret": true,
"name": "<string>"
}
'import requests
url = "https://app.opencomputer.dev/api/webhooks/{id}"
payload = {
"url": "<string>",
"eventTypes": ["<string>"],
"enabled": True,
"rotateSecret": True,
"name": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
eventTypes: ['<string>'],
enabled: true,
rotateSecret: true,
name: '<string>'
})
};
fetch('https://app.opencomputer.dev/api/webhooks/{id}', 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://app.opencomputer.dev/api/webhooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'eventTypes' => [
'<string>'
],
'enabled' => true,
'rotateSecret' => true,
'name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://app.opencomputer.dev/api/webhooks/{id}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"eventTypes\": [\n \"<string>\"\n ],\n \"enabled\": true,\n \"rotateSecret\": true,\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.patch("https://app.opencomputer.dev/api/webhooks/{id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"eventTypes\": [\n \"<string>\"\n ],\n \"enabled\": true,\n \"rotateSecret\": true,\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.opencomputer.dev/api/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"eventTypes\": [\n \"<string>\"\n ],\n \"enabled\": true,\n \"rotateSecret\": true,\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "whk_3f9a2c",
"name": "prod",
"url": "https://app.example.com/oc-webhook",
"eventTypes": ["sandbox.stopped", "sandbox.ready"],
"sandboxId": null,
"enabled": true,
"hasSecret": true,
"createdAt": "2026-06-24T12:00:00Z",
"updatedAt": "2026-06-24T12:05:00Z"
}
Update a destination — pause/resume, retune filters, change the URL, or rotate the secret. See Webhooks.
string
required
Destination ID (
whk_…).string
New HTTPS endpoint.
string[]
Replace the event-type allow-list (unknown types are rejected with
400). Pass null to clear it (deliver all types).boolean
Pause (
false) or resume (true) delivery. Pausing does not drop events — events that occur while paused are queued and delivered when you re-enable.boolean
Rotate to a new generated signing secret, returned as
secret in the response. The previous secret stays valid for a short rollover window so in-flight deliveries still verify. (To set a specific secret, create a new destination.)string
Rename the destination.
sandboxId (scope) is immutable — set it at create; it can’t be changed here. The current signing secret is re-fetchable any time via GET /api/webhooks/{id}/secret.
{
"id": "whk_3f9a2c",
"name": "prod",
"url": "https://app.example.com/oc-webhook",
"eventTypes": ["sandbox.stopped", "sandbox.ready"],
"sandboxId": null,
"enabled": true,
"hasSecret": true,
"createdAt": "2026-06-24T12:00:00Z",
"updatedAt": "2026-06-24T12:05:00Z"
}
⌘I