SDK reference · Python SDK

prov.webhooks.create

prov.webhooks.create in Python SDK.

Signature

prov.webhooks.create(**body: Any = …) -> Any

Parameters

**bodyAny

Request fields

Idempotency-Keystringheader
Retry a create safely: the same key + request returns the stored response (24 h, per caller).
urlstringRequired
A URL.
event_typesarray of strings
The event types, or * for all.
api_versionstring
The API version deliveries are rendered at, such as 2026-11-30. Defaults to the version this request uses.

Returns

Any The endpoint, with its secret. The secret is shown only once.

HTTP operation

POST /v1/webhook_endpoints: Create a webhook endpoint

Errors

Example

const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "url": "http://localhost:4242/webhooks",
    "event_types": [
      "mandate.approval.approved",
      "mandate.assessment.denied"
    ]
  }),
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.