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

# Webhooks

> Dropbox incoming webhooks: event paths, payloads, and response data.

The Dropbox plugin handles incoming webhooks. Point your provider’s subscription URL at your Corsair HTTP handler (see [Overview](/plugins/dropbox/overview) for setup context and the exact URL shape).

<Info>
  **New to Corsair?** See [webhooks](/concepts/webhooks) and [hooks](/concepts/hooks).
</Info>

## Webhook map

* `filesystem`
  * `changed` (`filesystem.changed`)

## HTTP handler setup

```ts app/api/webhook/route.ts theme={null}
import { processWebhook } from "corsair";
import { corsair } from "@/server/corsair";

export async function POST(request: Request) {
    const headers = Object.fromEntries(request.headers);
    const body = await request.json();
    const result = await processWebhook(corsair, headers, body);
    return result.response;
}
```

## Events

## Filesystem

### Changed

`filesystem.changed`

A file or folder was added, modified, deleted, or a share link was created

**Payload**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `delta`       | `object` | No       | —           |
| `list_folder` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="delta full type">
    ```ts theme={null}
    {
      users: number[]
    }
    ```
  </Accordion>

  <Accordion title="list_folder full type">
    ```ts theme={null}
    {
      accounts: string[]
    }
    ```
  </Accordion>
</AccordionGroup>

<AccordionGroup>
  <Accordion title="Response data full type">
    ```ts theme={null}
    {
      delta?: {
        users: number[]
      },
      list_folder?: {
        accounts: string[]
      }
    }
    ```
  </Accordion>
</AccordionGroup>

**`webhookHooks` example**

```ts theme={null}
dropbox({
    webhookHooks: {
        filesystem: {
            changed: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})
```

***
