Webhooks
Update Webhook
Update a webhook’s URL and/or subscribed events. The signing secret cannot be changed here — use the rotate endpoint.
PATCH
Update Webhook
Autorizaciones
Cuerpo
application/json
Respuesta
Successful Response
Update Webhook
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Update a webhook’s URL and/or subscribed events. The signing secret cannot be changed here — use the rotate endpoint.
import requests
url = "https://api.diga.io/v1/webhook/{id}"
payload = {
"url": "<string>",
"subscribed_events": ["status_changed"]
}
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>', subscribed_events: ['status_changed']})
};
fetch('https://api.diga.io/v1/webhook/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://api.diga.io/v1/webhook/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"subscribed_events": [
"status_changed"
]
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.diga.io/v1/webhook/{id}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"subscribed_events\": [\n \"status_changed\"\n ]\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))
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"subscribed_events": [
"status_changed"
],
"created_date": "2023-11-07T05:31:56Z"
}{
"status": "error",
"error_code": "INTERNAL_SERVER_ERROR",
"message": "Missing required permissions"
}{
"status": "error",
"error_code": "WEBHOOK_NOT_FOUND",
"message": "Error from WebhookNotFoundException"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"status": "error",
"error_code": "INTERNAL_SERVER_ERROR",
"message": "Error: Internal Server Error"
}Successful Response
import requests
url = "https://api.diga.io/v1/webhook/{id}"
payload = {
"url": "<string>",
"subscribed_events": ["status_changed"]
}
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>', subscribed_events: ['status_changed']})
};
fetch('https://api.diga.io/v1/webhook/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://api.diga.io/v1/webhook/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"subscribed_events": [
"status_changed"
]
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.diga.io/v1/webhook/{id}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"subscribed_events\": [\n \"status_changed\"\n ]\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))
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"subscribed_events": [
"status_changed"
],
"created_date": "2023-11-07T05:31:56Z"
}{
"status": "error",
"error_code": "INTERNAL_SERVER_ERROR",
"message": "Missing required permissions"
}{
"status": "error",
"error_code": "WEBHOOK_NOT_FOUND",
"message": "Error from WebhookNotFoundException"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"status": "error",
"error_code": "INTERNAL_SERVER_ERROR",
"message": "Error: Internal Server Error"
}