{"openapi":"3.0.3","info":{"title":"Scalis Public API","version":"0.1.3","description":"Generated from Zod route schemas in the public API resource modules."},"servers":[{"url":"/","description":"Current deployment"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Public API key as a bearer token. Paste the full key (`sk_live_<publicId>_<secret>`); Swagger sends it as `Authorization: Bearer <key>`."}},"schemas":{"BasicHealthResponse":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"timestamp":{"type":"string","format":"date-time"}},"required":["status","timestamp"]},"HealthCheckResponse":{"type":"object","properties":{"status":{"type":"string","enum":["ok","error","shutting_down"]},"info":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/HealthIndicator"}},"error":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/HealthIndicator"}},"details":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/HealthIndicator"}}},"required":["status","details"]},"HealthIndicator":{"type":"object","properties":{"status":{"type":"string"}},"additionalProperties":{"nullable":true}},"OpenApiDocument":{"type":"object","properties":{},"additionalProperties":{"nullable":true}},"ListRequisitionsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Requisition"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]},"Requisition":{"type":"object","properties":{"uuid":{"type":"string","nullable":true,"format":"uuid"},"name":{"type":"string","nullable":true},"status":{"type":"string","nullable":true,"enum":["OPEN","ON_HOLD","CLOSED","DRAFT","PENDING_APPROVAL","REJECTED",null]},"jobType":{"type":"string","nullable":true},"jobLevel":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["uuid","name","status","jobType","jobLevel","createdAt","updatedAt"]},"Pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["page","limit","total","totalPages"]},"CreateRequisitionBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"jobType":{"type":"string","enum":["FULL_TIME","PART_TIME","SEASONAL","CONTRACTOR","INTERNSHIP","PER_DIEM","TEMPORARY","OTHER"]},"jobLevel":{"type":"string","enum":["ENTRY_LEVEL","INTERMEDIATE_OR_EXPERIENCED","FIRST_MANAGEMENT","MIDDLE_MANAGEMENT","SENIOR_OR_EXECUTIVE"]},"payType":{"type":"string","enum":["HOURLY","SALARY"]},"minPay":{"type":"number","minimum":0},"maxPay":{"type":"number","minimum":0},"payCurrency":{"type":"string","enum":["USD","EUR","GBP","CAD","AUD","JPY","CHF","SEK","NOK","DKK","PLN","CZK"]},"externalId":{"type":"string","minLength":1,"maxLength":255}},"required":["name"],"additionalProperties":false},"GetRequisitionResponse":{"allOf":[{"$ref":"#/components/schemas/Requisition"},{"type":"object","properties":{"stages":{"type":"array","items":{"$ref":"#/components/schemas/RequisitionStage"}}},"required":["stages"]}]},"RequisitionStage":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"name":{"type":"string"},"stageType":{"type":"string"},"visibility":{"type":"string","nullable":true},"pipelineRankOrder":{"type":"integer"},"milestone":{"type":"string","nullable":true}},"required":["id","name","stageType","visibility","pipelineRankOrder","milestone"]},"UpdateRequisitionBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"jobType":{"type":"string","enum":["FULL_TIME","PART_TIME","SEASONAL","CONTRACTOR","INTERNSHIP","PER_DIEM","TEMPORARY","OTHER"]},"jobLevel":{"type":"string","enum":["ENTRY_LEVEL","INTERMEDIATE_OR_EXPERIENCED","FIRST_MANAGEMENT","MIDDLE_MANAGEMENT","SENIOR_OR_EXECUTIVE"]},"payType":{"type":"string","enum":["HOURLY","SALARY"]},"minPay":{"type":"number","minimum":0},"maxPay":{"type":"number","minimum":0},"payCurrency":{"type":"string","enum":["USD","EUR","GBP","CAD","AUD","JPY","CHF","SEK","NOK","DKK","PLN","CZK"]},"externalId":{"type":"string","minLength":1,"maxLength":255},"jobDescription":{"type":"string","minLength":1},"status":{"type":"string","enum":["DRAFT","OPEN"]}},"additionalProperties":false},"LinkRequisitionPipelineResponse":{"type":"object","properties":{"jobPipelineId":{"type":"integer"},"templatePipelineInstanceId":{"type":"integer"}},"required":["jobPipelineId","templatePipelineInstanceId"]},"LinkRequisitionPipelineBody":{"type":"object","properties":{"pipelineTemplateId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["pipelineTemplateId"],"additionalProperties":false},"ListCompanyUsersResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CompanyUser"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]},"CompanyUser":{"type":"object","properties":{"uuid":{"type":"string","nullable":true,"format":"uuid"},"email":{"type":"string"},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"status":{"type":"string","nullable":true,"enum":["ACTIVE","SUSPENDED","DISABLED","DELETED",null]},"roleId":{"type":"integer"},"role":{"type":"string"},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["uuid","email","firstName","lastName","status","roleId","role","createdAt","updatedAt"]},"ListRequisitionOpeningsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RequisitionOpening"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]},"RequisitionOpening":{"type":"object","properties":{"uuid":{"type":"string","nullable":true,"format":"uuid"},"status":{"type":"string","nullable":true,"enum":["OPEN","FILLED","ON_HOLD","CLOSED","PENDING_APPROVAL","REJECTED",null]},"openingType":{"type":"string","nullable":true,"enum":["NEW","REPLACEMENT","INTERNAL_HIRE","EVERGREEN",null]},"openedDate":{"type":"string","nullable":true,"format":"date"},"targetHireDate":{"type":"string","nullable":true,"format":"date"},"startDate":{"type":"string","nullable":true,"format":"date"},"filledDate":{"type":"string","nullable":true,"format":"date"},"closedDate":{"type":"string","nullable":true,"format":"date"},"closedReason":{"type":"string","nullable":true,"enum":["NO_LONGER_NEEDED","ON_HOLD","OPENED_BY_MISTAKE",null]}},"required":["uuid","status","openingType","openedDate","targetHireDate","startDate","filledDate","closedDate","closedReason"]},"CreateRequisitionOpeningBody":{"type":"object","properties":{"openedDate":{"type":"string","format":"date"},"targetHireDate":{"type":"string","format":"date"},"openingType":{"type":"string","enum":["NEW","REPLACEMENT","INTERNAL_HIRE","EVERGREEN"]},"externalId":{"type":"string","minLength":1,"maxLength":255}},"additionalProperties":false},"ListHiringTeamResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/HiringTeamMember"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]},"HiringTeamMember":{"type":"object","properties":{"companyUserUuid":{"type":"string","nullable":true,"format":"uuid"},"email":{"type":"string","nullable":true},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"role":{"type":"string"}},"required":["companyUserUuid","email","firstName","lastName","role"]},"AddHiringTeamMemberBody":{"type":"object","properties":{"companyUserUuid":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["RECRUITER","HIRING_MANAGER","HIRING_TEAM_MEMBER","JOB_VIEWER"]}},"required":["companyUserUuid","role"],"additionalProperties":false},"ListPipelineTemplatesResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PipelineTemplate"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]},"PipelineTemplate":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","nullable":true,"format":"date-time"},"milestones":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","nullable":true},"rankOrder":{"type":"integer","nullable":true},"stages":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"stageType":{"type":"string"},"visibility":{"type":"string","nullable":true},"reviewsRequired":{"type":"integer","nullable":true},"pipelineRankOrder":{"type":"integer"}},"required":["name","stageType","visibility","reviewsRequired","pipelineRankOrder"]}}},"required":["name","rankOrder","stages"]}}},"required":["id","name","createdAt","updatedAt","milestones"]},"CreatePipelineTemplateBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"milestones":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["SOURCING","APPLICATION_REVIEW","PRE_SCREEN","INTERVIEWING","OFFER","HIRED"]},"stages":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"stageType":{"type":"string","enum":["GENERIC_STAGE"]},"visibility":{"type":"string","enum":["VISIBLE_TO_CANDIDATE","VISIBLE_ONLY_INTERNALLY"]}},"required":["name","stageType"],"additionalProperties":false},"minItems":1}},"required":["name","stages"],"additionalProperties":false},"minItems":1}},"required":["name","milestones"],"additionalProperties":false},"ListJobListingsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/JobListingListItem"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]},"JobListingListItem":{"type":"object","properties":{"publicId":{"type":"string","nullable":true,"format":"uuid"},"requisitionUuid":{"type":"string","nullable":true,"format":"uuid"},"title":{"type":"string","nullable":true},"workplaceType":{"type":"string","nullable":true,"enum":["ENTIRELY_REMOTE","HYBRID_REMOTE","IN_PERSON",null]},"acceptingCandidates":{"type":"boolean","nullable":true},"isPrivate":{"type":"boolean"},"stage":{"type":"string","nullable":true,"enum":["BASIC_INFORMATION","LOCATION","DESCRIPTION","PREFERENCES","SKILLS","SCREENING_QUESTIONS","COMPLETE",null]},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","nullable":true,"format":"date-time"},"locations":{"type":"array","items":{"$ref":"#/components/schemas/JobListingLocation"}},"description":{"type":"string","nullable":true},"descriptionPreview":{"type":"string","nullable":true}},"required":["publicId","requisitionUuid","title","workplaceType","acceptingCandidates","isPrivate","stage","createdAt","updatedAt","locations","descriptionPreview"]},"JobListingLocation":{"type":"object","properties":{"country":{"type":"string","nullable":true},"addressLine1":{"type":"string","nullable":true},"addressLine2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"postalCode":{"type":"string","nullable":true},"latitude":{"type":"string","nullable":true},"longitude":{"type":"string","nullable":true},"timeZone":{"type":"string","nullable":true},"isDisplayed":{"type":"boolean"},"isPrimary":{"type":"boolean"}},"required":["country","addressLine1","addressLine2","city","state","postalCode","latitude","longitude","timeZone","isDisplayed","isPrimary"]},"JobListing":{"type":"object","properties":{"publicId":{"type":"string","nullable":true,"format":"uuid"},"requisitionUuid":{"type":"string","nullable":true,"format":"uuid"},"title":{"type":"string","nullable":true},"workplaceType":{"type":"string","nullable":true,"enum":["ENTIRELY_REMOTE","HYBRID_REMOTE","IN_PERSON",null]},"description":{"type":"string","nullable":true},"acceptingCandidates":{"type":"boolean","nullable":true},"isPrivate":{"type":"boolean"},"stage":{"type":"string","nullable":true,"enum":["BASIC_INFORMATION","LOCATION","DESCRIPTION","PREFERENCES","SKILLS","SCREENING_QUESTIONS","COMPLETE",null]},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","nullable":true,"format":"date-time"},"locations":{"type":"array","items":{"$ref":"#/components/schemas/JobListingLocation"}}},"required":["publicId","requisitionUuid","title","workplaceType","description","acceptingCandidates","isPrivate","stage","createdAt","updatedAt","locations"]},"CreateJobListingBody":{"type":"object","properties":{"requisitionUuid":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":255},"workplaceType":{"type":"string","enum":["ENTIRELY_REMOTE","HYBRID_REMOTE","IN_PERSON"]},"description":{"type":"string","minLength":1},"acceptingCandidates":{"type":"boolean","default":false},"isPrivate":{"type":"boolean","default":false},"locations":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","nullable":true},"addressLine1":{"type":"string","nullable":true},"addressLine2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"postalCode":{"type":"string","nullable":true},"latitude":{"type":"string","nullable":true,"pattern":"^-?\\d+(\\.\\d+)?$"},"longitude":{"type":"string","nullable":true,"pattern":"^-?\\d+(\\.\\d+)?$"},"timeZone":{"type":"string","nullable":true},"isDisplayed":{"type":"boolean"},"isPrimary":{"type":"boolean"}},"additionalProperties":false},"description":"One to seven locations. country is the ISO 3166-1 alpha-2 code the listing form stores, plus XK for Kosovo. timeZone must be an IANA zone name; names are case-sensitive, and offsets and abbreviations such as EST are rejected. Fields a GET returns as null can be sent back as null. latitude and longitude are strings in decimal degrees; a number is rejected. Street (addressLine1) is required unless workplaceType is ENTIRELY_REMOTE. City and state are required when that country address format includes them. At most one isPrimary: true; if no row has isPrimary: true, the first row is primary. The primary location is always displayed, so isDisplayed: false on it is rejected. Unknown keys are rejected."}},"required":["requisitionUuid","locations"],"additionalProperties":false},"UpdateJobListingBody":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"workplaceType":{"type":"string","enum":["ENTIRELY_REMOTE","HYBRID_REMOTE","IN_PERSON"]},"description":{"type":"string","minLength":1},"acceptingCandidates":{"type":"boolean"},"isPrivate":{"type":"boolean"},"locations":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","nullable":true},"addressLine1":{"type":"string","nullable":true},"addressLine2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"postalCode":{"type":"string","nullable":true},"latitude":{"type":"string","nullable":true,"pattern":"^-?\\d+(\\.\\d+)?$"},"longitude":{"type":"string","nullable":true,"pattern":"^-?\\d+(\\.\\d+)?$"},"timeZone":{"type":"string","nullable":true},"isDisplayed":{"type":"boolean"},"isPrimary":{"type":"boolean"}},"additionalProperties":false},"description":"One to seven locations. country is the ISO 3166-1 alpha-2 code the listing form stores, plus XK for Kosovo. timeZone must be an IANA zone name; names are case-sensitive, and offsets and abbreviations such as EST are rejected. Fields a GET returns as null can be sent back as null. latitude and longitude are strings in decimal degrees; a number is rejected. Street (addressLine1) is required unless workplaceType is ENTIRELY_REMOTE. City and state are required when that country address format includes them. At most one isPrimary: true; if no row has isPrimary: true, the first row is primary. The primary location is always displayed, so isDisplayed: false on it is rejected. Unknown keys are rejected. Omit locations to leave stored locations unchanged. Sending locations replaces the whole set. Changing workplaceType to HYBRID_REMOTE or IN_PERSON without sending locations is rejected when the listing has no stored location or a stored location has no street."}},"additionalProperties":false},"SendEmailResponse":{"type":"object","properties":{"status":{"type":"string","enum":["QUEUED"]},"id":{"type":"string"}},"required":["status","id"]},"SendEmailBody":{"type":"object","properties":{"to":{"type":"array","items":{"type":"string","format":"email"},"minItems":1,"maxItems":50},"cc":{"type":"array","items":{"type":"string","format":"email"},"maxItems":50},"bcc":{"type":"array","items":{"type":"string","format":"email"},"maxItems":50},"replyTo":{"type":"string","format":"email"},"subject":{"type":"string","minLength":1,"maxLength":998},"body":{"type":"string","minLength":1},"candidateApplicationUuid":{"type":"string","format":"uuid"}},"required":["to","subject","body"],"additionalProperties":false},"ListOffersResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Offer"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]},"Offer":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"candidateApplicationUuid":{"type":"string","format":"uuid"},"version":{"type":"integer","nullable":true},"status":{"type":"string","nullable":true,"enum":["ACCEPTED","DECLINED","DELETED","NOT_CREATED","NOT_SENT","PENDING_SEND","SENT","SENT_AWAITING_SIGNATURE","SIGNED","VOIDED","PENDING_APPROVAL","DRAFT",null]},"candidateName":{"type":"string","nullable":true},"jobTitle":{"type":"string","nullable":true},"payType":{"type":"string","nullable":true,"enum":["HOURLY","SALARY",null]},"compensation":{"type":"number","nullable":true},"startDate":{"type":"string","nullable":true,"format":"date"},"expirationDate":{"type":"string","nullable":true,"format":"date"},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["uuid","candidateApplicationUuid","version","status","candidateName","jobTitle","payType","compensation","startDate","expirationDate","createdAt","updatedAt"]},"SummaryMetrics":{"type":"object","properties":{"requisitions":{"type":"object","properties":{"total":{"type":"integer"},"open":{"type":"integer"}},"required":["total","open"]},"jobListings":{"type":"object","properties":{"total":{"type":"integer"},"acceptingCandidates":{"type":"integer"}},"required":["total","acceptingCandidates"]},"applications":{"type":"object","properties":{"total":{"type":"integer"}},"required":["total"]},"offers":{"type":"object","properties":{"total":{"type":"integer"}},"required":["total"]}},"required":["requisitions","jobListings","applications","offers"]},"RequisitionMetrics":{"type":"object","properties":{"total":{"type":"integer"},"byStatus":{"type":"object","additionalProperties":{"type":"integer"}}},"required":["total","byStatus"]},"JobListingMetrics":{"type":"object","properties":{"total":{"type":"integer"},"acceptingCandidates":{"type":"integer"},"private":{"type":"integer"}},"required":["total","acceptingCandidates","private"]},"ApplicationMetrics":{"type":"object","properties":{"total":{"type":"integer"},"byStatus":{"type":"object","additionalProperties":{"type":"integer"}}},"required":["total","byStatus"]},"OfferMetrics":{"type":"object","properties":{"total":{"type":"integer"},"signed":{"type":"integer"},"accepted":{"type":"integer"},"declined":{"type":"integer"}},"required":["total","signed","accepted","declined"]},"HireMetrics":{"type":"object","properties":{"hires":{"type":"integer"}},"required":["hires"]},"AnalyticsResult":{"type":"object","properties":{"metric":{"type":"string"},"filters":{"type":"object","additionalProperties":{"nullable":true}},"data":{"nullable":true},"total":{"type":"integer"},"queriedAt":{"type":"string"}},"required":["metric","filters","queriedAt"],"additionalProperties":{"nullable":true}},"ListApplicationsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Application"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]},"Application":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"candidateProfileUuid":{"type":"string","nullable":true,"format":"uuid"},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"jobListingPublicId":{"type":"string","nullable":true,"format":"uuid"},"status":{"type":"string","nullable":true},"appliedAt":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["uuid","candidateProfileUuid","firstName","lastName","email","jobListingPublicId","status","appliedAt","createdAt","updatedAt"]},"AdvanceApplicationBody":{"type":"object","properties":{"stageId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Instance pipeline stage id from GET /requisitions/{uuid}. Omit to move to the next stage in pipeline order. Pass an id to skip ahead or land on a specific stage."},"message":{"type":"string","description":"Optional message included with the advance, forwarded to AdvanceToStage."},"doNotNotifyCandidate":{"type":"boolean","description":"When true, skip candidate notification email for this advance."},"cancelPendingScheduledActions":{"type":"boolean","description":"When true, cancel pending scheduled actions on the application and proceed. Without this flag, a pending scheduled action returns 409."}},"additionalProperties":false},"RejectApplicationBody":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":1000,"description":"Optional free-text rejection reason. When provided, stored on ApplicationRejection.details."},"cancelPendingScheduledActions":{"type":"boolean","description":"When true, cancel pending scheduled actions on the application and proceed. Without this flag, a pending scheduled action returns 409."}},"additionalProperties":false}},"parameters":{}},"paths":{"/health":{"get":{"tags":["Health"],"summary":"Get public API health status","security":[],"responses":{"200":{"description":"The public API process is running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicHealthResponse"}}}}}}},"/health/ready":{"get":{"tags":["Health"],"summary":"Get public API readiness status","security":[],"responses":{"200":{"description":"Health check succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthCheckResponse"}}}},"503":{"description":"Health check failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthCheckResponse"}}}}}}},"/health/live":{"get":{"tags":["Health"],"summary":"Get public API liveness status","security":[],"responses":{"200":{"description":"Health check succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthCheckResponse"}}}},"503":{"description":"Health check failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthCheckResponse"}}}}}}},"/docs":{"get":{"tags":["Docs"],"summary":"Swagger UI for the public API","security":[],"responses":{"200":{"description":"Interactive Swagger UI, generated from the route schemas.","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/docs/openapi.json":{"get":{"tags":["Docs"],"summary":"Raw OpenAPI 3.0 document","security":[],"responses":{"200":{"description":"The generated OpenAPI document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenApiDocument"}}}}}}},"/docs/guide":{"get":{"tags":["Docs"],"summary":"Developer guide (HTML)","security":[],"responses":{"200":{"description":"The narrative developer guide, rendered as an HTML page.","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/v0/requisitions":{"get":{"tags":["Requisitions"],"summary":"List requisitions for the authenticated company","parameters":[{"schema":{"type":"integer","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"search","in":"query"},{"schema":{"type":"string","enum":["OPEN","ON_HOLD","CLOSED","DRAFT","PENDING_APPROVAL","REJECTED"]},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"A paginated list of requisitions for the API key company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRequisitionsResponse"}}}}}},"post":{"tags":["Requisitions"],"summary":"Create a requisition for the authenticated company","description":"Creates the core requisition record only; openings, pipeline, and hiring team are not created. The requisition is persisted as OPEN and isIncomplete so it shows in the in-app Open tab without allowing published listings. Status is not part of the payload. API keys are admin-only, so create skips the in-app job-approval workflow.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequisitionBody"}}}},"responses":{"201":{"description":"The created requisition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Requisition"}}}},"400":{"description":"The request body failed validation."},"409":{"description":"A requisition with the given externalId already exists for the company."}}}},"/api/v0/requisitions/{uuid}":{"get":{"tags":["Requisitions"],"summary":"Get a requisition and its instance pipeline stages","description":"Returns the requisition plus ordered instance pipeline stages. Stage `id` values are what GET /applications?stageId= and POST /applications/{uuid}/advance stageId accept. An empty stages array means no pipeline is linked yet.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"uuid","in":"path"}],"responses":{"200":{"description":"The requisition and its instance pipeline stages.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRequisitionResponse"}}}},"404":{"description":"No requisition with that uuid exists for the API key company."}}},"patch":{"tags":["Requisitions"],"summary":"Update a requisition, optionally setting status to OPEN when complete","description":"Patches scalar fields and optionally upserts the job description. At least one field is required. Setting `status` to OPEN succeeds only when the completeness bar is met (name, description, listing, pipeline, hiring team, opening). Incomplete requests return 422 with `gaps`. API keys are admin-only, so job-approval company settings are not applied. A requisition already in PENDING_APPROVAL still returns 409 so an in-flight in-app review is not overwritten.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"uuid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRequisitionBody"}}}},"responses":{"200":{"description":"The updated requisition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Requisition"}}}},"400":{"description":"The request body failed validation."},"404":{"description":"No requisition with that uuid exists for the API key company."},"409":{"description":"The requisition is pending in-app approval, or a requisition with the given externalId already exists for the company."},"422":{"description":"Requisition is incomplete for status OPEN; response includes gaps[]."}}}},"/api/v0/requisitions/{uuid}/pipeline":{"post":{"tags":["Requisitions"],"summary":"Link a pipeline template to a requisition","description":"Links a pipeline via the main app (UpsertJobPipeline): deep-copies the company pipeline template to a requisition-scoped instance, creates JobPipeline, and links every listing on the requisition. Returns 409 if the requisition already has a pipeline (re-link / swap is not supported — it would orphan candidate stage IDs).","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"uuid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkRequisitionPipelineBody"}}}},"responses":{"200":{"description":"The linked pipeline identifiers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkRequisitionPipelineResponse"}}}},"400":{"description":"The given pipeline id is a requisition-scoped instance, not a template."},"404":{"description":"Requisition or pipeline template not found for the API key company."},"409":{"description":"The requisition already has a pipeline linked."}}}},"/api/v0/company/users":{"get":{"tags":["Company Users"],"summary":"List users for the authenticated company","parameters":[{"schema":{"type":"integer","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"search","in":"query"}],"responses":{"200":{"description":"A paginated list of company users for the API key company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCompanyUsersResponse"}}}}}}},"/api/v0/requisitions/{uuid}/openings":{"get":{"tags":["Requisitions"],"summary":"List openings for a requisition owned by the authenticated company","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"uuid","in":"path"},{"schema":{"type":"integer","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["OPEN","FILLED","ON_HOLD","CLOSED","PENDING_APPROVAL","REJECTED"]},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"A paginated list of openings for the requisition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRequisitionOpeningsResponse"}}}},"404":{"description":"No requisition with that uuid exists for the API key company."}}},"post":{"tags":["Requisitions"],"summary":"Create an opening for a requisition","description":"Creates a job opening on the requisition. Defaults openingStatus to OPEN and openedDate to today (local calendar date, same as the in-app openings form).","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"uuid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequisitionOpeningBody"}}}},"responses":{"201":{"description":"The created opening.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequisitionOpening"}}}},"400":{"description":"The request body failed validation."},"404":{"description":"No requisition with that uuid exists for the API key company."}}}},"/api/v0/requisitions/{uuid}/hiring-team":{"get":{"tags":["Hiring Team"],"summary":"List hiring team members for a requisition","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"uuid","in":"path"},{"schema":{"type":"integer","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"A paginated list of hiring team members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListHiringTeamResponse"}}}},"404":{"description":"No requisition with that uuid exists for the API key company."}}},"post":{"tags":["Hiring Team"],"summary":"Add a hiring team member to a requisition","description":"Adds a company user (from GET /api/v0/company/users) to the requisition hiring team, or sets the direct role of a user who is already on the team. Idempotent on (requisition, user): the call stores the sent role as the direct role and returns it. A user group can give the user a higher role than the direct role.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"uuid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddHiringTeamMemberBody"}}}},"responses":{"200":{"description":"The user was already on the hiring team, directly or through a user group. The call stored the sent role as the direct role. A user who was on the team only through a group now stays on the team when the group leaves.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HiringTeamMember"}}}},"201":{"description":"The hiring team member was newly added to the requisition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HiringTeamMember"}}}},"400":{"description":"Validation failed."},"404":{"description":"Requisition or company user not found."}}}},"/api/v0/pipeline-templates":{"get":{"tags":["Pipeline Templates"],"summary":"List pipeline templates for the authenticated company","parameters":[{"schema":{"type":"integer","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"search","in":"query"}],"responses":{"200":{"description":"A paginated list of company pipeline templates.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPipelineTemplatesResponse"}}}}}},"post":{"tags":["Pipeline Templates"],"summary":"Create a pipeline template","description":"Creates a company-owned pipeline template. Stage types are limited to GENERIC_STAGE; richer stage kinds (REVIEW, INTERVIEW, etc.) need reviewers, interview templates, or configuration the public body does not carry and must be configured in-app. The milestones array must not repeat a milestone name. SOURCING, APPLICATION_REVIEW and HIRED take exactly one stage each, named \"Sourcing\", \"Application Review\" and \"Hired\" respectively; any of these three left out of the request is added with that stage, visible to candidates. Milestones are stored in the canonical pipeline order (SOURCING, APPLICATION_REVIEW, PRE_SCREEN, INTERVIEWING, OFFER, HIRED) regardless of the order they are sent in, so the created template may list them differently from the request body. Stages keep the order they are sent in within their milestone.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePipelineTemplateBody"}}}},"responses":{"201":{"description":"The created pipeline template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineTemplate"}}}},"400":{"description":"Validation failed, a milestone name is repeated, or SOURCING, APPLICATION_REVIEW or HIRED has more than one stage or a stage with another name."}}}},"/api/v0/job-listings":{"get":{"tags":["Job Listings"],"summary":"List job listings for the authenticated company","description":"Each row includes descriptionPreview (a short plain-text preview) instead of the full description by default. Pass showFullDescription=true to include the full raw-HTML description on every row. Locations are included, primary first. When the primary has no stored location, no row has isPrimary: true, and a write makes the first row primary.","parameters":[{"schema":{"type":"integer","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"requisitionUuid","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"acceptingCandidates","in":"query"},{"schema":{"type":"string","enum":["true","false"],"default":false},"required":false,"name":"showFullDescription","in":"query"}],"responses":{"200":{"description":"A paginated list of job listings for the API key company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListJobListingsResponse"}}}}}},"post":{"tags":["Job Listings"],"summary":"Create a job listing for a requisition owned by the authenticated company","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateJobListingBody"}}}},"responses":{"201":{"description":"The created job listing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobListing"}}}},"400":{"description":"The request body failed validation or the requisition cannot accept a published listing."},"404":{"description":"No requisition with that uuid exists for the API key company."}}}},"/api/v0/job-listings/{publicId}":{"get":{"tags":["Job Listings"],"summary":"Get a single job listing owned by the authenticated company","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"publicId","in":"path"}],"responses":{"200":{"description":"The requested job listing. Locations are included, primary first. When the primary has no stored location, no row has isPrimary: true, and a write makes the first row primary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobListing"}}}},"404":{"description":"No job listing with that public id exists for the API key company."}}},"patch":{"tags":["Job Listings"],"summary":"Update a job listing owned by the authenticated company","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"publicId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateJobListingBody"}}}},"responses":{"200":{"description":"The updated job listing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobListing"}}}},"400":{"description":"The request body failed validation or the listing cannot be published."},"404":{"description":"No job listing with that public id exists for the API key company."}}}},"/api/v0/emails/send":{"post":{"tags":["Emails"],"summary":"Send an email on behalf of the authenticated company","description":"Validates, authorizes, and sends an email using the company’s connected mailbox (or the default sender when none is configured). The send completes synchronously before the response is returned, but the response shape mirrors an async-queue contract for forward compatibility. Pass an `Idempotency-Key` header to make retries after a timeout or 5xx safe: a repeated request with the same key replays the original result instead of sending again.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Optional caller-chosen key (letters, numbers, \"_\", \"-\"; max 255 chars). Retried requests with the same key within 24h return the original result instead of sending a duplicate email."},"required":false,"description":"Optional caller-chosen key (letters, numbers, \"_\", \"-\"; max 255 chars). Retried requests with the same key within 24h return the original result instead of sending a duplicate email.","name":"idempotency-key","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailBody"}}}},"responses":{"202":{"description":"The email was sent and recorded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailResponse"}}}},"400":{"description":"The request body or Idempotency-Key header failed validation."},"403":{"description":"The public API key is missing the required scope or is no longer active."},"404":{"description":"The referenced candidateApplicationUuid was not found for this company."},"409":{"description":"A request with the same Idempotency-Key is already being processed."},"422":{"description":"One or more recipients are suppressed (prior bounce/spam complaint) or cannot be emailed."},"429":{"description":"The public API key has exceeded its configured request rate limit."},"502":{"description":"Email delivery failed (e.g. the connected mailbox needs to be reconnected)."},"503":{"description":"Email delivery is temporarily unavailable; retry later."}}}},"/api/v0/offers":{"get":{"tags":["Offers"],"summary":"List candidate offers for the authenticated company","parameters":[{"schema":{"type":"integer","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"candidateApplicationUuid","in":"query"}],"responses":{"200":{"description":"A paginated list of candidate offers for the API key company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOffersResponse"}}}}}}},"/api/v0/metrics/summary":{"get":{"tags":["Metrics"],"summary":"High-level company metrics summary","responses":{"200":{"description":"Summary metric counts for the API key company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummaryMetrics"}}}},"400":{"description":"The query parameters failed validation."}}}},"/api/v0/metrics/requisitions":{"get":{"tags":["Metrics"],"summary":"Requisition counts grouped by status","parameters":[{"schema":{"type":"string","format":"date"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Requisition metric counts for the API key company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequisitionMetrics"}}}},"400":{"description":"The query parameters failed validation."}}}},"/api/v0/metrics/job-listings":{"get":{"tags":["Metrics"],"summary":"Job listing counts","responses":{"200":{"description":"Job listing metric counts for the API key company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobListingMetrics"}}}},"400":{"description":"The query parameters failed validation."}}}},"/api/v0/metrics/applications":{"get":{"tags":["Metrics"],"summary":"Candidate application counts grouped by status","parameters":[{"schema":{"type":"string","format":"date"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Application metric counts for the API key company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationMetrics"}}}},"400":{"description":"The query parameters failed validation."}}}},"/api/v0/metrics/offers":{"get":{"tags":["Metrics"],"summary":"Candidate offer counts by signature state","responses":{"200":{"description":"Offer metric counts for the API key company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferMetrics"}}}},"400":{"description":"The query parameters failed validation."}}}},"/api/v0/metrics/hires":{"get":{"tags":["Metrics"],"summary":"Count of hired candidates","parameters":[{"schema":{"type":"string","format":"date"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Hire metric counts for the API key company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HireMetrics"}}}},"400":{"description":"The query parameters failed validation."}}}},"/api/v0/analytics/metrics/{metric}":{"get":{"tags":["Analytics"],"summary":"Run an analytics metric","description":"Returns one analytics metric for the API key company, computed by the SCALIS analytics service from the same data as the analytics dashboard.","parameters":[{"schema":{"type":"string","enum":["time-to-hire","time-to-fill","pipeline-passthrough","time-in-stage","source-effectiveness","offer-acceptance","offer-decline-reasons","interviewer-load","feedback-completion","recruiter-activity","recruiter-quality","pipeline-history","headcount","open-requisitions","sources-over-time","sources-by-name","sources-by-owner"]},"required":true,"name":"metric","in":"path"},{"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"required":false,"name":"startDate","in":"query"},{"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"required":false,"name":"endDate","in":"query"},{"schema":{"type":"string"},"required":false,"name":"requisitionUuids","in":"query"},{"schema":{"type":"string","pattern":"^\\d+(,\\d+)*$"},"required":false,"name":"departmentIds","in":"query"},{"schema":{"type":"string","pattern":"^\\d+(,\\d+)*$"},"required":false,"name":"officeIds","in":"query"}],"responses":{"200":{"description":"The metric result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsResult"}}}},"400":{"description":"The filters failed validation."},"403":{"description":"The API key lacks the ANALYTICS_READ scope, or the report shows pay this key may not see."},"404":{"description":"Unknown name, one not available to this company, or a requisition uuid not in this company."},"502":{"description":"The analytics service could not be reached or returned an error."},"503":{"description":"Analytics is not available in this environment."},"504":{"description":"The analytics service did not respond in time."}}}},"/api/v0/analytics/reports/{report}":{"get":{"tags":["Analytics"],"summary":"Run an analytics report","description":"Returns one analytics report for the API key company. Paginated reports accept offset and limit (default 25, max 100) and return total.","parameters":[{"schema":{"type":"string","enum":["executive-summary","candidate-activity","source-details","open-requisitions-detail","opening-details","time-to-fill-detail","hires-detail","open-positions","filled-positions","referrals"]},"required":true,"name":"report","in":"path"},{"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"required":false,"name":"startDate","in":"query"},{"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"required":false,"name":"endDate","in":"query"},{"schema":{"type":"string"},"required":false,"name":"requisitionUuids","in":"query"},{"schema":{"type":"string","pattern":"^\\d+(,\\d+)*$"},"required":false,"name":"departmentIds","in":"query"},{"schema":{"type":"string","pattern":"^\\d+(,\\d+)*$"},"required":false,"name":"officeIds","in":"query"},{"schema":{"type":"string","pattern":"^\\d+$"},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","pattern":"^\\d+$"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"The report result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsResult"}}}},"400":{"description":"The filters failed validation."},"403":{"description":"The API key lacks the ANALYTICS_READ scope, or the report shows pay this key may not see."},"404":{"description":"Unknown name, one not available to this company, or a requisition uuid not in this company."},"502":{"description":"The analytics service could not be reached or returned an error."},"503":{"description":"Analytics is not available in this environment."},"504":{"description":"The analytics service did not respond in time."}}}},"/api/v0/applications":{"get":{"tags":["Applications"],"summary":"List applications for the authenticated company","parameters":[{"schema":{"type":"integer","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"jobListingPublicId","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Instance pipeline stage id from GET /requisitions/{uuid}. Filters to applications currently on that stage."},"required":false,"description":"Instance pipeline stage id from GET /requisitions/{uuid}. Filters to applications currently on that stage.","name":"stageId","in":"query"}],"responses":{"200":{"description":"A paginated list of candidate applications for the API key company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListApplicationsResponse"}}}}}}},"/api/v0/applications/{uuid}":{"get":{"tags":["Applications"],"summary":"Get an application by uuid","description":"Returns one application owned by the API key company. The path uuid is the application uuid from GET /applications (or from an offer), not a requisition id and not the in-app integer id.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"uuid","in":"path"}],"responses":{"200":{"description":"The candidate application.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"404":{"description":"No candidate application with that uuid exists for the API key company."}}}},"/api/v0/applications/{uuid}/advance":{"post":{"tags":["Applications"],"summary":"Advance an application to a pipeline stage","description":"Runs the same AdvanceToStage mutation as the in-app pipeline (stage move, emails, activity log, automations, hired routing). Omit stageId to move to the next stage in pipeline order. Applications with a pending scheduled action return 409 unless cancelPendingScheduledActions is true.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"uuid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvanceApplicationBody"}}}},"responses":{"200":{"description":"The updated candidate application.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"403":{"description":"The API key acting user is not allowed to advance this application."},"404":{"description":"No candidate application with that uuid exists for the API key company."},"409":{"description":"The application has a pending scheduled action. Pass cancelPendingScheduledActions: true to proceed."},"422":{"description":"The main app rejected the advance, or there is no next stage (already last, or the candidate is not on this job pipeline)."}}}},"/api/v0/applications/{uuid}/reject":{"post":{"tags":["Applications"],"summary":"Reject an application","description":"Rejects the application via the main app (RejectCandidates). Sets applicationStatus to REJECTED, persists the optional reason on ApplicationRejection.details, and records the activity log. No rejection email is sent.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"uuid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectApplicationBody"}}}},"responses":{"200":{"description":"The rejected candidate application.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"404":{"description":"No candidate application with that uuid exists for the API key company."},"409":{"description":"The application has a pending scheduled action. Pass cancelPendingScheduledActions: true to proceed."},"422":{"description":"The main app rejected the rejection (e.g. company settings require a rejection reason id)."}}}}}}