Skip to content

Interview Scheduling

Schedule an interview with credit reservation, frozen snapshot, and join credentials; Daily room is created when the bot starts.

Sequence

sequenceDiagram
  autonumber
  participant Web as Recruiter UI
  participant API as Hono API
  participant IntSvc as interview.service
  participant Repo as interview.repo
  participant Credit as LedgerCreditsProvider
  participant Ledger as credit.service
  participant Invite as DevInvitationProvider
  participant Mongo as MongoDB

  Web->>API: POST /v1/interviews
  IntSvc->>Mongo: validate Position, Candidate, resume text
  IntSvc->>Credit: quote(duration)
  Credit->>Ledger: quoteCredits
  IntSvc->>Repo: createInterview SCHEDULED + snapshot
  Repo->>Mongo: insert Interview
  IntSvc->>Credit: reserve(interviewId, cost)
  Credit->>Ledger: reserveCredits (lots)
  alt sendNotification
    IntSvc->>Invite: send(joinUrl, password)
    Invite-->>IntSvc: delivered false (dev log)
  end
  IntSvc-->>Web: 201 interview

Steps

  1. Recruiter schedules against an active position and candidate with parsed resume text.
  2. System quotes and reserves credits for the interview duration.
  3. Interview is saved as scheduled with hashed join token, password, and immutable snapshot.
  4. Optional invitation sends join URL and access password (logged in dev until email is wired).
  5. Credits stay reserved until completion, cancel, delete, or failed settlement.

Sophia AI Interview Platform — Internal Documentation