# Interview scheduler (/blocks/interview-scheduler)

## Try it [#try-it]

Alex and Sam have agreed on Tuesday at 14:00 UTC. Check what 14:00 UTC means for Sam in New York, then select **Schedule interview**. Use **Edit interview** to move it to Wednesday. After the meeting, choose **Record feedback**, enter Alex’s comments and complete the interview.

## Connect your data [#connect-your-data]

Connect `onSchedule` to [scheduleInterview](/api/reference/mutations/schedule-interview) and `onUpdate` to [updateInterview](/api/reference/mutations/update-interview). Pass the original ID and version with every edit. Give the block the appointment returned by the API, including its new version. If a save fails, reject the callback with a message the recruiter can act on. Send calendar invitations and changes through your calendar provider.

Pass the candidate’s `photoUrl` and `bannerUrl` together in `candidateMedia` to show their profile above the appointment.

See this block in the [placement walkthrough](/workflows/headless-ats). The preview uses sample data and resets on reload.
## Build prompt
Book a fixed time, reschedule it and keep the interviewer’s feedback with the appointment.
Use the React source and fictional records at https://docs.kith.contact/blocks/interview-scheduler.md.
Build a working preview with sample data. Keep my changes local for now.
If you cannot fetch the page, ask me to paste its Markdown.
## React source
```tsx
"use client";

import { useState } from "react";
import { InterviewScheduler, type ScheduledInterview } from "@recruiteros/recruit-ui/blocks";

export function InterviewSchedulerExample() {
  const [appointment, setAppointment] = useState<ScheduledInterview | null>(null);

  return <InterviewScheduler
    candidate="Sam Lindqvist"
    candidateMedia={{ photoUrl: "/people/sam-lindqvist.jpg" }}
    role="Engineering Director"
    appointment={appointment}
    defaults={{
      label: "Technical interview",
      scheduledAt: "2027-01-12T14:00:00Z",
      interviewer: "Alex Marchetti",
    }}
    timeZone="America/New_York"
    timeZoneLabel="Sam in New York"
    onSchedule={details => setAppointment({
      ...details, id: "17", version: "1", status: "SCHEDULED",
    })}
    onUpdate={(original, edit) => setAppointment({
      ...original, ...edit, version: String(Number(original.version) + 1),
    })}
  />;
}
```