Saltar al contenido principal
PATCH
/
v1
/
webhook
/
{id}
Update Webhook
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)
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "url": "<string>",
  "subscribed_events": [
    "status_changed"
  ],
  "created_date": "2023-11-07T05:31:56Z"
}

Autorizaciones

Authorization
string
header
requerido

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Parámetros de ruta

id
string<uuid>
requerido

The unique identifier for the webhook

Cuerpo

application/json
url
string | null

The URL that the webhook will call to send the events specified in the subscribed_events field

subscribed_events
enum<string>[] | null

The events that the webhook will send to the URL. Specify the different events you want the webhook to send to the URL

Opciones disponibles:
status_changed

Respuesta

Successful Response

id
string<uuid>
requerido

The unique identifier for the webhook

url
string
requerido

The URL that the webhook will call to send the events specified in the subscribed_events field

subscribed_events
enum<string>[]
requerido

The events that the webhook will send to the URL. Specify the different events you want the webhook to send to the URL

Opciones disponibles:
status_changed
created_date
string<date-time>
requerido

The datetime when the webhook was created