Subscribe an endpoint to request webhooks
POST /Platform/jobs/webhooks
Subscribe an endpoint to request webhooks.
Registers an HTTPS endpoint for request.completed and
request.failed events of this organization's requests. No event
is delivered until the endpoint passes the verification handshake
(the webhook verification route).
Body parameters
url: str. HTTPS endpoint. Rejected unless https and publicly routable (private / link-local / loopback / metadata IP ranges are refused at registration AND again at every delivery).paths: optional List[Any]. Glob patterns matched against the declared route template, lowercase (e.g.["/vet/*", "/vet/consult"]). Path params match as their template form. Empty/omitted = all routes.events: optional List[Any]. Subset of["request.completed", "request.failed"]; empty = both. Payloads carrymode: "sync"|"async"— the events are generic across sync and async requests.match: optional dict. Shallow dotted-path equality/subset predicate evaluated ONCE at completion time against the full result, e.g.{"result.escalation": true}. Not a query language;None= always.payload_mode: optional str."full"delivers the complete result inline (withresult_refwhen it was stored as a value)."thin"delivers only{async_id, path, status, event}— the consumer fetches the result via thepoll_asyncoperation with its own credentials. Use thin for endpoints less trusted than the API.max_retries: optional int. Delivery attempts before the delivery is abandoned.timeout_seconds: optional float. Per-attempt HTTP timeout (hard cap 10s).
Returns
WebhookCreated
id: str. Webhook subscription identifier.secret: str. New signing secret; store it securely when issued.verification: "pending". Endpoint verification has not completed.
Example request
curl -X POST "https://api.hilus.ai/Platform/jobs/webhooks" \
-H "Authorization: Bearer $HILUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'