Deactivate a webhook encryption key
curl --request POST \
--url http://127.0.0.1:8787/v1/webhooks/keys/{key_id}/deactivate \
--header 'Authorization: Bearer <token>'import requests
url = "http://127.0.0.1:8787/v1/webhooks/keys/{key_id}/deactivate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('http://127.0.0.1:8787/v1/webhooks/keys/{key_id}/deactivate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8787",
CURLOPT_URL => "http://127.0.0.1:8787/v1/webhooks/keys/{key_id}/deactivate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:8787/v1/webhooks/keys/{key_id}/deactivate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://127.0.0.1:8787/v1/webhooks/keys/{key_id}/deactivate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:8787/v1/webhooks/keys/{key_id}/deactivate")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"webhook_endpoint_id": "<string>",
"key_id": "<string>",
"algorithm": "<string>",
"key_type": "<string>",
"jwk": {},
"is_active": true,
"created_at": "<string>",
"updated_at": "<string>",
"disabled_at": "<string>"
},
"error": null
}{
"data": null,
"error": {
"code": "NOT_FOUND",
"message": "Webhook encryption key not found.",
"hint": "The webhook encryption key with the given ID was not found.",
"docs": "https://kayle.id/docs/api/webhooks/keys#deactivate"
}
}{
"data": null,
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error.",
"hint": "The server encountered an error.",
"docs": "https://kayle.id/docs/api/errors"
}
}Webhooks
Deactivate a webhook encryption key
Deactivate an encryption key. Existing deliveries remain valid; new deliveries will not use this key.
POST
/
v1
/
webhooks
/
keys
/
{key_id}
/
deactivate
Deactivate a webhook encryption key
curl --request POST \
--url http://127.0.0.1:8787/v1/webhooks/keys/{key_id}/deactivate \
--header 'Authorization: Bearer <token>'import requests
url = "http://127.0.0.1:8787/v1/webhooks/keys/{key_id}/deactivate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('http://127.0.0.1:8787/v1/webhooks/keys/{key_id}/deactivate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8787",
CURLOPT_URL => "http://127.0.0.1:8787/v1/webhooks/keys/{key_id}/deactivate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:8787/v1/webhooks/keys/{key_id}/deactivate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://127.0.0.1:8787/v1/webhooks/keys/{key_id}/deactivate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:8787/v1/webhooks/keys/{key_id}/deactivate")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"webhook_endpoint_id": "<string>",
"key_id": "<string>",
"algorithm": "<string>",
"key_type": "<string>",
"jwk": {},
"is_active": true,
"created_at": "<string>",
"updated_at": "<string>",
"disabled_at": "<string>"
},
"error": null
}{
"data": null,
"error": {
"code": "NOT_FOUND",
"message": "Webhook encryption key not found.",
"hint": "The webhook encryption key with the given ID was not found.",
"docs": "https://kayle.id/docs/api/webhooks/keys#deactivate"
}
}{
"data": null,
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error.",
"hint": "The server encountered an error.",
"docs": "https://kayle.id/docs/api/errors"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the webhook encryption key to deactivate (e.g. whk_...).
Required string length:
1 - 128Pattern:
^[A-Za-z0-9_-]+$⌘I