> ## 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.

# 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>;
};

Webhooks allow you to monitor Box content for events, and receive notifications
to a URL of your choice when they occur. For example, a workflow may include
waiting for a file to be downloaded to delete a shared link. A webhook can be
set on the file and upon notification of the download event, a script can launch
to make an API call to delete the shared link.

<Frame center shadow border>
  <img src="https://mintcdn.com/box/QQwa5kSyD2QPHaV1/images/guides/webhooks/webhooksV2preview.png?fit=max&auto=format&n=QQwa5kSyD2QPHaV1&q=85&s=7abfdaaa4d26c209f1377cf047fec25d" alt="Webhook developer console" width="3584" height="1460" data-path="images/guides/webhooks/webhooksV2preview.png" />
</Frame>

## Versions

There are two types of webhooks: V1 and V2, which are compared below.

<Note>
  For the ease of use, better security, more event triggers to choose from,
  and automatic retries we recommend to use V2 webhooks.
</Note>

| V1                                                      | V2                                                               |
| ------------------------------------------------------- | ---------------------------------------------------------------- |
| Created in the [Developer Console][console].            | Created in the [Developer Console][console] or with an API call. |
| Set at the root level.                                  | Set on specific files/folders, but cannot set at the root.       |
| Select from 14 event triggers.                          | Select from 30+ event triggers.                                  |
| Provides selected callback parameters.                  | Payload includes full object response & additional context info. |
| No retry mechanism after notification delivery failure. | Retries up to 10 times after notification delivery failure.      |
| Does not support payload verification.                  | Supports payload verification.                                   |
| Notification URL can be HTTP or HTTPS.                  | Notification URL must be HTTPS.                                  |
| Does not scale well.                                    | Scales well and has increased reliability.                       |

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

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