Skip to main content
The Dropbox plugin handles incoming webhooks. Point your provider’s subscription URL at your Corsair HTTP handler (see Overview for setup context and the exact URL shape).
New to Corsair? See webhooks and hooks.

Webhook map

  • filesystem
    • changed (filesystem.changed)

HTTP handler setup

app/api/webhook/route.ts
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
NameTypeRequiredDescription
deltaobjectNo
list_folderobjectNo
{
  users: number[]
}
{
  accounts: string[]
}
{
  delta?: {
    users: number[]
  },
  list_folder?: {
    accounts: string[]
  }
}
webhookHooks example
dropbox({
    webhookHooks: {
        filesystem: {
            changed: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})