Update webhook
curl --request PATCH \
--url https://coreapi.io/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/merge-patch+json' \
--data '
{
"events": [
"<string>"
],
"version": "<string>",
"enabled": true
}
'import requests
url = "https://coreapi.io/webhooks/{id}"
payload = {
"events": ["<string>"],
"version": "<string>",
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/merge-patch+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/merge-patch+json'
},
body: JSON.stringify({events: ['<string>'], version: '<string>', enabled: true})
};
fetch('https://coreapi.io/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://coreapi.io/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([
'events' => [
'<string>'
],
'version' => '<string>',
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/merge-patch+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "<string>",
"events": [
"<string>"
],
"version": "<string>",
"enabled": true,
"url": "<string>"
}Webhook
Update webhook
Update webhook
Required permissions:webhook:writePATCH
/
webhooks
/
{id}
Update webhook
curl --request PATCH \
--url https://coreapi.io/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/merge-patch+json' \
--data '
{
"events": [
"<string>"
],
"version": "<string>",
"enabled": true
}
'import requests
url = "https://coreapi.io/webhooks/{id}"
payload = {
"events": ["<string>"],
"version": "<string>",
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/merge-patch+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/merge-patch+json'
},
body: JSON.stringify({events: ['<string>'], version: '<string>', enabled: true})
};
fetch('https://coreapi.io/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://coreapi.io/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([
'events' => [
'<string>'
],
'version' => '<string>',
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/merge-patch+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "<string>",
"events": [
"<string>"
],
"version": "<string>",
"enabled": true,
"url": "<string>"
}Autorisierungen
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Pfadparameter
Webhook identifier
Body
application/merge-patch+jsonapplication/vnd.api+json
The updated Webhook resource
War diese Seite hilfreich?
⌘I