Skip to main content
Webhooks allow you to receive real-time notifications when events occur in your Avala account.

Webhooks

List webhooks

Retrieve a paginated list of all webhooks.
await avala.webhooks.list(options?)
options
object
Optional parameters for pagination.
limit
number
Maximum number of webhooks to return per page.
cursor
string
Cursor for pagination to fetch the next page of results.
items
Webhook[]
Array of webhook objects.
uid
string
Unique identifier for the webhook.
targetUrl
string
The URL where webhook events will be sent.
events
string[]
Array of event types this webhook subscribes to.
isActive
boolean
Whether the webhook is currently active.
createdAt
string | null
Timestamp when the webhook was created.
updatedAt
string | null
Timestamp when the webhook was last updated.
nextCursor
string | null
Cursor for the next page of results.
previousCursor
string | null
Cursor for the previous page of results.
hasMore
boolean
Whether there are more results available.

Create webhook

Create a new webhook subscription.
await avala.webhooks.create(options)
options
object
required
targetUrl
string
required
The URL where webhook events will be sent.
events
string[]
required
Array of event types to subscribe to (e.g., [“dataset.created”, “project.completed”]).
isActive
boolean
Whether the webhook should be active immediately. Defaults to true.

Get webhook

Retrieve a specific webhook by its unique identifier.
await avala.webhooks.get(uid)
uid
string
required
The unique identifier of the webhook to retrieve.

Update webhook

Update an existing webhook.
await avala.webhooks.update(uid, options)
uid
string
required
The unique identifier of the webhook to update.
options
object
required
targetUrl
string
The URL where webhook events will be sent.
events
string[]
Array of event types to subscribe to.
isActive
boolean
Whether the webhook is active.

Delete webhook

Delete a webhook.
await avala.webhooks.delete(uid)
uid
string
required
The unique identifier of the webhook to delete.

Test webhook

Send a test event to verify webhook configuration.
await avala.webhooks.test(uid)
uid
string
required
The unique identifier of the webhook to test.
success
boolean
Whether the test was successful.

Webhook deliveries

The WebhookDeliveriesResource provides methods to track and inspect webhook delivery attempts.

List webhook deliveries

Retrieve a paginated list of webhook delivery attempts.
await avala.webhookDeliveries.list(options?)
options
object
Optional parameters for pagination.
limit
number
Maximum number of deliveries to return per page.
cursor
string
Cursor for pagination to fetch the next page of results.
items
WebhookDelivery[]
Array of webhook delivery objects.
uid
string
Unique identifier for the delivery.
subscription
string
UID of the webhook subscription.
eventType
string
Type of event that triggered the delivery.
payload
object
Event payload that was sent.
responseStatus
number | null
HTTP status code returned by the target URL.
responseBody
string | null
Response body from the target URL.
attempts
number
Number of delivery attempts made.
nextRetryAt
string | null
Timestamp for the next retry attempt if applicable.
status
string | null
Current status of the delivery (e.g., “pending”, “delivered”, “failed”).
createdAt
string | null
Timestamp when the delivery was created.
updatedAt
string | null
Timestamp when the delivery was last updated.
nextCursor
string | null
Cursor for the next page of results.
previousCursor
string | null
Cursor for the previous page of results.
hasMore
boolean
Whether there are more results available.

Get webhook delivery

Retrieve details about a specific webhook delivery attempt.
await avala.webhookDeliveries.get(uid)
uid
string
required
The unique identifier of the delivery to retrieve.

Build docs developers (and LLMs) love