Skip to main content
The Calendly 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

  • eventTypes
    • updated (eventTypes.updated)
  • invitees
    • canceled (invitees.canceled)
    • created (invitees.created)
    • noShow (invitees.noShow)
  • routingForms
    • submission (routingForms.submission)
  • users
    • updated (users.updated)

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

Event Types

Updated

eventTypes.updated An event type was updated Payload
NameTypeRequiredDescription
eventevent_type.updatedYes
timestringYes
payloadobjectYes
{
  uri: string,
  name?: string,
  active?: boolean,
  slug?: string,
  scheduling_url?: string,
  duration?: number,
  kind?: string,
  color?: string,
  updated_at?: string
}
{
  event: event_type.updated,
  time: string,
  payload: {
    uri: string,
    name?: string,
    active?: boolean,
    slug?: string,
    scheduling_url?: string,
    duration?: number,
    kind?: string,
    color?: string,
    updated_at?: string
  }
}
webhookHooks example
calendly({
    webhookHooks: {
        eventTypes: {
            updated: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Invitees

Canceled

invitees.canceled An invitee canceled a meeting Payload
NameTypeRequiredDescription
eventinvitee.canceledYes
timestringYes
payloadobjectYes
{
  uri: string,
  email: string,
  name: string,
  status?: active | canceled,
  event: string,
  timezone?: string,
  created_at: string,
  updated_at: string,
  cancel_url?: string,
  reschedule_url?: string,
  tracking?: {
  },
  questions_and_answers?: {
  }[],
  payment?: {
  } | null,
  no_show?: {
    uri: string
  } | null,
  rescheduled?: boolean,
  old_invitee?: string | null,
  new_invitee?: string | null,
  routing_form_submission?: string | null,
  scheduled_event?: {
    uri: string,
    name?: string,
    status?: active | canceled,
    start_time: string,
    end_time: string,
    event_type: string,
    location?: {
      type: string,
      location?: string,
      join_url?: string
    },
    invitees_counter?: {
      total: number,
      active: number,
      limit: number
    },
    created_at?: string,
    updated_at?: string,
    event_memberships?: {
    }[],
    event_guests?: {
    }[]
  },
  invitee_scheduled_by?: string | null,
  first_name?: string | null,
  last_name?: string | null,
  reconfirmation?: {
  } | null,
  scheduling_method?: string | null,
  text_reminder_number?: string | null,
  cancellation?: {
    canceled_by: string,
    reason?: string,
    canceler_type: string
  } | null
}
{
  event: invitee.canceled,
  time: string,
  payload: {
    uri: string,
    email: string,
    name: string,
    status?: active | canceled,
    event: string,
    timezone?: string,
    created_at: string,
    updated_at: string,
    cancel_url?: string,
    reschedule_url?: string,
    tracking?: {
    },
    questions_and_answers?: {
    }[],
    payment?: {
    } | null,
    no_show?: {
      uri: string
    } | null,
    rescheduled?: boolean,
    old_invitee?: string | null,
    new_invitee?: string | null,
    routing_form_submission?: string | null,
    scheduled_event?: {
      uri: string,
      name?: string,
      status?: active | canceled,
      start_time: string,
      end_time: string,
      event_type: string,
      location?: {
        type: string,
        location?: string,
        join_url?: string
      },
      invitees_counter?: {
        total: number,
        active: number,
        limit: number
      },
      created_at?: string,
      updated_at?: string,
      event_memberships?: {
      }[],
      event_guests?: {
      }[]
    },
    invitee_scheduled_by?: string | null,
    first_name?: string | null,
    last_name?: string | null,
    reconfirmation?: {
    } | null,
    scheduling_method?: string | null,
    text_reminder_number?: string | null,
    cancellation?: {
      canceled_by: string,
      reason?: string,
      canceler_type: string
    } | null
  }
}
webhookHooks example
calendly({
    webhookHooks: {
        invitees: {
            canceled: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Created

invitees.created An invitee booked a meeting Payload
NameTypeRequiredDescription
eventinvitee.createdYes
timestringYes
payloadobjectYes
{
  uri: string,
  email: string,
  name: string,
  status?: active | canceled,
  event: string,
  timezone?: string,
  created_at: string,
  updated_at: string,
  cancel_url?: string,
  reschedule_url?: string,
  tracking?: {
  },
  questions_and_answers?: {
  }[],
  payment?: {
  } | null,
  no_show?: {
    uri: string
  } | null,
  rescheduled?: boolean,
  old_invitee?: string | null,
  new_invitee?: string | null,
  routing_form_submission?: string | null,
  scheduled_event?: {
    uri: string,
    name?: string,
    status?: active | canceled,
    start_time: string,
    end_time: string,
    event_type: string,
    location?: {
      type: string,
      location?: string,
      join_url?: string
    },
    invitees_counter?: {
      total: number,
      active: number,
      limit: number
    },
    created_at?: string,
    updated_at?: string,
    event_memberships?: {
    }[],
    event_guests?: {
    }[]
  },
  invitee_scheduled_by?: string | null,
  first_name?: string | null,
  last_name?: string | null,
  reconfirmation?: {
  } | null,
  scheduling_method?: string | null,
  text_reminder_number?: string | null
}
{
  event: invitee.created,
  time: string,
  payload: {
    uri: string,
    email: string,
    name: string,
    status?: active | canceled,
    event: string,
    timezone?: string,
    created_at: string,
    updated_at: string,
    cancel_url?: string,
    reschedule_url?: string,
    tracking?: {
    },
    questions_and_answers?: {
    }[],
    payment?: {
    } | null,
    no_show?: {
      uri: string
    } | null,
    rescheduled?: boolean,
    old_invitee?: string | null,
    new_invitee?: string | null,
    routing_form_submission?: string | null,
    scheduled_event?: {
      uri: string,
      name?: string,
      status?: active | canceled,
      start_time: string,
      end_time: string,
      event_type: string,
      location?: {
        type: string,
        location?: string,
        join_url?: string
      },
      invitees_counter?: {
        total: number,
        active: number,
        limit: number
      },
      created_at?: string,
      updated_at?: string,
      event_memberships?: {
      }[],
      event_guests?: {
      }[]
    },
    invitee_scheduled_by?: string | null,
    first_name?: string | null,
    last_name?: string | null,
    reconfirmation?: {
    } | null,
    scheduling_method?: string | null,
    text_reminder_number?: string | null
  }
}
webhookHooks example
calendly({
    webhookHooks: {
        invitees: {
            created: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

No Show

invitees.noShow An invitee was marked as a no-show Payload
NameTypeRequiredDescription
eventinvitee_no_show.createdYes
timestringYes
payloadobjectYes
{
  uri: string,
  invitee: string,
  created_at: string,
  updated_at: string
}
{
  event: invitee_no_show.created,
  time: string,
  payload: {
    uri: string,
    invitee: string,
    created_at: string,
    updated_at: string
  }
}
webhookHooks example
calendly({
    webhookHooks: {
        invitees: {
            noShow: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Routing Forms

Submission

routingForms.submission A routing form submission was created Payload
NameTypeRequiredDescription
eventrouting_form_submission.createdYes
timestringYes
payloadobjectYes
{
  uri: string,
  routing_form: string,
  questions_and_answers?: {
  }[],
  tracking?: {
  },
  result?: {
  },
  created_at?: string,
  updated_at?: string
}
{
  event: routing_form_submission.created,
  time: string,
  payload: {
    uri: string,
    routing_form: string,
    questions_and_answers?: {
    }[],
    tracking?: {
    },
    result?: {
    },
    created_at?: string,
    updated_at?: string
  }
}
webhookHooks example
calendly({
    webhookHooks: {
        routingForms: {
            submission: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Users

Updated

users.updated A user was updated Payload
NameTypeRequiredDescription
eventuser.updatedYes
timestringYes
payloadobjectYes
{
  uri: string,
  name?: string,
  email?: string,
  slug?: string,
  timezone?: string,
  scheduling_url?: string,
  updated_at?: string
}
{
  event: user.updated,
  time: string,
  payload: {
    uri: string,
    name?: string,
    email?: string,
    slug?: string,
    timezone?: string,
    scheduling_url?: string,
    updated_at?: string
  }
}
webhookHooks example
calendly({
    webhookHooks: {
        users: {
            updated: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})