> ## Documentation Index
> Fetch the complete documentation index at: https://developer.box.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Webhooks

export const MultiRelatedLinks = ({sections = []}) => {
  if (!sections || sections.length === 0) {
    return null;
  }
  return <div className="space-y-8">
      {sections.map((section, index) => <RelatedLinks key={index} title={section.title} items={section.items} />)}
    </div>;
};

export const RelatedLinks = ({title, items = []}) => {
  const getBadgeClass = badge => {
    if (!badge) return "badge-default";
    const badgeType = badge.toLowerCase().replace(/\s+/g, "-");
    return `badge-${badge === "ガイド" ? "guide" : badgeType}`;
  };
  if (!items || items.length === 0) {
    return null;
  }
  return <div className="my-8">
      {}
      <h3 className="text-sm font-bold uppercase tracking-wider mb-4">{title}</h3>

      {}
      <div className="flex flex-col gap-3">
        {items.map((item, index) => <a key={index} href={item.href} className="py-2 px-3 rounded related_link hover:bg-[#f2f2f2] dark:hover:bg-[#111827] flex items-center gap-3 group no-underline hover:no-underline border-b-0">
            {}
            <span className={`px-2 py-1 rounded-full text-xs font-semibold uppercase tracking-wide flex-shrink-0 ${getBadgeClass(item.badge)}`}>
              {item.badge}
            </span>

            {}
            <span className="text-base">{item.label}</span>
          </a>)}
      </div>
    </div>;
};

export const Link = ({href, children, className, ...props}) => {
  const localizedHref = localizeLink(href);
  return <a href={localizedHref} className={className} {...props}>
      {children}
    </a>;
};

<RelatedLinks
  title="REQUIRED GUIDES"
  items={[
{ label: translate("List Webhooks for a User"), href: "/guides/webhooks/v2/list-v2", badge: "GUIDE" }
]}
/>

You can update a webhook using the [Developer Console][console] or API.

## Developer Console

To update a webhook in the [Developer Console][console], follow the steps below.

1. Go to the **Webhooks** tab in the [Developer Console][console] to display all webhooks.
2. Select the webhook you want to update by clicking on its ID.
3. Click the **Edit webhook** button.
4. Fill in the data you want to update.
5. Click the **Update** button to save your changes.

<Note>
  The list of webhooks contains the following fields:
  **ID**, **Address**, **Content**, **Created by**,
  and **Created date**.
</Note>

## API

To update a webhook, use the <Link href="/reference/put-webhooks-id">update webhook</Link> endpoint,
which requires the webhook ID. To find the ID of the webhook, use the
<Link href="/guides/webhooks/v2/list-v2">list all webhooks</Link> endpoint.

<CodeGroup>
  ```sh cURL theme={null}
  curl -i -X PUT "https://api.box.com/2.0/webhooks/3321123" \
       -H "authorization: Bearer <ACCESS_TOKEN>" \
       -H "content-type: application/json" \
       -d '{
         "triggers": [
           "FILE.DOWNLOADED"
         ]
       }'
  ```

  ```typescript Node/TypeScript v10 theme={null}
  await client.webhooks.updateWebhookById(webhook.id!, {
    requestBody: {
      address: 'https://example.com/updated-webhook',
    } satisfies UpdateWebhookByIdRequestBody,
  } satisfies UpdateWebhookByIdOptionalsInput);
  ```

  ```python Python v10 theme={null}
  client.webhooks.update_webhook_by_id(
      webhook.id, address="https://example.com/updated-webhook"
  )
  ```

  ```csharp .NET v10 theme={null}
  await client.Webhooks.UpdateWebhookByIdAsync(webhookId: NullableUtils.Unwrap(webhook.Id), requestBody: new UpdateWebhookByIdRequestBody() { Address = "https://example.com/updated-webhook" });
  ```

  ```swift Swift v10 theme={null}
  try await client.webhooks.updateWebhookById(webhookId: webhook.id!, requestBody: UpdateWebhookByIdRequestBody(address: "https://example.com/updated-webhook"))
  ```

  ```java Java v10 theme={null}
  client.getWebhooks().updateWebhookById(webhook.getId(), new UpdateWebhookByIdRequestBody.Builder().address("https://example.com/updated-webhook").build())
  ```

  ```java Java v5 theme={null}
  BoxWebHook webhook = new BoxWebHook(api, id);
  BoxWebHook.Info info = webhook.new Info();
  info.setAddress(url);
  webhook.update(info);
  ```

  ```py Python v4 theme={null}
  update_object = {
      'triggers': ['FILE.COPIED'],
      'address': 'https://newexample.com',
  }
  webhook = client.webhook(webhook_id='12345').update_info(data=update_object)
  print(f'Updated the webhook info for triggers: {webhook.triggers} and address: {webhook.address}')
  ```

  ```csharp .NET v6 theme={null}
  var updates = new BoxWebhookRequest()
  {
      Id = "12345",
      Address = "https://example.com/webhooks/fileActions
  };
  BoxWebhook updatedWebhook = await client.WebhooksManager.UpdateWebhookAsync(updates);
  ```

  ```js Node v4 theme={null}
  client.webhooks.update('678901', {address: "https://example.com/webhooks/fileActions"})
   .then(webhook => {
    /* webhook -> {
     id: '1234',
     type: 'webhook',
     target: { id: '22222', type: 'folder' },
     created_by: 
     { type: 'user',
      id: '33333',
      name: 'Example User',
      login: 'user@example.com' },
     created_at: '2016-05-09T17:41:27-07:00',
     address: 'https://example.com/webhooks/fileActions',
     triggers: [ 'FILE.DOWNLOADED', 'FILE.UPLOADED' ] }
    */
   });
  ```
</CodeGroup>

[console]: https://app.box.com/developers/console

<RelatedLinks
  title="RELATED APIS"
  items={[
{ label: translate("Update webhook"), href: "/reference/put-webhooks-id", badge: "PUT" },
{ label: translate("List all webhooks"), href: "/reference/get-webhooks", badge: "GET" }
]}
/>

<RelatedLinks
  title="RELATED GUIDES"
  items={[
{ label: translate("Create Webhooks"), href: "/guides/webhooks/v2/create-v2", badge: "GUIDE" },
{ label: translate("List Webhooks for a User"), href: "/guides/webhooks/v2/list-v2", badge: "GUIDE" }
]}
/>
