Skip to main content

list

List all webhooks.
client.webhooks.list(
    limit=10,
    cursor="abc123"
)
limit
int
Maximum number of items to return per page
cursor
str
Pagination cursor for fetching the next page
data
List[Webhook]
List of webhook objects
next_cursor
str | None
Cursor for the next page, or None if no more results

get

Retrieve a specific webhook by UID.
client.webhooks.get("wh_abc123")
uid
str
required
Unique identifier of the webhook
uid
str
Unique identifier for the webhook
target_url
str
URL where webhook events will be sent
events
List[str]
List of event types this webhook subscribes to
is_active
bool
Whether the webhook is currently active
created_at
str
Timestamp when the webhook was created

create

Create a new webhook.
client.webhooks.create(
    target_url="https://example.com/webhook",
    events=["dataset.created", "task.completed", "export.finished"],
    is_active=True,
    secret="your-webhook-secret"
)
target_url
str
required
URL where webhook POST requests will be sent
events
List[str]
required
List of event types to subscribe to (e.g., “dataset.created”, “task.completed”, “export.finished”)
is_active
bool
Whether the webhook should be active immediately (default: true)
secret
str
Secret key used to sign webhook payloads for verification
uid
str
Unique identifier for the webhook
target_url
str
Configured target URL
events
List[str]
Subscribed event types
is_active
bool
Active status

update

Update an existing webhook.
client.webhooks.update(
    "wh_abc123",
    target_url="https://example.com/new-webhook",
    events=["dataset.created", "dataset.updated"],
    is_active=False
)
uid
str
required
Unique identifier of the webhook to update
target_url
str
Updated target URL
events
List[str]
Updated list of event types
is_active
bool
Updated active status
uid
str
Unique identifier for the webhook
target_url
str
Updated target URL
events
List[str]
Updated event types
is_active
bool
Updated active status

delete

Delete a webhook.
client.webhooks.delete("wh_abc123")
uid
str
required
Unique identifier of the webhook to delete

test

Send a test event to a webhook to verify it’s working.
client.webhooks.test("wh_abc123")
uid
str
required
Unique identifier of the webhook to test
success
bool
Whether the test delivery was successful
status_code
int
HTTP status code returned by the webhook endpoint
response_time_ms
float
Response time in milliseconds
message
str
Test result message or error details

Webhook Deliveries

The client.webhook_deliveries resource allows you to inspect webhook delivery attempts and their results.

list

List webhook delivery attempts.
client.webhook_deliveries.list(
    limit=20,
    cursor="abc123"
)
limit
int
Maximum number of items to return per page
cursor
str
Pagination cursor for fetching the next page
data
List[WebhookDelivery]
List of webhook delivery objects
next_cursor
str | None
Cursor for the next page, or None if no more results

get

Retrieve details about a specific webhook delivery.
client.webhook_deliveries.get("delivery_abc123")
uid
str
required
Unique identifier of the webhook delivery
uid
str
Unique identifier for the delivery
webhook_uid
str
UID of the webhook that was triggered
event_type
str
The type of event that triggered this delivery
status
str
Delivery status: “pending”, “success”, “failed”
status_code
int
HTTP status code returned by the webhook endpoint
response_time_ms
float
Response time in milliseconds
attempts
int
Number of delivery attempts made
created_at
str
Timestamp when the delivery was created
completed_at
str
Timestamp when the delivery was completed (success or final failure)

Example: Monitor webhook deliveries

# List recent webhook deliveries
deliveries = client.webhook_deliveries.list(limit=10)

for delivery in deliveries:
    print(f"Event: {delivery.event_type}")
    print(f"Status: {delivery.status}")
    print(f"Attempts: {delivery.attempts}")
    
    if delivery.status == "failed":
        # Get full details for failed deliveries
        details = client.webhook_deliveries.get(delivery.uid)
        print(f"Status code: {details.status_code}")
        print(f"Response time: {details.response_time_ms}ms")

Async Methods

All methods are available in async form through AsyncClient:
# Webhooks
await client.webhooks.list()
await client.webhooks.get("wh_abc123")
await client.webhooks.create(
    target_url="https://example.com/webhook",
    events=["dataset.created"]
)
await client.webhooks.update("wh_abc123", is_active=False)
await client.webhooks.delete("wh_abc123")
await client.webhooks.test("wh_abc123")

# Webhook Deliveries
await client.webhook_deliveries.list()
await client.webhook_deliveries.get("delivery_abc123")

Build docs developers (and LLMs) love