Skip to main content

io.enterpriseai.resources.WebhooksClient

Source: sdks/java/enterprise-ai-java/src/main/java/io/enterpriseai/resources/WebhooksClient.java. Back to the Java SDK reference index.

note

This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.

Class WebhooksClient​

Inbound webhooks (HMAC-SHA256 signed) and deliveries.

Attributes:

NameTypeRequiredDescription
DEFAULT_TOLERANCE_SECONDSlongyesDefault replay window of #verify, in seconds.

Constructor WebhooksClient​

WebhooksClient(Transport transport)

Creates the client on the shared transport; EnterpriseAIClient builds it and exposes it through the accessor of the same name.

NameTypeDefaultRequiredDescription
transportTransportyesTransport shared by the sub-clients of one client.

WebhooksClient.deliver​

JsonNode deliver(String connector, Object body)

Receive a provider webhook. Entry point for the provider, without platform authentication. Headers: X-EAI-Tenant (tenant slug, else 400 tenant_required), X-EAI-Signature (t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>." + raw body>; X-EAI-Timestamp may carry the time), optional X-EAI-Delivery (dedupe id). Steps: 1. The connector must exist, be active and have webhooks enabled (404 connector_not_found). 2. Signature checked with the stored webhook_secret or the manifest secret reference (401 invalid_signature); timestamp within 5 minutes (401 webhook_replay); a delivery already accepted answers 409 webhook_duplicate. 3. The JSON body is screened as untrusted content (prompt injection blocked), then published as connectors.<name>.webhook, which may start triggered runs. Answers 202 with delivery_id, event_id and triggered. Every delivery is recorded and audited as webhook.receive.

Route: /v1/webhooks/{connector} (POST).

NameTypeDefaultRequiredDescription
connectorStringyesName of the connector the provider sends to.
bodyObjectyesRaw provider payload; the signature is verified on these exact bytes, whatever the content type.

Returns: JsonNode. Decoded JSON answer of the operation "Receive a provider webhook".

Raises: the typed errors of the transport (Errors).

WebhooksClient.deliver​

JsonNode deliver(String connector, Object body, RequestOptions options)

Receive a provider webhook. Entry point for the provider, without platform authentication. Headers: X-EAI-Tenant (tenant slug, else 400 tenant_required), X-EAI-Signature (t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>." + raw body>; X-EAI-Timestamp may carry the time), optional X-EAI-Delivery (dedupe id). Steps: 1. The connector must exist, be active and have webhooks enabled (404 connector_not_found). 2. Signature checked with the stored webhook_secret or the manifest secret reference (401 invalid_signature); timestamp within 5 minutes (401 webhook_replay); a delivery already accepted answers 409 webhook_duplicate. 3. The JSON body is screened as untrusted content (prompt injection blocked), then published as connectors.<name>.webhook, which may start triggered runs. Answers 202 with delivery_id, event_id and triggered. Every delivery is recorded and audited as webhook.receive.

Route: /v1/webhooks/{connector} (POST).

NameTypeDefaultRequiredDescription
connectorStringyesName of the connector the provider sends to.
bodyObjectyesRaw provider payload; the signature is verified on these exact bytes, whatever the content type.
optionsRequestOptionsyesPer call options (idempotency key, traceparent, headers, abort signal).

Returns: JsonNode. Decoded JSON answer of the operation "Receive a provider webhook".

Raises: the typed errors of the transport (Errors).

WebhooksClient.deliverSigned​

JsonNode deliverSigned(String connector, byte[] payload, String secret, String tenant)

Receive a provider webhook. Entry point for the provider, without platform authentication. Headers: X-EAI-Tenant (tenant slug, else 400 tenant_required), X-EAI-Signature (t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>." + raw body>; X-EAI-Timestamp may carry the time), optional X-EAI-Delivery (dedupe id). Steps: 1. The connector must exist, be active and have webhooks enabled (404 connector_not_found). 2. Signature checked with the stored webhook_secret or the manifest secret reference (401 invalid_signature); timestamp within 5 minutes (401 webhook_replay); a delivery already accepted answers 409 webhook_duplicate. 3. The JSON body is screened as untrusted content (prompt injection blocked), then published as connectors.<name>.webhook, which may start triggered runs. Answers 202 with delivery_id, event_id and triggered. Every delivery is recorded and audited as webhook.receive.

Route: /v1/webhooks/{connector} (POST).

NameTypeDefaultRequiredDescription
connectorStringyesName of the connector the provider sends to.
payloadbyte[]yesRaw provider payload; the signature is verified on these exact bytes, whatever the content type.
secretStringyesShared secret of the HMAC-SHA256 signature put in X-EAI-Signature.
tenantStringyesTenant slug sent in X-EAI-Tenant.

Returns: JsonNode. Decoded JSON answer of the operation "Receive a provider webhook".

Raises: the typed errors of the transport (Errors).

WebhooksClient.deliverSigned​

JsonNode deliverSigned(String connector, byte[] payload, String secret, String tenant, String deliveryId)

Receive a provider webhook. Entry point for the provider, without platform authentication. Headers: X-EAI-Tenant (tenant slug, else 400 tenant_required), X-EAI-Signature (t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>." + raw body>; X-EAI-Timestamp may carry the time), optional X-EAI-Delivery (dedupe id). Steps: 1. The connector must exist, be active and have webhooks enabled (404 connector_not_found). 2. Signature checked with the stored webhook_secret or the manifest secret reference (401 invalid_signature); timestamp within 5 minutes (401 webhook_replay); a delivery already accepted answers 409 webhook_duplicate. 3. The JSON body is screened as untrusted content (prompt injection blocked), then published as connectors.<name>.webhook, which may start triggered runs. Answers 202 with delivery_id, event_id and triggered. Every delivery is recorded and audited as webhook.receive.

Route: /v1/webhooks/{connector} (POST).

NameTypeDefaultRequiredDescription
connectorStringyesName of the connector the provider sends to.
payloadbyte[]yesRaw provider payload; the signature is verified on these exact bytes, whatever the content type.
secretStringyesShared secret of the HMAC-SHA256 signature put in X-EAI-Signature.
tenantStringyesTenant slug sent in X-EAI-Tenant.
deliveryIdStringyesDelivery id sent in X-EAI-Delivery; without it a random dlv- id is generated.

Returns: JsonNode. Decoded JSON answer of the operation "Receive a provider webhook".

Raises: the typed errors of the transport (Errors).

WebhooksClient.deliveries​

Page<JsonNode> deliveries()

List the webhook deliveries. Webhook deliveries received, newest first: connector, delivery id, signature validity, status (accepted, rejected, duplicate), reason, SHA-256 of the payload and published event. The payload itself is not stored here.

Route: /v1/webhooks/deliveries (GET).

This element takes no parameter.

Returns: Page<JsonNode>. A Page: One page of a cursor paginated collection ({"items": [...], "next_cursor": "..."|null}).

Raises: the typed errors of the transport (Errors).

WebhooksClient.deliveries​

Page<JsonNode> deliveries(Map<String, ?> query)

List the webhook deliveries. Webhook deliveries received, newest first: connector, delivery id, signature validity, status (accepted, rejected, duplicate), reason, SHA-256 of the payload and published event. The payload itself is not stored here.

Route: /v1/webhooks/deliveries (GET).

NameTypeDefaultRequiredDescription
queryMap<String, ?>yesQuery string parameters of the route.

Returns: Page<JsonNode>. A Page: One page of a cursor paginated collection ({"items": [...], "next_cursor": "..."|null}).

Raises: the typed errors of the transport (Errors).