Circle V2 API Docs
    Preparing search index...
    • Wraps the AssemblyAI webhook scaffolding (auth verification, payload parsing, ack-and-log error handling) so route handlers only supply the domain callback.

      Returns a Web-standard (request: Request) => Promise<Response> so it can be assigned directly as a Next.js route handler without pulling next/server into this package.

      Parameters

      • options: CreateAssemblyAIWebhookHandlerOptions

      Returns (request: Request) => Promise<Response>

      // apps/web/app/api/webhooks/assemblyai/route.ts
      export const POST = createAssemblyAIWebhookHandler({
      onWebhook: async ({ sessionId, body }) => {
      await processAssemblyAIWebhookService({
      sessionId: parseSessionId(sessionId),
      body,
      });
      },
      });