> ## AI Agent Context > Get the complete documentation index at: https://aistudio.google.com/llms.txt > Use this file to discover all available pages. > For the full documentation in a single file, fetch: https://aistudio.google.com/llms-full.txt # Updating a webhook {% callout type="note" %} This API is in Beta. Endpoints are under `/v1beta/`. {% /callout %} {% mark class="http-patch" %}{% icon name="north_east" /%}`PATCH`{% /mark %} `https://generativelanguage.googleapis.com/v1beta/webhooks/{id}` Updates an existing Webhook. {% two-column-layout %} {% left-column %} ## Parameters {% class="hide-from-toc" id="parameters" %} {% section class="api-ref-property-list" %} **id**: {% mark %}required{% /mark %} `string` The ID of the webhook to update. {% /section %} ## Request Body {% class="hide-from-toc" id="request-body" %} {% section class="api-ref-property-list" %} {% details %} {% summary %} **webhook**: {% mark %}required{% /mark %} `WebhookUpdate` The webhook to update. {% /summary %} **name**: `string` Optional. The user-provided name of the webhook. **uri**: `string` Optional. The URI to which webhook events will be sent. **subscribed_events**: `string array` Optional. The events that the webhook is subscribed to. Available events: - batch.succeeded - batch.expired - batch.failed - interaction.requires_action - interaction.completed - interaction.failed - video.generated {% details %} {% summary %} **state**: `string enum` Optional. The state of the webhook. {% /summary %} Possible values: - `enabled`: The webhook is enabled. - `disabled`: The webhook is disabled by the user. - `disabled_due_to_failed_deliveries`: The webhook is disabled due to failed deliveries. {% /details %} {% /details %} {% hr /%} **id**: {% mark %}required{% /mark %} `string` The ID of the webhook to update. {% hr /%} **update_mask**: `string` Optional. The list of fields to update. {% /section %} {% /left-column %} {% right-column class="sticky" %} **Example request** {% class="example-heading" %} {% tabs %} {% tab label="REST" %} ```sh curl -X PATCH "https://generativelanguage.googleapis.com/v1beta/webhooks/$WEBHOOK_ID" \ -H "x-goog-api-key: $GEMINI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "webhook": { "name": "string" }, "id": "string" }' ``` {% /tab %} {% /tabs %} {% /right-column %} {% /two-column-layout %} {% two-column-layout %} {% left-column %} ## Response {% class="hide-from-toc" id="response" %} {% section class="api-ref-property-list" %} **uri**: {% mark %}required{% /mark %} `string` The URI to which webhook events will be sent. {% hr /%} **subscribed_events**: {% mark %}required{% /mark %} `string array` The events that the webhook is subscribed to. Available events: - batch.succeeded - batch.expired - batch.failed - interaction.requires_action - interaction.completed - interaction.failed - video.generated {% hr /%} **name**: `string` Optional. The user-provided name of the webhook. {% hr /%} **create_time**: `string` Output only. The timestamp when the webhook was created. {% hr /%} **update_time**: `string` Output only. The timestamp when the webhook was last updated. {% hr /%} {% details %} {% summary %} **signing_secrets**: `SigningSecret array` Output only. The signing secrets associated with this webhook. {% /summary %} **truncated_secret**: `string` Output only. The truncated version of the signing secret. **expire_time**: `string` Output only. The expiration date of the signing secret. {% /details %} {% hr /%} {% details %} {% summary %} **state**: `string enum` Output only. The state of the webhook. {% /summary %} Possible values: - `enabled`: The webhook is enabled. - `disabled`: The webhook is disabled by the user. - `disabled_due_to_failed_deliveries`: The webhook is disabled due to failed deliveries. {% /details %} {% hr /%} **new_signing_secret**: `string` Output only. The new signing secret for the webhook. Only populated on create. {% hr /%} **id**: `string` Output only. The ID of the webhook. {% /section %} {% /left-column %} {% right-column class="sticky" %} **Example response** {% class="example-heading" %} ```json { "uri": "string", "subscribed_events": [ "string" ], "name": "string", "create_time": "string", "update_time": "string", "signing_secrets": [ { "truncated_secret": "string", "expire_time": "string" } ], "state": "enabled", "new_signing_secret": "string", "id": "string" } ``` {% /right-column %} {% /two-column-layout %}