{"openapi":"3.1.0","info":{"title":"JamesPeralta.com API","version":"1.0.0","description":"Resume Coach, AI coding interviews, and Peralta 75 practice for your own code and AI agents. Create an API key at https://jamesperalta.com/developers. Guide: https://jamesperalta.com/developers/api.md"},"servers":[{"url":"https://jamesperalta.com/api/v1"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Account"},{"name":"Resume Coach"},{"name":"Coding interviews"},{"name":"Peralta 75 practice"}],"paths":{"/me":{"get":{"operationId":"getMe","tags":["Account"],"summary":"Check your API key","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"description":"`unauthorized`: missing, unknown, or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: see `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/resume":{"get":{"operationId":"getResume","tags":["Resume Coach"],"summary":"Your saved resume","description":"`resume` is `null` until you save one, for example by accepting a proposal.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeEnvelope"}}}},"401":{"description":"`unauthorized`: missing, unknown, or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: see `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/resume-coach/sessions":{"post":{"operationId":"createCoachSession","tags":["Resume Coach"],"summary":"Start a coach conversation","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Retrying with the same key returns the first response instead of starting a second session. 1–128 characters, kept for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachSession"}}}},"400":{"description":"`invalid_request`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing, unknown, or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: see `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/resume-coach/sessions/{sessionId}":{"get":{"operationId":"getCoachSession","tags":["Resume Coach"],"summary":"Transcript and pending proposal","parameters":[{"name":"sessionId","in":"path","required":true,"description":"A coach session id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachSession"}}}},"401":{"description":"`unauthorized`: missing, unknown, or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`: missing, or belongs to someone else","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: see `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/resume-coach/sessions/{sessionId}/turns":{"post":{"operationId":"sendCoachMessage","tags":["Resume Coach"],"summary":"Send a message to the coach","description":"Takes up to a few minutes. When the coach edits your resume, the edit is staged as `pendingProposal`; it changes your resume only after you accept it. Shares the website's limit of 20 coach messages per minute.","parameters":[{"name":"sessionId","in":"path","required":true,"description":"A coach session id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachTurnRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachTurn"}}}},"400":{"description":"`invalid_request`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing, unknown, or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`: missing, or belongs to someone else","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: see `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_error`: the model or code runner failed; safe to retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/resume-coach/proposals/{proposalId}/accept":{"post":{"operationId":"acceptResumeProposal","tags":["Resume Coach"],"summary":"Apply a staged edit to your resume","description":"`409` when the proposal was already rejected or superseded, or your resume changed after it was staged. Accepting twice is harmless.","parameters":[{"name":"proposalId","in":"path","required":true,"description":"A pending proposal id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalDecision"}}}},"401":{"description":"`unauthorized`: missing, unknown, or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`: missing, or belongs to someone else","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`conflict`: the resource is not in a state that allows this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: see `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/resume-coach/proposals/{proposalId}/reject":{"post":{"operationId":"rejectResumeProposal","tags":["Resume Coach"],"summary":"Discard a staged edit","parameters":[{"name":"proposalId","in":"path","required":true,"description":"A pending proposal id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalDecision"}}}},"401":{"description":"`unauthorized`: missing, unknown, or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`: missing, or belongs to someone else","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`conflict`: the resource is not in a state that allows this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: see `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/coding-interviews":{"post":{"operationId":"startCodingInterview","tags":["Coding interviews"],"summary":"Start a coding interview","description":"Without `questionId`, a timed two-question interview picked for `level`. The response includes the interviewer's opening message.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Retrying with the same key returns the first response instead of starting a second session. 1–128 characters, kept for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodingInterviewStartRequest"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodingInterview"}}}},"400":{"description":"`invalid_request`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing, unknown, or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`: missing, or belongs to someone else","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`conflict`: the resource is not in a state that allows this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: see `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_error`: the model or code runner failed; safe to retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/coding-interviews/{interviewId}":{"get":{"operationId":"getCodingInterview","tags":["Coding interviews"],"summary":"Status, current question, code, and transcript","parameters":[{"name":"interviewId","in":"path","required":true,"description":"A coding interview id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodingInterview"}}}},"401":{"description":"`unauthorized`: missing, unknown, or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`: missing, or belongs to someone else","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: see `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/coding-interviews/{interviewId}/turns":{"post":{"operationId":"sendInterviewMessage","tags":["Coding interviews"],"summary":"Say something to the interviewer","description":"Explain your approach, ask questions, and state complexity here. The interviewer may move to the next question or end the interview; read `question` and `status` from the response. `409` while another turn is running or after the interview ended.","parameters":[{"name":"interviewId","in":"path","required":true,"description":"A coding interview id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InterviewTurnRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InterviewTurn"}}}},"400":{"description":"`invalid_request`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing, unknown, or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`: missing, or belongs to someone else","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`conflict`: the resource is not in a state that allows this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: see `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_error`: the model or code runner failed; safe to retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/coding-interviews/{interviewId}/submissions":{"post":{"operationId":"submitInterviewCode","tags":["Coding interviews"],"summary":"Run your code against the tests","description":"Also saves the code as the editor contents.","parameters":[{"name":"interviewId","in":"path","required":true,"description":"A coding interview id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeSubmissionRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Submission"}}}},"400":{"description":"`invalid_request`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing, unknown, or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`: missing, or belongs to someone else","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`conflict`: the resource is not in a state that allows this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: see `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_error`: the model or code runner failed; safe to retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/coding-interviews/{interviewId}/finish":{"post":{"operationId":"finishCodingInterview","tags":["Coding interviews"],"summary":"End the interview","parameters":[{"name":"interviewId","in":"path","required":true,"description":"A coding interview id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodingInterview"}}}},"401":{"description":"`unauthorized`: missing, unknown, or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`: missing, or belongs to someone else","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: see `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/coding-interviews/{interviewId}/scorecard":{"get":{"operationId":"getInterviewScorecard","tags":["Coding interviews"],"summary":"Scorecard for a finished interview","description":"Generated on the first request, then returned as-is. `409` until the interview is completed with at least one submission.","parameters":[{"name":"interviewId","in":"path","required":true,"description":"A coding interview id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Scorecard"}}}},"401":{"description":"`unauthorized`: missing, unknown, or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`: missing, or belongs to someone else","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`conflict`: the resource is not in a state that allows this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: see `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_error`: the model or code runner failed; safe to retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/practice/questions":{"get":{"operationId":"listPracticeQuestions","tags":["Peralta 75 practice"],"summary":"The Peralta 75 track","parameters":[{"name":"category","in":"query","required":false,"description":"One of `categories`, any case.","schema":{"type":"string"}},{"name":"difficulty","in":"query","required":false,"schema":{"type":"string","enum":["Easy","Medium","Hard"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticeQuestionList"}}}},"400":{"description":"`invalid_request`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing, unknown, or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: see `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/practice/questions/{questionId}":{"get":{"operationId":"getPracticeQuestion","tags":["Peralta 75 practice"],"summary":"Prompt, examples, and starter code","parameters":[{"name":"questionId","in":"path","required":true,"description":"A practice question id, such as `leetcode-1`.","schema":{"type":"string"}},{"name":"language","in":"query","required":false,"schema":{"type":"string","enum":["python","java","cpp","csharp","go","kotlin","swift","rust"],"default":"python"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticeQuestion"}}}},"400":{"description":"`invalid_request`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing, unknown, or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`: missing, or belongs to someone else","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: see `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/practice/questions/{questionId}/submissions":{"post":{"operationId":"submitPracticeSolution","tags":["Peralta 75 practice"],"summary":"Run your solution against the tests","description":"A full pass marks the question solved. A later failing run keeps it solved.","parameters":[{"name":"questionId","in":"path","required":true,"description":"A practice question id, such as `leetcode-1`.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticeSubmissionRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticeSubmission"}}}},"400":{"description":"`invalid_request`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing, unknown, or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`: missing, or belongs to someone else","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: see `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_error`: the model or code runner failed; safe to retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/practice/questions/{questionId}/interview":{"post":{"operationId":"startPracticeInterview","tags":["Peralta 75 practice"],"summary":"Start this question as a coding interview","parameters":[{"name":"questionId","in":"path","required":true,"description":"A practice question id, such as `leetcode-1`.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Retrying with the same key returns the first response instead of starting a second session. 1–128 characters, kept for 24 hours.","schema":{"type":"string","minLength":1,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticeInterviewRequest"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodingInterview"}}}},"400":{"description":"`invalid_request`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing, unknown, or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`: missing, or belongs to someone else","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`conflict`: the resource is not in a state that allows this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: see `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_error`: the model or code runner failed; safe to retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/practice/progress":{"get":{"operationId":"getPracticeProgress","tags":["Peralta 75 practice"],"summary":"Your attempted and solved questions","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticeProgress"}}}},"401":{"description":"`unauthorized`: missing, unknown, or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: see `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An API key from https://jamesperalta.com/developers (`jpk_…`)."}},"schemas":{"Error":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string","enum":["invalid_request","unauthorized","payment_required","not_found","conflict","rate_limited","upstream_error","internal_error"]},"message":{"type":"string","description":"Written for the caller. Never contains internals."},"requestId":{"type":"string","description":"Same as the `X-Request-Id` header."}}}}},"Me":{"type":"object","additionalProperties":false,"required":["email"],"properties":{"email":{"type":"string","description":"The key owner's email."}}},"ResumeContent":{"type":"object","description":"The resume as the website renders it: `basics` (name, contacts) and ordered `sections` (experience, education, skills, projects, …) with their items and bullets.","required":["basics","sections"],"properties":{"basics":{"type":"object","required":["name","contacts"],"properties":{"name":{"type":"string"},"contacts":{"type":"array","items":{"type":"object","required":["text"],"properties":{"text":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"sections":{"type":"array","items":{"type":"object"}}}},"Resume":{"type":"object","additionalProperties":false,"required":["version","updatedAt","content"],"properties":{"version":{"type":"integer","description":"Increments each time a change is applied."},"updatedAt":{"type":"string","format":"date-time"},"content":{"$ref":"#/components/schemas/ResumeContent"}}},"ResumeEnvelope":{"type":"object","additionalProperties":false,"required":["resume"],"properties":{"resume":{"anyOf":[{"$ref":"#/components/schemas/Resume"},{"type":"null"}]}}},"ResumeProposal":{"type":"object","additionalProperties":false,"required":["id","status","baseVersion","content"],"properties":{"id":{"type":"string","description":"Pass to the accept/reject routes."},"status":{"type":"string","enum":["proposed"]},"baseVersion":{"type":"integer","description":"The resume version the edit was made on."},"content":{"$ref":"#/components/schemas/ResumeContent"}}},"CoachMessage":{"type":"object","additionalProperties":false,"required":["role","content","createdAt"],"properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"CoachSession":{"type":"object","additionalProperties":false,"required":["id","messages","pendingProposal"],"properties":{"id":{"type":"string"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/CoachMessage"}},"pendingProposal":{"anyOf":[{"$ref":"#/components/schemas/ResumeProposal"},{"type":"null"}]}}},"CoachTurnRequest":{"type":"object","required":["message"],"properties":{"message":{"type":"string","maxLength":20000},"attachments":{"type":"array","maxItems":3,"description":"Documents as text you already extracted, such as a resume PDF.","items":{"type":"object","required":["name","text"],"properties":{"name":{"type":"string"},"text":{"type":"string","maxLength":80000}}}}}},"CoachTurn":{"type":"object","additionalProperties":false,"required":["sessionId","reply","changeSummary","pendingProposal","resume"],"properties":{"sessionId":{"type":"string"},"reply":{"type":"string","description":"The coach's reply."},"changeSummary":{"type":"array","items":{"type":"string"},"description":"What the staged edit changes, if the coach staged one this turn."},"pendingProposal":{"anyOf":[{"$ref":"#/components/schemas/ResumeProposal"},{"type":"null"}]},"resume":{"anyOf":[{"$ref":"#/components/schemas/Resume"},{"type":"null"}]}}},"ProposalDecision":{"type":"object","additionalProperties":false,"required":["status","resume"],"properties":{"status":{"type":"string","enum":["applied","rejected"]},"resume":{"anyOf":[{"$ref":"#/components/schemas/Resume"},{"type":"null"}]}}},"CodingInterviewStartRequest":{"type":"object","properties":{"language":{"type":"string","enum":["python","java","cpp","csharp","go","kotlin","swift","rust"],"default":"python"},"level":{"type":"string","enum":["noob","intermediate","faang"],"default":"intermediate"},"questionId":{"type":"string","description":"A practice question id such as `leetcode-1`: practice that one question (no clock) instead of a two-question interview. An unknown id is `404`."}}},"CodingInterview":{"type":"object","additionalProperties":false,"required":["id","mode","language","status","startedAt","endsAt","question","code","steps","remainingStep","messages"],"properties":{"id":{"type":"integer"},"mode":{"type":"string","enum":["standard","practice"]},"language":{"type":"string","enum":["python","java","cpp","csharp","go","kotlin","swift","rust"]},"status":{"type":"string","enum":["active","completed","abandoned"]},"startedAt":{"type":"string","format":"date-time"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","description":"When the session clock runs out."},{"type":"null"}]},"question":{"type":"object","additionalProperties":false,"required":["index","total","title","difficulty","prompt","starterCode"],"properties":{"index":{"type":"integer","description":"Zero-based."},"total":{"type":"integer"},"title":{"type":"string"},"difficulty":{"type":"string"},"prompt":{"type":"string"},"starterCode":{"type":"string"}}},"code":{"type":"string","description":"The current editor contents."},"steps":{"anyOf":[{"type":"object","additionalProperties":false,"required":["approach","passingRun","complexity"],"properties":{"approach":{"type":"boolean","description":"You explained your approach."},"passingRun":{"type":"boolean","description":"A submission passed every test."},"complexity":{"type":"boolean","description":"You stated time and space complexity."}}},{"type":"null"}]},"remainingStep":{"anyOf":[{"type":"object","additionalProperties":false,"required":["id","label","detail"],"properties":{"id":{"type":"string","enum":["approach","passing_run","complexity"]},"label":{"type":"string"},"detail":{"type":"string"}}},{"type":"null"}]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/CoachMessage"}}}},"InterviewTurnRequest":{"type":"object","required":["message"],"properties":{"message":{"type":"string","maxLength":4000},"code":{"type":"string","maxLength":100000,"description":"Replaces the editor contents before the interviewer reads them."}}},"InterviewTurn":{"type":"object","additionalProperties":false,"required":["id","mode","language","status","startedAt","endsAt","question","code","steps","remainingStep","messages","reply"],"properties":{"id":{"type":"integer"},"mode":{"type":"string","enum":["standard","practice"]},"language":{"type":"string","enum":["python","java","cpp","csharp","go","kotlin","swift","rust"]},"status":{"type":"string","enum":["active","completed","abandoned"]},"startedAt":{"type":"string","format":"date-time"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","description":"When the session clock runs out."},{"type":"null"}]},"question":{"type":"object","additionalProperties":false,"required":["index","total","title","difficulty","prompt","starterCode"],"properties":{"index":{"type":"integer","description":"Zero-based."},"total":{"type":"integer"},"title":{"type":"string"},"difficulty":{"type":"string"},"prompt":{"type":"string"},"starterCode":{"type":"string"}}},"code":{"type":"string","description":"The current editor contents."},"steps":{"anyOf":[{"type":"object","additionalProperties":false,"required":["approach","passingRun","complexity"],"properties":{"approach":{"type":"boolean","description":"You explained your approach."},"passingRun":{"type":"boolean","description":"A submission passed every test."},"complexity":{"type":"boolean","description":"You stated time and space complexity."}}},{"type":"null"}]},"remainingStep":{"anyOf":[{"type":"object","additionalProperties":false,"required":["id","label","detail"],"properties":{"id":{"type":"string","enum":["approach","passing_run","complexity"]},"label":{"type":"string"},"detail":{"type":"string"}}},{"type":"null"}]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/CoachMessage"}},"reply":{"type":"array","items":{"type":"string"},"description":"The interviewer's new messages."}}},"CodeSubmissionRequest":{"type":"object","required":["code"],"properties":{"code":{"type":"string","maxLength":100000}}},"TestResult":{"type":"object","additionalProperties":false,"required":["label","passed"],"properties":{"label":{"type":"string"},"passed":{"type":"boolean"},"actual":{"type":"string"},"error":{"type":"string"}}},"Submission":{"type":"object","additionalProperties":false,"required":["passed","passedCount","totalCount","results","stdout","stderr"],"properties":{"passed":{"type":"boolean","description":"Every test passed."},"passedCount":{"type":"integer"},"totalCount":{"type":"integer"},"results":{"type":"array","items":{"$ref":"#/components/schemas/TestResult"}},"stdout":{"type":"string"},"stderr":{"type":"string"}}},"Scorecard":{"type":"object","additionalProperties":false,"required":["recommendation","summary","dimensions","strengths","improvements"],"properties":{"recommendation":{"type":"string","enum":["Strong Hire","Hire","Lean Hire","No Hire","Insufficient Evidence"]},"summary":{"type":"string"},"dimensions":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["name","score","label","evidence","improvement"],"properties":{"name":{"type":"string"},"score":{"type":"integer","minimum":1,"maximum":4},"label":{"type":"string","enum":["Weak","Mixed","Solid","Strong"]},"evidence":{"type":"string"},"improvement":{"type":"string"}}}},"strengths":{"type":"array","items":{"type":"string","description":"Derived from didWell on debriefed scorecards."}},"improvements":{"type":"array","items":{"type":"string","description":"Derived from improve on debriefed scorecards."}},"didWell":{"type":"array","description":"What worked, strongest first. Absent on scorecards generated before the debrief.","items":{"type":"object","additionalProperties":false,"required":["title","dimension","evidence"],"properties":{"title":{"type":"string"},"dimension":{"type":"string","description":"One of the dimension names."},"evidence":{"type":"string"}}}},"improve":{"type":"array","description":"What cost you, most damaging first. Absent on scorecards generated before the debrief.","items":{"type":"object","additionalProperties":false,"required":["title","dimension","severity","whatHappened","whyItMatters","doInstead"],"properties":{"title":{"type":"string"},"dimension":{"type":"string","description":"One of the dimension names."},"severity":{"type":"string","enum":["critical","major","minor"]},"whatHappened":{"type":"string","description":"The specific moment in the interview."},"whyItMatters":{"type":"string","description":"What an interviewer concludes from it."},"doInstead":{"type":"string","description":"The concrete better move at that moment."}}}},"focus":{"type":"string","description":"The one thing to practise next. Absent on scorecards generated before the debrief."}}},"PracticeQuestionSummary":{"type":"object","additionalProperties":false,"required":["id","title","difficulty","category","pattern"],"properties":{"id":{"type":"string","pattern":"^leetcode-[1-9][0-9]*$"},"title":{"type":"string"},"difficulty":{"type":"string","enum":["Easy","Medium","Hard"]},"category":{"type":"string"},"pattern":{"type":"string","description":"The technique the question drills."}}},"PracticeQuestionList":{"type":"object","additionalProperties":false,"required":["questions","categories"],"properties":{"questions":{"type":"array","items":{"$ref":"#/components/schemas/PracticeQuestionSummary"}},"categories":{"type":"array","items":{"type":"string"},"description":"Every category in the track."}}},"PracticeQuestion":{"type":"object","additionalProperties":false,"required":["id","title","difficulty","category","pattern","prompt","languages","language","starterCode","examples"],"properties":{"id":{"type":"string","pattern":"^leetcode-[1-9][0-9]*$"},"title":{"type":"string"},"difficulty":{"type":"string","enum":["Easy","Medium","Hard"]},"category":{"type":"string"},"pattern":{"type":"string","description":"The technique the question drills."},"prompt":{"type":"string"},"languages":{"type":"array","items":{"type":"string","enum":["python","java","cpp","csharp","go","kotlin","swift","rust"]}},"language":{"type":"string","enum":["python","java","cpp","csharp","go","kotlin","swift","rust"]},"starterCode":{"type":"string","description":"Starter code for `language`."},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["label","input","expectedOutput"],"properties":{"label":{"type":"string"},"input":{"type":"string"},"expectedOutput":{"type":"string"}}}}}},"PracticeSubmissionRequest":{"type":"object","required":["language","code"],"properties":{"language":{"type":"string","enum":["python","java","cpp","csharp","go","kotlin","swift","rust"]},"code":{"type":"string","maxLength":100000}}},"PracticeSubmission":{"type":"object","additionalProperties":false,"required":["passed","passedCount","totalCount","results","stdout","stderr","progress"],"properties":{"passed":{"type":"boolean","description":"Every test passed."},"passedCount":{"type":"integer"},"totalCount":{"type":"integer"},"results":{"type":"array","items":{"$ref":"#/components/schemas/TestResult"}},"stdout":{"type":"string"},"stderr":{"type":"string"},"progress":{"type":"string","enum":["attempted","solved"]}}},"PracticeProgress":{"type":"object","additionalProperties":false,"required":["total","solved","questions"],"properties":{"total":{"type":"integer"},"solved":{"type":"integer"},"questions":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["questionId","status","attemptedAt","solvedAt"],"properties":{"questionId":{"type":"string"},"status":{"type":"string","enum":["attempted","solved"]},"attemptedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"solvedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}}}}},"PracticeInterviewRequest":{"type":"object","properties":{"language":{"type":"string","enum":["python","java","cpp","csharp","go","kotlin","swift","rust"],"default":"python"}}}}}}