# prov.webhooks.create

prov.webhooks.create in Python SDK.

## Signature

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

## Parameters

- `**body` (Any, optional)

## Returns

`Any`

## HTTP operation

[`POST /v1/webhook_endpoints`](https://provenanceauth.com/docs/api/webhooks.md#post-v1-webhook-endpoints): Create a webhook endpoint

## Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`invalid_json`](https://provenanceauth.com/docs/platform/errors.md#invalid_json)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`parameter_missing`](https://provenanceauth.com/docs/platform/errors.md#parameter_missing)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`usage_limit_reached`](https://provenanceauth.com/docs/platform/errors.md#usage_limit_reached)

## Example

**Node**

```ts
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();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/webhook_endpoints", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "url": "http://localhost:4242/webhooks",
    "event_types": [
        "mandate.approval.approved",
        "mandate.assessment.denied"
    ]
}).json()
```
