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 Cal.com 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).
Webhook map
bookings
bookingCancelled (bookings.bookingCancelled)
bookingCreated (bookings.bookingCreated)
bookingRescheduled (bookings.bookingRescheduled)
meetingEnded (bookings.meetingEnded)
system
HTTP handler setup
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
Bookings
Booking Cancelled
bookings.bookingCancelled
A booking was cancelled
Payload
Name Type Required Description triggerEventBOOKING_CANCELLEDYes — createdAtstringYes — payloadobjectYes —
{
bookingId ?: number ,
uid : string ,
title ?: string ,
description ?: string | null ,
status ?: string ,
startTime ?: string ,
endTime ?: string ,
length ?: number ,
eventTypeId ?: number ,
meetingUrl ?: string | null ,
location ?: string | null ,
cancellationReason ?: string | null ,
reschedulingReason ?: string | null ,
rescheduledFromUid ?: string | null ,
attendees ?: {
name: string ,
email: string ,
timeZone? : string ,
language? : {
},
absent? : boolean
}[],
hosts ?: {
id: number ,
name: string ,
email? : string ,
username? : string ,
timeZone? : string
}[],
metadata ?: {
} | null
}
{
triggerEvent : BOOKING_CANCELLED ,
createdAt : string ,
payload : {
bookingId ?: number ,
uid : string ,
title ?: string ,
description ?: string | null ,
status ?: string ,
startTime ?: string ,
endTime ?: string ,
length ?: number ,
eventTypeId ?: number ,
meetingUrl ?: string | null ,
location ?: string | null ,
cancellationReason ?: string | null ,
reschedulingReason ?: string | null ,
rescheduledFromUid ?: string | null ,
attendees ?: {
name: string ,
email: string ,
timeZone? : string ,
language? : {
},
absent? : boolean
}[],
hosts ?: {
id: number ,
name: string ,
email? : string ,
username? : string ,
timeZone? : string
}[],
metadata ?: {
} | null
}
}
webhookHooks example
cal ({
webhookHooks: {
bookings: {
bookingCancelled: {
before ( ctx , args ) {
return { ctx , args };
},
after ( ctx , response ) {
},
},
},
},
})
Booking Created
bookings.bookingCreated
A new booking was created
Payload
Name Type Required Description triggerEventBOOKING_CREATEDYes — createdAtstringYes — payloadobjectYes —
{
bookingId ?: number ,
uid : string ,
title ?: string ,
description ?: string | null ,
status ?: string ,
startTime ?: string ,
endTime ?: string ,
length ?: number ,
eventTypeId ?: number ,
meetingUrl ?: string | null ,
location ?: string | null ,
cancellationReason ?: string | null ,
reschedulingReason ?: string | null ,
rescheduledFromUid ?: string | null ,
attendees ?: {
name: string ,
email: string ,
timeZone? : string ,
language? : {
},
absent? : boolean
}[],
hosts ?: {
id: number ,
name: string ,
email? : string ,
username? : string ,
timeZone? : string
}[],
metadata ?: {
} | null
}
{
triggerEvent : BOOKING_CREATED ,
createdAt : string ,
payload : {
bookingId ?: number ,
uid : string ,
title ?: string ,
description ?: string | null ,
status ?: string ,
startTime ?: string ,
endTime ?: string ,
length ?: number ,
eventTypeId ?: number ,
meetingUrl ?: string | null ,
location ?: string | null ,
cancellationReason ?: string | null ,
reschedulingReason ?: string | null ,
rescheduledFromUid ?: string | null ,
attendees ?: {
name: string ,
email: string ,
timeZone? : string ,
language? : {
},
absent? : boolean
}[],
hosts ?: {
id: number ,
name: string ,
email? : string ,
username? : string ,
timeZone? : string
}[],
metadata ?: {
} | null
}
}
webhookHooks example
cal ({
webhookHooks: {
bookings: {
bookingCreated: {
before ( ctx , args ) {
return { ctx , args };
},
after ( ctx , response ) {
},
},
},
},
})
Booking Rescheduled
bookings.bookingRescheduled
A booking was rescheduled
Payload
Name Type Required Description triggerEventBOOKING_RESCHEDULEDYes — createdAtstringYes — payloadobjectYes —
{
bookingId ?: number ,
uid : string ,
title ?: string ,
description ?: string | null ,
status ?: string ,
startTime ?: string ,
endTime ?: string ,
length ?: number ,
eventTypeId ?: number ,
meetingUrl ?: string | null ,
location ?: string | null ,
cancellationReason ?: string | null ,
reschedulingReason ?: string | null ,
rescheduledFromUid ?: string | null ,
attendees ?: {
name: string ,
email: string ,
timeZone? : string ,
language? : {
},
absent? : boolean
}[],
hosts ?: {
id: number ,
name: string ,
email? : string ,
username? : string ,
timeZone? : string
}[],
metadata ?: {
} | null
}
{
triggerEvent : BOOKING_RESCHEDULED ,
createdAt : string ,
payload : {
bookingId ?: number ,
uid : string ,
title ?: string ,
description ?: string | null ,
status ?: string ,
startTime ?: string ,
endTime ?: string ,
length ?: number ,
eventTypeId ?: number ,
meetingUrl ?: string | null ,
location ?: string | null ,
cancellationReason ?: string | null ,
reschedulingReason ?: string | null ,
rescheduledFromUid ?: string | null ,
attendees ?: {
name: string ,
email: string ,
timeZone? : string ,
language? : {
},
absent? : boolean
}[],
hosts ?: {
id: number ,
name: string ,
email? : string ,
username? : string ,
timeZone? : string
}[],
metadata ?: {
} | null
}
}
webhookHooks example
cal ({
webhookHooks: {
bookings: {
bookingRescheduled: {
before ( ctx , args ) {
return { ctx , args };
},
after ( ctx , response ) {
},
},
},
},
})
Meeting Ended
bookings.meetingEnded
A meeting ended
Payload
Name Type Required Description triggerEventMEETING_ENDEDYes — createdAtstringYes — payloadobjectYes —
{
bookingId ?: number ,
uid : string ,
title ?: string ,
description ?: string | null ,
status ?: string ,
startTime ?: string ,
endTime ?: string ,
length ?: number ,
eventTypeId ?: number ,
meetingUrl ?: string | null ,
location ?: string | null ,
cancellationReason ?: string | null ,
reschedulingReason ?: string | null ,
rescheduledFromUid ?: string | null ,
attendees ?: {
name: string ,
email: string ,
timeZone? : string ,
language? : {
},
absent? : boolean
}[],
hosts ?: {
id: number ,
name: string ,
email? : string ,
username? : string ,
timeZone? : string
}[],
metadata ?: {
} | null
}
{
triggerEvent : MEETING_ENDED ,
createdAt : string ,
payload : {
bookingId ?: number ,
uid : string ,
title ?: string ,
description ?: string | null ,
status ?: string ,
startTime ?: string ,
endTime ?: string ,
length ?: number ,
eventTypeId ?: number ,
meetingUrl ?: string | null ,
location ?: string | null ,
cancellationReason ?: string | null ,
reschedulingReason ?: string | null ,
rescheduledFromUid ?: string | null ,
attendees ?: {
name: string ,
email: string ,
timeZone? : string ,
language? : {
},
absent? : boolean
}[],
hosts ?: {
id: number ,
name: string ,
email? : string ,
username? : string ,
timeZone? : string
}[],
metadata ?: {
} | null
}
}
webhookHooks example
cal ({
webhookHooks: {
bookings: {
meetingEnded: {
before ( ctx , args ) {
return { ctx , args };
},
after ( ctx , response ) {
},
},
},
},
})
System
Ping
system.ping
Ping test to verify webhook endpoint
Payload
Name Type Required Description triggerEventPINGYes — createdAtstringNo — payloadobjectNo —
{
triggerEvent : PING ,
createdAt ?: string ,
payload ?: {
}
}
webhookHooks example
cal ({
webhookHooks: {
system: {
ping: {
before ( ctx , args ) {
return { ctx , args };
},
after ( ctx , response ) {
},
},
},
},
})