Webhook
删除 Webhook
通过 OMA API 删除 Webhook。
DELETE
/
v1
/
webhooks
/
{webhook_id}
删除 Webhook
curl --request DELETE \
--url http://localhost:38080/v1/webhooks/{webhook_id} \
--header 'X-Api-Key: <api-key>' \
--header 'anthropic-beta: <anthropic-beta>'import requests
url = "http://localhost:38080/v1/webhooks/{webhook_id}"
headers = {
"anthropic-beta": "<anthropic-beta>",
"X-Api-Key": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'anthropic-beta': '<anthropic-beta>', 'X-Api-Key': '<api-key>'}
};
fetch('http://localhost:38080/v1/webhooks/{webhook_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:38080/v1/webhooks/{webhook_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("anthropic-beta", "<anthropic-beta>")
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"type": "webhook_deleted"
}此页面对您有帮助吗?
⌘I
删除 Webhook
curl --request DELETE \
--url http://localhost:38080/v1/webhooks/{webhook_id} \
--header 'X-Api-Key: <api-key>' \
--header 'anthropic-beta: <anthropic-beta>'import requests
url = "http://localhost:38080/v1/webhooks/{webhook_id}"
headers = {
"anthropic-beta": "<anthropic-beta>",
"X-Api-Key": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'anthropic-beta': '<anthropic-beta>', 'X-Api-Key': '<api-key>'}
};
fetch('http://localhost:38080/v1/webhooks/{webhook_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:38080/v1/webhooks/{webhook_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("anthropic-beta", "<anthropic-beta>")
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"type": "webhook_deleted"
}