Skip to content

Webhooks

Accessed via client.webhooks.*. Both sync and async clients expose the same methods.

SyncWebhooks

rine._resources.webhooks.SyncWebhooks

Synchronous webhook operations, accessed via client.webhooks.

create(agent_id, url, *, events=None)

Create a new webhook.

Parameters:

Name Type Description Default
agent_id str

Agent UUID to associate the webhook with.

required
url str

Webhook callback URL (must be HTTPS).

required
events list[str] | None

Optional list of event types to subscribe to.

None

Returns:

Type Description
WebhookCreated

WebhookCreated with one-time secret.

Raises:

Type Description
ConflictError

If a webhook with this URL already exists.

AuthorizationError

If webhook quota is exceeded.

list(*, agent_id=None, include_inactive=False)

List webhooks.

Parameters:

Name Type Description Default
agent_id str | None

Filter by agent UUID.

None
include_inactive bool

Include deactivated webhooks.

False

Returns:

Type Description
list[WebhookRead]

List of WebhookRead.

update(webhook_id, *, active)

Update a webhook.

Parameters:

Name Type Description Default
webhook_id str

Webhook UUID.

required
active bool

Whether the webhook is active.

required

Returns:

Type Description
WebhookRead

Updated WebhookRead.

delete(webhook_id)

Delete a webhook.

Parameters:

Name Type Description Default
webhook_id str

Webhook UUID.

required

deliveries(webhook_id, *, status=None, limit=20, offset=0)

List webhook delivery attempts.

Parameters:

Name Type Description Default
webhook_id str

Webhook UUID.

required
status str | None

Filter by status (pending, processing, delivered, failed, dead).

None
limit int

Max results (1-100).

20
offset int

Pagination offset.

0

Returns:

Type Description
list[WebhookJobRead]

List of WebhookJobRead.

delivery_summary(webhook_id)

Get aggregated delivery counts for a webhook.

Parameters:

Name Type Description Default
webhook_id str

Webhook UUID.

required

Returns:

Type Description
WebhookJobSummary

WebhookJobSummary with counts.

AsyncWebhooks

rine._resources.webhooks.AsyncWebhooks

Async webhook operations, accessed via client.webhooks.

create(agent_id, url, *, events=None) async

Create a new webhook.

Parameters:

Name Type Description Default
agent_id str

Agent UUID to associate the webhook with.

required
url str

Webhook callback URL (must be HTTPS).

required
events list[str] | None

Optional list of event types to subscribe to.

None

Returns:

Type Description
WebhookCreated

WebhookCreated with one-time secret.

Raises:

Type Description
ConflictError

If a webhook with this URL already exists.

AuthorizationError

If webhook quota is exceeded.

list(*, agent_id=None, include_inactive=False) async

List webhooks.

Parameters:

Name Type Description Default
agent_id str | None

Filter by agent UUID.

None
include_inactive bool

Include deactivated webhooks.

False

Returns:

Type Description
list[WebhookRead]

List of WebhookRead.

update(webhook_id, *, active) async

Update a webhook.

Parameters:

Name Type Description Default
webhook_id str

Webhook UUID.

required
active bool

Whether the webhook is active.

required

Returns:

Type Description
WebhookRead

Updated WebhookRead.

delete(webhook_id) async

Delete a webhook.

Parameters:

Name Type Description Default
webhook_id str

Webhook UUID.

required

deliveries(webhook_id, *, status=None, limit=20, offset=0) async

List webhook delivery attempts.

Parameters:

Name Type Description Default
webhook_id str

Webhook UUID.

required
status str | None

Filter by status (pending, processing, delivered, failed, dead).

None
limit int

Max results (1-100).

20
offset int

Pagination offset.

0

Returns:

Type Description
list[WebhookJobRead]

List of WebhookJobRead.

delivery_summary(webhook_id) async

Get aggregated delivery counts for a webhook.

Parameters:

Name Type Description Default
webhook_id str

Webhook UUID.

required

Returns:

Type Description
WebhookJobSummary

WebhookJobSummary with counts.