Skip to main content

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.

The Airtable 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

  • events
    • event (events.event)

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

Events

Event

events.event On new Airtable event — fires when records or tables change Payload
NameTypeRequiredDescription
baseobjectYes
webhookobjectYes
timestampstringYes
actionMetadataobjectNo
{
  id: string
}
{
  id: string
}
{
  source?: string,
  sourceMetadata?: {
    user?: {
      id: string,
      email?: string,
      name?: string
    }
  }
}
{
  base: {
    id: string
  },
  webhook: {
    id: string
  },
  timestamp: string,
  actionMetadata?: {
    source?: string,
    sourceMetadata?: {
      user?: {
        id: string,
        email?: string,
        name?: string
      }
    }
  }
}
webhookHooks example
airtable({
    webhookHooks: {
        events: {
            event: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})