Skip to main content
PATCH
/
webhooks
/
{webhook_id}
Python
import os
from datagrid_ai import Datagrid

client = Datagrid(
    api_key=os.environ.get("DATAGRID_API_KEY"),  # This is the default and can be omitted
)
webhook = client.webhooks.update(
    webhook_id="webhook_id",
)
print(webhook.id)
{
  "object": "webhook",
  "id": "<string>",
  "url": "<string>",
  "events": [
    "<string>"
  ],
  "enabled": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

webhook_id
string
required

The ID of the webhook to update.

Body

application/json
url
string

Updated HTTPS destination URL.

events
string[]

Updated set of event type subscriptions.

Minimum array length: 1
enabled
boolean

Enable or disable webhook delivery.

Response

Successfully updated webhook

The webhook object represents an outbound webhook subscription.

object
enum<string>
required

The object type, which is always webhook.

Available options:
webhook
id
string
required

The webhook identifier.

url
string
required

The destination URL for webhook deliveries.

events
string[]
required

The subscribed event types.

enabled
boolean
required

Whether delivery is enabled for this webhook.

created_at
string<date-time>
required

The ISO string for when the webhook was created.

updated_at
string<date-time>
required

The ISO string for when the webhook was last updated.