{"openapi":"3.1.0","info":{"title":"Referral Platform API","version":"0.1.0"},"paths":{"/api/auth/register":{"post":{"tags":["auth"],"summary":"Register","operationId":"register_api_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_api_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Forgot Password","operationId":"forgot_password_api_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset Password","operationId":"reset_password_api_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/referrer/me":{"get":{"tags":["referrer"],"summary":"Get Me","description":"Return the current referrer's profile, status, and application details.\n\nReachable regardless of status so pending/inactive referrers can see where\nthey stand, complete their application, and (if not pending) reactivate.","operationId":"get_me_api_referrer_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferrerMeOut"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/referrer/me/company-options":{"get":{"tags":["referrer"],"summary":"List Company Options","description":"Active companies for the application picker.\n\nAvailable to referrers in any status (including pending) so they can select\nwhich companies they can refer to while completing their application.","operationId":"list_company_options_api_referrer_me_company_options_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CompanyRef"},"type":"array","title":"Response List Company Options Api Referrer Me Company Options Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/referrer/me/application":{"patch":{"tags":["referrer"],"summary":"Update My Application","description":"Submit or edit the referrer's verification details (pending page).\n\nOnly available while pending approval — once approved, company changes must\ngo through admin review (see /companies/change). LinkedIn is required;\ncompanies are chosen from the registry and stored as ReferrerCompany rows.","operationId":"update_my_application_api_referrer_me_application_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferrerApplicationUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferrerMeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/referrer/me/status":{"patch":{"tags":["referrer"],"summary":"Update My Status","description":"Let an approved referrer toggle their own availability.\n\nA referrer may only switch between active and inactive; they cannot move\nthemselves into or out of pending_approval (that's an admin action).","operationId":"update_my_status_api_referrer_me_status_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferrerStatusSelfUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferrerMeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/referrer/companies/all":{"get":{"tags":["referrer"],"summary":"List All Companies","description":"List all active companies available on the platform.","operationId":"list_all_companies_api_referrer_companies_all_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CompanyOut"},"type":"array","title":"Response List All Companies Api Referrer Companies All Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/referrer/companies":{"get":{"tags":["referrer"],"summary":"List My Companies","description":"List all companies this referrer is currently responsible for.","operationId":"list_my_companies_api_referrer_companies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ReferrerCompanyOut"},"type":"array","title":"Response List My Companies Api Referrer Companies Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/referrer/companies/change":{"get":{"tags":["referrer"],"summary":"Get Company Change","description":"The referrer's live companies plus any pending change awaiting review.","operationId":"get_company_change_api_referrer_companies_change_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyCompaniesView"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"put":{"tags":["referrer"],"summary":"Submit Company Change","description":"Propose a new set of referable companies for admin review.\n\nThe live set is unchanged until an admin approves. A referrer has at most one\nopen change request; resubmitting replaces the proposal.","operationId":"submit_company_change_api_referrer_companies_change_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyChangeSubmit"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyChangeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"delete":{"tags":["referrer"],"summary":"Cancel Company Change","description":"Withdraw a pending change request (live companies stay as they were).","operationId":"cancel_company_change_api_referrer_companies_change_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/referrer/requests":{"get":{"tags":["referrer"],"summary":"List Requests","description":"Referral requests assigned to this referrer (newest activity first), each\nwith its company name. Pending requests are excluded — not yet assigned.","operationId":"list_requests_api_referrer_requests_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/RequestStatus"},{"type":"null"}],"title":"Status"}},{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/referrer/requests/{request_id}":{"get":{"tags":["referrer"],"summary":"Get Request","description":"Get a specific request with a presigned resume URL.","operationId":"get_request_api_referrer_requests__request_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/referrer/requests/{request_id}/status":{"patch":{"tags":["referrer"],"summary":"Update Status","description":"Update the status of a referral request.","operationId":"update_status_api_referrer_requests__request_id__status_patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/referrer/requests/{request_id}/email":{"post":{"tags":["referrer"],"summary":"Email Request","description":"Package this request's details into an email to a caller-provided address.\n\nTypically the referrer's own work email, used to forward the referral into\ntheir company's system. The address is used once and never stored.","operationId":"email_request_api_referrer_requests__request_id__email_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralEmailRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/referrer/requests/{request_id}/decline":{"post":{"tags":["referrer"],"summary":"Decline Request","description":"Decline an assigned request.\n\n- not_a_match / no_openings: the request closes as Declined.\n- no_time: it's reassigned right away to another active referrer for the\n  same company (never one who already declined). If nobody else is\n  available, it closes as Declined so it never gets stuck.","operationId":"decline_request_api_referrer_requests__request_id__decline_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralDeclineRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/applicant/companies":{"get":{"tags":["applicant"],"summary":"List All Companies","description":"List companies that are active and covered by at least one referrer.","operationId":"list_all_companies_api_applicant_companies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CompanyOut"},"type":"array","title":"Response List All Companies Api Applicant Companies Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/applicant/profiles":{"get":{"tags":["applicant"],"summary":"List Profiles","operationId":"list_profiles_api_applicant_profiles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApplicantProfileOut"},"type":"array","title":"Response List Profiles Api Applicant Profiles Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["applicant"],"summary":"Create Profile","operationId":"create_profile_api_applicant_profiles_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_profile_api_applicant_profiles_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicantProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/applicant/profiles/{profile_id}":{"get":{"tags":["applicant"],"summary":"Get Profile","operationId":"get_profile_api_applicant_profiles__profile_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"integer","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicantProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["applicant"],"summary":"Update Profile","operationId":"update_profile_api_applicant_profiles__profile_id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"integer","title":"Profile Id"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_update_profile_api_applicant_profiles__profile_id__patch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicantProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["applicant"],"summary":"Delete Profile","operationId":"delete_profile_api_applicant_profiles__profile_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"integer","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/applicant/profiles/{profile_id}/resume":{"get":{"tags":["applicant"],"summary":"Get Profile Resume Url","operationId":"get_profile_resume_url_api_applicant_profiles__profile_id__resume_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"integer","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/applicant/requests":{"get":{"tags":["applicant"],"summary":"List My Requests","description":"The applicant's requests (newest first), each with its company name.","operationId":"list_my_requests_api_applicant_requests_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["applicant"],"summary":"Submit Request","operationId":"submit_request_api_applicant_requests_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralRequestSubmit"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/applicant/requests/{request_id}":{"get":{"tags":["applicant"],"summary":"Get My Request","description":"A single request with its company name and a viewable resume URL.","operationId":"get_my_request_api_applicant_requests__request_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/applicant/requests/{request_id}/resume":{"get":{"tags":["applicant"],"summary":"Get Resume Url","description":"Return a viewable URL for the resume attached to this request.","operationId":"get_resume_url_api_applicant_requests__request_id__resume_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/applicant/requests/{request_id}/withdraw":{"patch":{"tags":["applicant"],"summary":"Withdraw Request","description":"Withdraw a request. Only allowed while status is Pending.","operationId":"withdraw_request_api_applicant_requests__request_id__withdraw_patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/applicant/requests/{request_id}/edit":{"patch":{"tags":["applicant"],"summary":"Edit Request","description":"Edit a request's introduction. Candidate details come from the profile.\n\nOnly allowed while status is Pending.","operationId":"edit_request_api_applicant_requests__request_id__edit_patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralRequestEdit"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/applicant/resumes/{s3_key}":{"get":{"tags":["applicant"],"summary":"Serve Local Resume","description":"Serve resume from local filesystem (only active when AWS credentials are not set).\nNo auth required — the UUID in the s3_key acts as an unguessable token.","operationId":"serve_local_resume_api_applicant_resumes__s3_key__get","parameters":[{"name":"s3_key","in":"path","required":true,"schema":{"type":"string","title":"S3 Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/companies":{"get":{"tags":["admin"],"summary":"List Companies","description":"List all companies (including inactive ones).","operationId":"list_companies_api_admin_companies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CompanyOut"},"type":"array","title":"Response List Companies Api Admin Companies Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["admin"],"summary":"Create Company","description":"Create a new company.","operationId":"create_company_api_admin_companies_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admin/companies/{company_id}":{"patch":{"tags":["admin"],"summary":"Update Company","description":"Update company details. Also used to reactivate (is_active=True) a soft-deleted company.","operationId":"update_company_api_admin_companies__company_id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Company","description":"Soft-delete a company by setting is_active=False.","operationId":"delete_company_api_admin_companies__company_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/referrers":{"get":{"tags":["admin"],"summary":"List Referrers","description":"List referrers for review, optionally filtered by status.","operationId":"list_referrers_api_admin_referrers_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ReferrerStatus"},{"type":"null"}],"description":"Filter by referrer status (pending_approval/active/inactive)","title":"Status"},"description":"Filter by referrer status (pending_approval/active/inactive)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminReferrerOut"},"title":"Response List Referrers Api Admin Referrers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/referrers/{referrer_id}/status":{"patch":{"tags":["admin"],"summary":"Update Referrer Status","description":"Approve, reject, or otherwise set a referrer's status.\n\nApprove = set active; reject/disable = set inactive; status can also be\nreset to pending_approval if needed.","operationId":"update_referrer_status_api_admin_referrers__referrer_id__status_patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"referrer_id","in":"path","required":true,"schema":{"type":"integer","title":"Referrer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminReferrerStatusUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminReferrerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/company-changes":{"get":{"tags":["admin"],"summary":"List Company Changes","description":"List referrer company change requests (pending by default) for review.","operationId":"list_company_changes_api_admin_company_changes_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ChangeRequestStatus","default":"pending"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminCompanyChangeOut"},"title":"Response List Company Changes Api Admin Company Changes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/company-changes/{change_id}":{"patch":{"tags":["admin"],"summary":"Decide Company Change","description":"Approve or reject a pending change. Approving replaces the referrer's\nlive companies with the proposed set.","operationId":"decide_company_change_api_admin_company_changes__change_id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"change_id","in":"path","required":true,"schema":{"type":"integer","title":"Change Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyChangeDecision"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/overview":{"get":{"tags":["admin"],"summary":"Admin Overview","description":"Admin snapshot: referrers per company, and requests per referrer.","operationId":"admin_overview_api_admin_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/health":{"get":{"summary":"Health Check","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AdminCompanyChangeOut":{"properties":{"id":{"type":"integer","title":"Id"},"referrer_id":{"type":"integer","title":"Referrer Id"},"referrer_name":{"type":"string","title":"Referrer Name"},"referrer_email":{"type":"string","title":"Referrer Email"},"current_companies":{"items":{"$ref":"#/components/schemas/CompanyRef"},"type":"array","title":"Current Companies"},"proposed_companies":{"items":{"$ref":"#/components/schemas/CompanyRef"},"type":"array","title":"Proposed Companies"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","referrer_id","referrer_name","referrer_email","current_companies","proposed_companies","created_at"],"title":"AdminCompanyChangeOut","description":"A pending change for the admin review page, with current vs proposed."},"AdminReferrerOut":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"status":{"$ref":"#/components/schemas/ReferrerStatus"},"linkedin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Url"},"job_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Title"},"companies":{"items":{"$ref":"#/components/schemas/CompanyRef"},"type":"array","title":"Companies","default":[]},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","email","status","linkedin_url","job_title","created_at"],"title":"AdminReferrerOut","description":"Referrer summary for the admin review page."},"AdminReferrerStatusUpdate":{"properties":{"status":{"$ref":"#/components/schemas/ReferrerStatus"}},"type":"object","required":["status"],"title":"AdminReferrerStatusUpdate","description":"An admin setting any status on a referrer (approve / reject / etc.)."},"ApplicantProfileOut":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"has_resume":{"type":"boolean","title":"Has Resume"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","email","first_name","last_name","phone","has_resume","created_at","updated_at"],"title":"ApplicantProfileOut"},"Body_create_profile_api_applicant_profiles_post":{"properties":{"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"phone":{"type":"string","title":"Phone"},"resume":{"type":"string","format":"binary","title":"Resume"}},"type":"object","required":["email","first_name","last_name"],"title":"Body_create_profile_api_applicant_profiles_post"},"Body_update_profile_api_applicant_profiles__profile_id__patch":{"properties":{"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"phone":{"type":"string","title":"Phone"},"resume":{"type":"string","format":"binary","title":"Resume"}},"type":"object","title":"Body_update_profile_api_applicant_profiles__profile_id__patch"},"ChangeRequestStatus":{"type":"string","enum":["pending","approved","rejected"],"title":"ChangeRequestStatus"},"CompanyChangeDecision":{"properties":{"status":{"$ref":"#/components/schemas/ChangeRequestStatus"}},"type":"object","required":["status"],"title":"CompanyChangeDecision","description":"Admin approve/reject decision on a change request."},"CompanyChangeOut":{"properties":{"id":{"type":"integer","title":"Id"},"status":{"$ref":"#/components/schemas/ChangeRequestStatus"},"proposed_companies":{"items":{"$ref":"#/components/schemas/CompanyRef"},"type":"array","title":"Proposed Companies"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","status","proposed_companies","created_at"],"title":"CompanyChangeOut","description":"A pending change as seen by the referrer who submitted it."},"CompanyChangeSubmit":{"properties":{"company_ids":{"items":{"type":"integer"},"type":"array","title":"Company Ids","default":[]}},"type":"object","title":"CompanyChangeSubmit","description":"An active referrer proposing a new set of referable companies."},"CompanyCreate":{"properties":{"name":{"type":"string","title":"Name"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"}},"type":"object","required":["name"],"title":"CompanyCreate"},"CompanyOut":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","domain","industry","description","logo_url","is_active","created_at"],"title":"CompanyOut"},"CompanyRef":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"CompanyRef","description":"Minimal company reference (id + name) for pickers and summaries."},"CompanyUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"CompanyUpdate"},"DeclineReason":{"type":"string","enum":["not_a_match","no_openings","no_time"],"title":"DeclineReason"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"MyCompaniesView":{"properties":{"current":{"items":{"$ref":"#/components/schemas/CompanyRef"},"type":"array","title":"Current"},"pending":{"anyOf":[{"$ref":"#/components/schemas/CompanyChangeOut"},{"type":"null"}]}},"type":"object","required":["current"],"title":"MyCompaniesView","description":"The referrer's live companies plus any pending change awaiting review."},"ReferralDeclineRequest":{"properties":{"reason":{"$ref":"#/components/schemas/DeclineReason"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["reason"],"title":"ReferralDeclineRequest","description":"A referrer declining an assigned request."},"ReferralEmailRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ReferralEmailRequest","description":"A referrer packaging a request into an email to a given address.\n\nThe email address is used once to send the message and is never stored."},"ReferralRequestEdit":{"properties":{"introduction":{"type":"string","title":"Introduction"}},"type":"object","required":["introduction"],"title":"ReferralRequestEdit"},"ReferralRequestOut":{"properties":{"id":{"type":"integer","title":"Id"},"profile_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profile Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"candidate_name":{"type":"string","title":"Candidate Name"},"candidate_email":{"type":"string","title":"Candidate Email"},"target_positions":{"type":"string","title":"Target Positions"},"introduction":{"type":"string","title":"Introduction"},"status":{"$ref":"#/components/schemas/RequestStatus"},"resume_s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resume S3 Key"},"assigned_referrer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assigned Referrer Id"},"decline_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decline Reason"},"decline_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decline Note"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","profile_id","company_id","candidate_name","candidate_email","target_positions","introduction","status","resume_s3_key","assigned_referrer_id","created_at","updated_at"],"title":"ReferralRequestOut"},"ReferralRequestSubmit":{"properties":{"profile_id":{"type":"integer","title":"Profile Id"},"company_id":{"type":"integer","title":"Company Id"},"introduction":{"type":"string","title":"Introduction"},"target_positions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Positions","default":""}},"type":"object","required":["profile_id","company_id","introduction"],"title":"ReferralRequestSubmit"},"ReferrerApplicationUpdate":{"properties":{"linkedin_url":{"type":"string","title":"Linkedin Url"},"job_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Title"},"company_ids":{"items":{"type":"integer"},"type":"array","title":"Company Ids","default":[]}},"type":"object","required":["linkedin_url"],"title":"ReferrerApplicationUpdate","description":"Verification details a referrer submits/edits on the pending page.\n\nCompanies are chosen from the registry, so we take their ids."},"ReferrerCompanyOut":{"properties":{"id":{"type":"integer","title":"Id"},"referrer_id":{"type":"integer","title":"Referrer Id"},"company_id":{"type":"integer","title":"Company Id"}},"type":"object","required":["id","referrer_id","company_id"],"title":"ReferrerCompanyOut"},"ReferrerMeOut":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"status":{"$ref":"#/components/schemas/ReferrerStatus"},"linkedin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Url"},"job_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Title"},"companies":{"items":{"$ref":"#/components/schemas/CompanyRef"},"type":"array","title":"Companies","default":[]}},"type":"object","required":["id","name","email","status"],"title":"ReferrerMeOut","description":"Self profile for a referrer, including lifecycle status and application."},"ReferrerStatus":{"type":"string","enum":["pending_approval","active","inactive"],"title":"ReferrerStatus"},"ReferrerStatusSelfUpdate":{"properties":{"status":{"$ref":"#/components/schemas/ReferrerStatus"}},"type":"object","required":["status"],"title":"ReferrerStatusSelfUpdate","description":"A referrer toggling their own availability (active <-> inactive only)."},"RegisterRequest":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"role":{"$ref":"#/components/schemas/UserRole"}},"type":"object","required":["name","email","password","role"],"title":"RegisterRequest"},"RequestStatus":{"type":"string","enum":["Pending","Assigned","Submitted","Interviewing","Offer","Rejected","Withdrawn","Declined"],"title":"RequestStatus"},"ResetPasswordRequest":{"properties":{"token":{"type":"string","title":"Token"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["token","new_password"],"title":"ResetPasswordRequest"},"StatusUpdateRequest":{"properties":{"status":{"$ref":"#/components/schemas/RequestStatus"}},"type":"object","required":["status"],"title":"StatusUpdateRequest"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"}},"type":"object","required":["access_token"],"title":"TokenResponse"},"UserRole":{"type":"string","enum":["referrer","applicant","admin"],"title":"UserRole"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/auth/login"}}}}}}