Update webhook
curl --request PATCH \
--url https://api.pokulabs.com/webhooks/{webhookId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"url": "<string>",
"signingSecret": "<string>",
"headers": {},
"isActive": true,
"eventTypes": []
}
'import requests
url = "https://api.pokulabs.com/webhooks/{webhookId}"
payload = {
"name": "<string>",
"url": "<string>",
"signingSecret": "<string>",
"headers": {},
"isActive": True,
"eventTypes": []
}
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({
name: '<string>',
url: '<string>',
signingSecret: '<string>',
headers: {},
isActive: true,
eventTypes: []
})
};
fetch('https://api.pokulabs.com/webhooks/{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://api.pokulabs.com/webhooks/{webhookId}",
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([
'name' => '<string>',
'url' => '<string>',
'signingSecret' => '<string>',
'headers' => [
],
'isActive' => true,
'eventTypes' => [
]
]),
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://api.pokulabs.com/webhooks/{webhookId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"signingSecret\": \"<string>\",\n \"headers\": {},\n \"isActive\": true,\n \"eventTypes\": []\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://api.pokulabs.com/webhooks/{webhookId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"signingSecret\": \"<string>\",\n \"headers\": {},\n \"isActive\": true,\n \"eventTypes\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pokulabs.com/webhooks/{webhookId}")
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 \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"signingSecret\": \"<string>\",\n \"headers\": {},\n \"isActive\": true,\n \"eventTypes\": []\n}"
response = http.request(request)
puts response.read_bodyWebhooks
Update webhook
Update the configuration of an existing webhook.
PATCH
/
webhooks
/
{webhookId}
Update webhook
curl --request PATCH \
--url https://api.pokulabs.com/webhooks/{webhookId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"url": "<string>",
"signingSecret": "<string>",
"headers": {},
"isActive": true,
"eventTypes": []
}
'import requests
url = "https://api.pokulabs.com/webhooks/{webhookId}"
payload = {
"name": "<string>",
"url": "<string>",
"signingSecret": "<string>",
"headers": {},
"isActive": True,
"eventTypes": []
}
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({
name: '<string>',
url: '<string>',
signingSecret: '<string>',
headers: {},
isActive: true,
eventTypes: []
})
};
fetch('https://api.pokulabs.com/webhooks/{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://api.pokulabs.com/webhooks/{webhookId}",
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([
'name' => '<string>',
'url' => '<string>',
'signingSecret' => '<string>',
'headers' => [
],
'isActive' => true,
'eventTypes' => [
]
]),
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://api.pokulabs.com/webhooks/{webhookId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"signingSecret\": \"<string>\",\n \"headers\": {},\n \"isActive\": true,\n \"eventTypes\": []\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://api.pokulabs.com/webhooks/{webhookId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"signingSecret\": \"<string>\",\n \"headers\": {},\n \"isActive\": true,\n \"eventTypes\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pokulabs.com/webhooks/{webhookId}")
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 \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"signingSecret\": \"<string>\",\n \"headers\": {},\n \"isActive\": true,\n \"eventTypes\": []\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Authentication header containing your Poku API key. Find it in the Poku dashboard. The format is "Bearer YOUR_API_KEY"
Path Parameters
⌘I