Skip to main content
PATCH
/
v1
/
webhook-endpoints
/
{id}
Update a webhook endpoint
curl --request PATCH \
  --url https://app.selektable.com/v1/webhook-endpoints/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "description": "<string>",
  "enabledEvents": []
}
'
import requests

url = "https://app.selektable.com/v1/webhook-endpoints/{id}"

payload = {
"url": "<string>",
"description": "<string>",
"enabledEvents": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', description: '<string>', enabledEvents: []})
};

fetch('https://app.selektable.com/v1/webhook-endpoints/{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.selektable.com/v1/webhook-endpoints/{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>',
'description' => '<string>',
'enabledEvents' => [

]
]),
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://app.selektable.com/v1/webhook-endpoints/{id}"

payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"enabledEvents\": []\n}")

req, _ := http.NewRequest("PATCH", 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.patch("https://app.selektable.com/v1/webhook-endpoints/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"enabledEvents\": []\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app.selektable.com/v1/webhook-endpoints/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"enabledEvents\": []\n}"

response = http.request(request)
puts response.read_body
{
  "id": "whe_abc123",
  "object": "webhook_endpoint",
  "url": "<string>",
  "description": "<string>",
  "enabledEvents": [
    "<string>"
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}
{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>"
}
}
Update a webhook endpoint’s URL, description, enabled events, or status. Fields you don’t include are left unchanged. To temporarily stop delivery without losing the endpoint configuration, set status to disabled.

Authorizations

Authorization
string
header
required

Your Selektable API key (selektable_...), sent as Authorization: Bearer <key>.

Path Parameters

id
string
required

Body

application/json
url
string<uri>
description
string | null
Maximum string length: 200
enabledEvents
enum<string>[]
Available options:
*,
generation.completed,
generation.failed
status
enum<string>
Available options:
enabled,
disabled

Response

The updated webhook endpoint

id
string
Example:

"whe_abc123"

object
enum<string>
Available options:
webhook_endpoint
url
string<uri>
description
string | null
enabledEvents
string[]
status
enum<string>
Available options:
enabled,
disabled
createdAt
string<date-time>
updatedAt
string<date-time>