## Update

`projects.webhook_endpoints.update(strwebhook_endpoint_id, WebhookEndpointUpdateParams**kwargs)  -> WebhookEndpointUpdateResponse`

**put** `/projects/{projectId}/webhook-endpoints/{webhookEndpointId}`

Update a particular webhook endpoint for a project

### Parameters

- `project_id: str`

- `webhook_endpoint_id: str`

- `description: Optional[str]`

  A description of the webhook endpoint

- `enabled: Optional[bool]`

  Whether the webhook is enabled

- `enabled_events: Optional[List[Literal["*", "asset.download.completed", "asset.download.created", 16 more]]]`

  The events that trigger the webhook. ['*'] indicates that all events are enabled

  - `"*"`

  - `"asset.download.completed"`

  - `"asset.download.created"`

  - `"asset.download.failed"`

  - `"generation.completed"`

  - `"generation.created"`

  - `"generation.failed"`

  - `"inference.cancelled"`

  - `"inference.completed"`

  - `"inference.created"`

  - `"inference.failed"`

  - `"model.download.completed"`

  - `"model.download.created"`

  - `"model.download.failed"`

  - `"model.training.cancelled"`

  - `"model.training.completed"`

  - `"model.training.failed"`

  - `"model.training.started"`

  - `"team.credit.threshold.crossed"`

- `url: Optional[str]`

  The URL of the webhook endpoint. Must be an absolute http(s) URL

### Returns

- `class WebhookEndpointUpdateResponse: …`

  - `webhook_endpoint: WebhookEndpoint`

    - `id: str`

      The ID of the webhook endpoint

    - `created_at: str`

      The date and time the webhook endpoint was created

    - `enabled: bool`

      Whether the webhook is enabled

    - `enabled_events: List[Literal["*", "asset.download.completed", "asset.download.created", 16 more]]`

      The events that trigger the webhook. ['*'] indicates that all events are enabled

      - `"*"`

      - `"asset.download.completed"`

      - `"asset.download.created"`

      - `"asset.download.failed"`

      - `"generation.completed"`

      - `"generation.created"`

      - `"generation.failed"`

      - `"inference.cancelled"`

      - `"inference.completed"`

      - `"inference.created"`

      - `"inference.failed"`

      - `"model.download.completed"`

      - `"model.download.created"`

      - `"model.download.failed"`

      - `"model.training.cancelled"`

      - `"model.training.completed"`

      - `"model.training.failed"`

      - `"model.training.started"`

      - `"team.credit.threshold.crossed"`

    - `nb_failed_calls: float`

      The number of calls to the webhook endpoint that have failed

    - `nb_total_calls: float`

      The number of calls to the webhook endpoint

    - `owner_id: str`

      The ID of the owner of the webhook endpoint: a project id for job
      lifecycle events, a team id for alert events

    - `owner_type: Literal["project", "team"]`

      Whether the owner is a project or a team. Required to tell them apart: a
      project created before the team/project split shares its team's id

      - `"project"`

      - `"team"`

    - `updated_at: str`

      The date and time the webhook endpoint was updated

    - `url: str`

      The URL of the webhook endpoint

    - `description: Optional[str]`

      A description of the webhook endpoint

### Example

```python
import os
from scenario_sdk import Scenario

client = Scenario(
    api_key=os.environ.get("SCENARIO_SDK_API_KEY"),  # This is the default and can be omitted
    api_secret=os.environ.get("SCENARIO_SDK_API_SECRET"),  # This is the default and can be omitted
)
webhook_endpoint = client.projects.webhook_endpoints.update(
    webhook_endpoint_id="webhookEndpointId",
    project_id="projectId",
)
print(webhook_endpoint.webhook_endpoint)
```

#### Response

```json
{
  "webhookEndpoint": {
    "id": "id",
    "createdAt": "createdAt",
    "enabled": true,
    "enabledEvents": [
      "*"
    ],
    "nbFailedCalls": 0,
    "nbTotalCalls": 0,
    "ownerId": "ownerId",
    "ownerType": "project",
    "updatedAt": "updatedAt",
    "url": "url",
    "description": "description"
  }
}
```
