{"openapi":"3.1.0","info":{"title":"Redstring Hiring API","version":"1.0.0","summary":"Programmatic roles, candidate discovery, AI matching, shortlists, personal-first contact reveals, outreach campaigns, and webhooks.","description":"Integrate Redstring Hiring directly into your ATS, CRM, internal recruiting tools, or automation workflows (Zapier, Make, n8n).\n\n### Authentication\nGenerate a scoped API key in **Settings → Team & organization → Developer API & Webhooks** (`/settings/organization#developer-api`) and send it in every request:\n```http\nAuthorization: Bearer rs_live_a1b2c3d4_...\nX-Workspace-Id: ws_...\n```\n\n### Scopes\n- `hiring:read` — Read workspaces, credits, roles, shortlists, searches, candidates, contacts, campaigns, threads, and webhooks.\n- `hiring:write` — Create/update roles, launch/refine candidate searches, run AI matching, manage shortlists, and register webhooks.\n- `contacts:reveal` — Reveal personal-first emails (`1` credit) and mobile numbers (`5` credits); `0` credits charged on `no_data`.\n- `outreach:write` — Create campaigns, enroll candidates, and send/reply in outreach threads."},"servers":[{"url":"http://localhost:4000/api/v1","description":"Hiring API v1"}],"security":[{"bearerApiKey":[]}],"tags":[{"name":"Workspaces & Credits","description":"Discover accessible workspaces and inspect your company's shared credit balance and operation ledger."},{"name":"Roles & Shortlists","description":"Create hiring roles, update role status (active, paused, filled, closed), and curate role shortlists."},{"name":"Briefs & Searches","description":"Extract structured hiring criteria from raw JDs, run candidate searches, inspect profiles, and trigger AI matching."},{"name":"Contact Reveals & Directory","description":"Reveal personal-first candidate emails and mobile numbers with zero-charge no-data protection, or query unlocked contacts."},{"name":"Campaigns & Outreach","description":"Automate outreach campaigns, enroll candidates, and read or send threaded outreach emails."},{"name":"Webhooks","description":"Subscribe HTTPS endpoints to HMAC-SHA256 signed async hiring events and inspect delivery receipts."}],"components":{"securitySchemes":{"bearerApiKey":{"type":"http","scheme":"bearer","bearerFormat":"rs_live_<prefix>_<secret>","description":"Scoped API key generated in Settings → Developer API & Webhooks."}},"schemas":{"SuccessEnvelope":{"type":"object","required":["data","meta"],"properties":{"data":{},"meta":{"type":"object","required":["requestId","timestamp"],"properties":{"requestId":{"type":"string","example":"req_01J9Z8..."},"timestamp":{"type":"string","format":"date-time","example":"2026-11-30T08:00:00.000Z"},"pagination":{"type":"object"}}}}},"ErrorEnvelope":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","requestId","timestamp"],"properties":{"code":{"type":"string","example":"FORBIDDEN"},"message":{"type":"string","example":"API key is missing required scope \"contacts:reveal\""},"details":{"type":"object"},"requestId":{"type":"string","example":"req_01J9Z8..."},"timestamp":{"type":"string","format":"date-time"}}}}},"ExtractBriefInput":{"type":"object","properties":{"brief":{"type":"string","minLength":1,"maxLength":12000}},"required":["brief"],"additionalProperties":false},"CreateRoleInput":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"brief":{"type":"string","minLength":1,"maxLength":4000}},"required":["title"],"additionalProperties":false},"UpdateRoleStatusInput":{"type":"object","properties":{"status":{"type":"string","enum":["active","paused","filled","closed"]}},"required":["status"],"additionalProperties":false},"ShortlistCandidateInput":{"type":"object","properties":{"searchId":{"type":"string","minLength":1,"maxLength":200},"candidateId":{"type":"string","minLength":1,"maxLength":200}},"required":["searchId","candidateId"],"additionalProperties":false},"CreateSearchInput":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":160},"roleId":{"type":"string","minLength":1,"maxLength":200},"brief":{"type":"string","minLength":1,"maxLength":4000},"criteria":{"type":"object","properties":{"role":{"type":"string","minLength":1,"maxLength":200},"titleVariants":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"requiredSkills":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"preferredSkills":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"location":{"type":"object","properties":{"city":{"type":"string","minLength":1,"maxLength":200},"region":{"type":"string","minLength":1,"maxLength":200},"country":{"type":"string","minLength":1,"maxLength":200}}},"locations":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"city":{"type":"string","minLength":1,"maxLength":200},"region":{"type":"string","minLength":1,"maxLength":200},"country":{"type":"string","minLength":1,"maxLength":200}}}},"experience":{"type":"object","properties":{"minYears":{"type":"number","minimum":0,"maximum":80},"maxYears":{"type":"number","minimum":0,"maximum":80}}},"industry":{"type":"string","minLength":1,"maxLength":200},"companies":{"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}}},"briefs":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":4000},"envelope":{"type":"object","properties":{"text":{"type":"string","maxLength":4000},"textHash":{"type":"string","minLength":64,"maxLength":64},"inputRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"schemaVersion":{"type":"string","const":"1"},"extractorVersion":{"type":"string","const":"grounded-v1"},"criteria":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"field":{"type":"string","enum":["role","skill","experience","location","work_mode","company_background","industry","company_stage","company","requirement"]},"rawText":{"type":"string","maxLength":4000},"sourceRanges":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":9007199254740991},"end":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["start","end"]}},"normalizedValue":{"anyOf":[{"type":"string","maxLength":200},{"type":"object","properties":{"city":{"type":"string","minLength":1,"maxLength":200},"region":{"type":"string","minLength":1,"maxLength":200},"country":{"type":"string","minLength":1,"maxLength":200}},"additionalProperties":false},{"type":"object","properties":{"minYears":{"type":"number","minimum":0,"maximum":80},"maxYears":{"type":"number","minimum":0,"maximum":80}}}]},"polarity":{"type":"string","enum":["include","exclude"]},"strength":{"type":"string","enum":["required","preferred","optional","unspecified"]},"scope":{"type":"string","enum":["candidate","employer","background","skill"]},"status":{"type":"string","enum":["ready","review","ambiguous","conflicting","unsupported"]},"source":{"type":"string","enum":["detected","user"]},"groupId":{"type":"string","maxLength":200},"ruleId":{"type":"string","maxLength":200},"modelJudgment":{"type":"object","properties":{"model":{"type":"string"},"confidence":{"type":"number","minimum":0,"maximum":1},"outcome":{"type":"string"}}}},"required":["id","field","rawText","sourceRanges","polarity","strength","status","source"]}},"deletedCriterionIds":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","maxLength":256}},"analysisStatus":{"type":"string","enum":["pending","ready","needs_review","unavailable"]}},"required":["text","textHash","inputRevision","schemaVersion","extractorVersion","criteria","analysisStatus"]},"criteria":{"default":{"titleVariants":[],"requiredSkills":[],"preferredSkills":[]},"type":"object","properties":{"role":{"type":"string","minLength":1,"maxLength":200},"titleVariants":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"requiredSkills":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"preferredSkills":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"location":{"type":"object","properties":{"city":{"type":"string","minLength":1,"maxLength":200},"region":{"type":"string","minLength":1,"maxLength":200},"country":{"type":"string","minLength":1,"maxLength":200}}},"locations":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"city":{"type":"string","minLength":1,"maxLength":200},"region":{"type":"string","minLength":1,"maxLength":200},"country":{"type":"string","minLength":1,"maxLength":200}}}},"experience":{"type":"object","properties":{"minYears":{"type":"number","minimum":0,"maximum":80},"maxYears":{"type":"number","minimum":0,"maximum":80}}},"industry":{"type":"string","minLength":1,"maxLength":200},"companies":{"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}}}},"required":["text"]}},"targetCandidateCount":{"anyOf":[{"type":"number","const":10},{"type":"number","const":20},{"type":"number","const":50},{"type":"number","const":100}]},"runImmediately":{"default":true,"type":"boolean"}},"additionalProperties":false},"UpdateSearchInput":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"brief":{"type":"string","minLength":1,"maxLength":4000},"criteria":{"type":"object","properties":{"role":{"type":"string","minLength":1,"maxLength":200},"titleVariants":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"requiredSkills":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"preferredSkills":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"location":{"type":"object","properties":{"city":{"type":"string","minLength":1,"maxLength":200},"region":{"type":"string","minLength":1,"maxLength":200},"country":{"type":"string","minLength":1,"maxLength":200}}},"locations":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"city":{"type":"string","minLength":1,"maxLength":200},"region":{"type":"string","minLength":1,"maxLength":200},"country":{"type":"string","minLength":1,"maxLength":200}}}},"experience":{"type":"object","properties":{"minYears":{"type":"number","minimum":0,"maximum":80},"maxYears":{"type":"number","minimum":0,"maximum":80}}},"industry":{"type":"string","minLength":1,"maxLength":200},"companies":{"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}}},"briefs":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":4000},"envelope":{"type":"object","properties":{"text":{"type":"string","maxLength":4000},"textHash":{"type":"string","minLength":64,"maxLength":64},"inputRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"schemaVersion":{"type":"string","const":"1"},"extractorVersion":{"type":"string","const":"grounded-v1"},"criteria":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"field":{"type":"string","enum":["role","skill","experience","location","work_mode","company_background","industry","company_stage","company","requirement"]},"rawText":{"type":"string","maxLength":4000},"sourceRanges":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":9007199254740991},"end":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["start","end"]}},"normalizedValue":{"anyOf":[{"type":"string","maxLength":200},{"type":"object","properties":{"city":{"type":"string","minLength":1,"maxLength":200},"region":{"type":"string","minLength":1,"maxLength":200},"country":{"type":"string","minLength":1,"maxLength":200}},"additionalProperties":false},{"type":"object","properties":{"minYears":{"type":"number","minimum":0,"maximum":80},"maxYears":{"type":"number","minimum":0,"maximum":80}}}]},"polarity":{"type":"string","enum":["include","exclude"]},"strength":{"type":"string","enum":["required","preferred","optional","unspecified"]},"scope":{"type":"string","enum":["candidate","employer","background","skill"]},"status":{"type":"string","enum":["ready","review","ambiguous","conflicting","unsupported"]},"source":{"type":"string","enum":["detected","user"]},"groupId":{"type":"string","maxLength":200},"ruleId":{"type":"string","maxLength":200},"modelJudgment":{"type":"object","properties":{"model":{"type":"string"},"confidence":{"type":"number","minimum":0,"maximum":1},"outcome":{"type":"string"}}}},"required":["id","field","rawText","sourceRanges","polarity","strength","status","source"]}},"deletedCriterionIds":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","maxLength":256}},"analysisStatus":{"type":"string","enum":["pending","ready","needs_review","unavailable"]}},"required":["text","textHash","inputRevision","schemaVersion","extractorVersion","criteria","analysisStatus"]},"criteria":{"default":{"titleVariants":[],"requiredSkills":[],"preferredSkills":[]},"type":"object","properties":{"role":{"type":"string","minLength":1,"maxLength":200},"titleVariants":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"requiredSkills":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"preferredSkills":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"location":{"type":"object","properties":{"city":{"type":"string","minLength":1,"maxLength":200},"region":{"type":"string","minLength":1,"maxLength":200},"country":{"type":"string","minLength":1,"maxLength":200}}},"locations":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"city":{"type":"string","minLength":1,"maxLength":200},"region":{"type":"string","minLength":1,"maxLength":200},"country":{"type":"string","minLength":1,"maxLength":200}}}},"experience":{"type":"object","properties":{"minYears":{"type":"number","minimum":0,"maximum":80},"maxYears":{"type":"number","minimum":0,"maximum":80}}},"industry":{"type":"string","minLength":1,"maxLength":200},"companies":{"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}}}},"required":["text"]}},"rerun":{"default":false,"type":"boolean"}},"additionalProperties":false},"TriggerMatchesInput":{"type":"object","properties":{"candidateIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"required":["candidateIds"],"additionalProperties":false},"CreateContactRevealInput":{"type":"object","properties":{"searchId":{"type":"string","minLength":1,"maxLength":200},"candidateId":{"type":"string","minLength":1,"maxLength":200},"revealEmail":{"default":true,"type":"boolean"},"revealPhone":{"default":false,"type":"boolean"}},"required":["searchId","candidateId"],"additionalProperties":false},"CreateManualContactInput":{"type":"object","properties":{"roleId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"},"jobTitle":{"type":"string","maxLength":200},"company":{"type":"string","maxLength":200},"location":{"type":"string","maxLength":200},"profileUrl":{"type":"string","pattern":"^https:\\/\\/(?:www\\.|[a-z]{2,3}\\.)?linkedin\\.com\\/in\\/[^/?#\\s]+\\/?$"}},"required":["roleId","name","email"]},"CreateCampaignInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"templateId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"subject":{"type":"string","minLength":1,"maxLength":200},"bodyText":{"type":"string","minLength":1,"maxLength":10000}},"required":["name"],"additionalProperties":false},"CreateCampaignEnrollmentInput":{"type":"object","properties":{"searchId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"candidateId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revealEmail":{"default":true,"type":"boolean"},"retry":{"default":false,"type":"boolean"}},"required":["searchId","candidateId"],"additionalProperties":false},"SendOutreachInput":{"type":"object","properties":{"searchId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"candidateId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"recipient":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"subject":{"type":"string","minLength":1,"maxLength":200},"bodyText":{"type":"string","minLength":1,"maxLength":10000}},"required":["searchId","candidateId","recipient","subject","bodyText"],"additionalProperties":false},"CreateWebhookInput":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"description":{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}]},"workspaceId":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"events":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["search.completed","matching.completed","candidate.shortlisted","contact.revealed","campaign.enrollment_settled","outreach.sent","outreach.replied"]}}},"required":["url","events"],"additionalProperties":false}}},"paths":{"/workspaces":{"get":{"tags":["Workspaces & Credits"],"summary":"List accessible workspaces","description":"Returns every project/workspace the API key owner can access along with their role (`owner`, `editor`, `viewer`). Requires `hiring:read`.","responses":{"200":{"description":"Accessible workspaces.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/credits":{"get":{"tags":["Workspaces & Credits"],"summary":"Get company credit balance & plan","description":"Returns the organization's active plan, shared credit balance (`limit`, `used`, `reserved`, `remaining`), and renewal timestamp. Requires `hiring:read`.","responses":{"200":{"description":"Current billing and credit balance.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/credits/operations":{"get":{"tags":["Workspaces & Credits"],"summary":"List credit usage operations","description":"Cursor-paginated ledger of searches, AI matching, contact reveals, and released holds. Requires `hiring:read`.","parameters":[{"name":"metric","in":"query","schema":{"type":"string","enum":["searches","matching","contact_unlocks","emails"]}},{"name":"status","in":"query","schema":{"type":"string","enum":["pending","charged","released","expired","adjusted"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":25}}],"responses":{"200":{"description":"Paginated credit operation ledger.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/briefs/extract":{"post":{"tags":["Briefs & Searches"],"summary":"Extract structured hiring criteria from a brief or JD","description":"Parses raw natural-language hiring briefs or multi-line Job Descriptions into role title, hierarchical locations, compound skills (`React JS`, `Node JS`), and experience bands at zero credit cost. Requires `hiring:read`.","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractBriefInput"}}}},"responses":{"200":{"description":"Extracted structured criteria.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/roles":{"get":{"tags":["Roles & Shortlists"],"summary":"List hiring roles","description":"Lists saved hiring roles in the workspace. Pass `includeClosed=true` to include `filled` and `closed` roles. Requires `hiring:read`.","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}},{"name":"includeClosed","in":"query","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Workspace hiring roles.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["Roles & Shortlists"],"summary":"Create a hiring role","description":"Creates a saved hiring role and initial draft search without spending credits. Requires `hiring:write` and workspace editor access.","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"UUID v4 key making POST retries safe against duplicate credit charges or duplicate sends.","schema":{"type":"string","format":"uuid","example":"7c9e6679-7425-40de-944b-e07fc1f90ae7"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRoleInput"}}}},"responses":{"201":{"description":"Created hiring role.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/roles/{roleId}":{"patch":{"tags":["Roles & Shortlists"],"summary":"Update role status","description":"Transitions a saved role between `active`, `paused`, `filled`, and `closed`. Requires `hiring:write`.","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}},{"name":"roleId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoleStatusInput"}}}},"responses":{"200":{"description":"Updated role summary.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/roles/{roleId}/shortlist":{"get":{"tags":["Roles & Shortlists"],"summary":"List shortlisted candidates for a role","description":"Returns all shortlisted candidate profiles on the role. Requires `hiring:read`.","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}},{"name":"roleId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Shortlisted candidate profiles.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["Roles & Shortlists"],"summary":"Add candidate to shortlist","description":"Shortlists a candidate from a search onto its hiring role and emits `candidate.shortlisted`. Requires `hiring:write`.","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"UUID v4 key making POST retries safe against duplicate credit charges or duplicate sends.","schema":{"type":"string","format":"uuid","example":"7c9e6679-7425-40de-944b-e07fc1f90ae7"}},{"name":"roleId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShortlistCandidateInput"}}}},"responses":{"201":{"description":"Candidate shortlisted.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/roles/{roleId}/shortlist/{profileId}":{"delete":{"tags":["Roles & Shortlists"],"summary":"Remove candidate from shortlist","description":"Removes a candidate from the role's shortlist and resets their search decision to `unreviewed` while preserving unlocked contacts and messages. Requires `hiring:write`.","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}},{"name":"roleId","in":"path","required":true,"schema":{"type":"string"}},{"name":"profileId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Removed from shortlist.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/searches":{"get":{"tags":["Briefs & Searches"],"summary":"List candidate searches","description":"Lists saved Direct Searches in the workspace. Requires `hiring:read`.","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Saved candidate searches.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["Briefs & Searches"],"summary":"Create and launch a candidate search","description":"Creates a Direct Search from a natural-language brief/JD or structured `criteria` / `briefs`. When `runImmediately` is `true` (default), immediately confirms and dispatches discovery (`2` credits per batch of up to 10 profiles). Requires `hiring:write`.","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"UUID v4 key making POST retries safe against duplicate credit charges or duplicate sends.","schema":{"type":"string","format":"uuid","example":"7c9e6679-7425-40de-944b-e07fc1f90ae7"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSearchInput"}}}},"responses":{"201":{"description":"Created search and operation state.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/searches/{searchId}":{"get":{"tags":["Briefs & Searches"],"summary":"Get search details & status","description":"Returns the search prompt, structured briefs, version, and operation run statuses (`queued`, `running`, `completed`, `no_results`, `failed`). Requires `hiring:read`.","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}},{"name":"searchId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Search details.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"tags":["Briefs & Searches"],"summary":"Update search criteria and optionally re-run","description":"Updates saved search criteria (`brief`, `criteria`, or `briefs`) and, when `rerun: true`, dispatches a recalibration/refinement run. Requires `hiring:write`.","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"UUID v4 key making POST retries safe against duplicate credit charges or duplicate sends.","schema":{"type":"string","format":"uuid","example":"7c9e6679-7425-40de-944b-e07fc1f90ae7"}},{"name":"searchId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSearchInput"}}}},"responses":{"200":{"description":"Updated search.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/searches/{searchId}/candidates":{"get":{"tags":["Briefs & Searches"],"summary":"List ranked candidates in a search","description":"Returns revealed candidates in rank order with optional filters (`query`, `location`, `decision`) and generative `profileAnalysis` (`summary`, `highlights`). Requires `hiring:read`.","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}},{"name":"searchId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"query","in":"query","schema":{"type":"string"}},{"name":"location","in":"query","schema":{"type":"string"}},{"name":"decision","in":"query","schema":{"type":"string","enum":["unreviewed","shortlisted","rejected"]}}],"responses":{"200":{"description":"Paginated ranked candidates.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/searches/{searchId}/candidates/{candidateId}":{"get":{"tags":["Briefs & Searches"],"summary":"Get universal candidate profile context","description":"Returns full candidate profile, cross-search enriched work/education history (`personKey`), and generative summary. Requires `hiring:read`.","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}},{"name":"searchId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"candidateId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Candidate profile context.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/searches/{searchId}/matches":{"post":{"tags":["Briefs & Searches"],"summary":"Trigger AI candidate matching & generative summaries","description":"Runs deep criterion-by-criterion matching (`6` credits per batch of up to 10 candidates) plus generative candidate summaries and highlights. Requires `hiring:write`.","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"UUID v4 key making POST retries safe against duplicate credit charges or duplicate sends.","schema":{"type":"string","format":"uuid","example":"7c9e6679-7425-40de-944b-e07fc1f90ae7"}},{"name":"searchId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerMatchesInput"}}}},"responses":{"201":{"description":"Matching jobs queued/completed.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"get":{"tags":["Briefs & Searches"],"summary":"Poll AI candidate matching results","description":"Reads matching job statuses for comma-separated `candidateIds`. Requires `hiring:read`.","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}},{"name":"searchId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"candidateIds","in":"query","required":true,"description":"Comma-separated candidate UUIDs (up to 10).","schema":{"type":"string"}}],"responses":{"200":{"description":"Matching job statuses.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/contact-reveals":{"post":{"tags":["Contact Reveals & Directory"],"summary":"Reveal candidate email and/or mobile number","description":"Unlocks personal-first email (`1` credit) and/or mobile phone (`5` credits) with a `2.5s` inline fast-path settlement. If no contact is found (`no_data`), `0` credits are charged. Emits `contact.revealed` webhook on settlement. Requires `contacts:reveal`.","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"UUID v4 key making POST retries safe against duplicate credit charges or duplicate sends.","schema":{"type":"string","format":"uuid","example":"7c9e6679-7425-40de-944b-e07fc1f90ae7"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactRevealInput"}}}},"responses":{"201":{"description":"Contact reveal status and data.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/contact-reveals/{searchId}/{candidateId}":{"get":{"tags":["Contact Reveals & Directory"],"summary":"Get candidate contact reveal state","description":"Reads unlocked email addresses and phone numbers for a candidate without spending credits. Requires `hiring:read`.","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}},{"name":"searchId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"candidateId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Candidate contact reveal state.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/contacts":{"get":{"tags":["Contact Reveals & Directory"],"summary":"List unlocked & manual contacts","description":"Cursor-paginated directory of the key owner's unlocked and manually added candidate contacts across the workspace. Requires `hiring:read`.","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}},{"name":"query","in":"query","schema":{"type":"string"}},{"name":"kind","in":"query","schema":{"type":"string","enum":["all","email","phone"],"default":"all"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":25}}],"responses":{"200":{"description":"Paginated contacts directory.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["Contact Reveals & Directory"],"summary":"Add a manual contact to a role","description":"Adds an externally sourced candidate with known contact details directly to a hiring role at zero credit cost. Requires `hiring:write`.","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"UUID v4 key making POST retries safe against duplicate credit charges or duplicate sends.","schema":{"type":"string","format":"uuid","example":"7c9e6679-7425-40de-944b-e07fc1f90ae7"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateManualContactInput"}}}},"responses":{"201":{"description":"Manual contact created.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/campaigns":{"get":{"tags":["Campaigns & Outreach"],"summary":"List outreach campaigns","description":"Lists outreach campaigns in the workspace. Requires `hiring:read`.","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}}],"responses":{"200":{"description":"Workspace outreach campaigns.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["Campaigns & Outreach"],"summary":"Create an outreach campaign","description":"Creates an outreach campaign from an existing `templateId` or inline `subject` + `bodyText` (supporting `{{first_name}}`, `{{full_name}}`, `{{role}}`, `{{company}}`). Requires `outreach:write`.","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCampaignInput"}}}},"responses":{"201":{"description":"Campaign created.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/campaigns/{campaignId}":{"get":{"tags":["Campaigns & Outreach"],"summary":"Get campaign details","description":"Returns campaign template copy, revision, and enrolled recipients. Requires `hiring:read`.","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}},{"name":"campaignId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Campaign details.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/campaigns/{campaignId}/enrollments":{"post":{"tags":["Campaigns & Outreach"],"summary":"Enroll a candidate into a campaign","description":"Automatically shortlists the candidate onto the search's role, reveals email if needed (`revealEmail: true`), and adds them to the campaign. If no email is found (`no_data`), `0` credits are charged. Requires `outreach:write` (and `contacts:reveal` when `revealEmail` is `true`).","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"UUID v4 key making POST retries safe against duplicate credit charges or duplicate sends.","schema":{"type":"string","format":"uuid","example":"7c9e6679-7425-40de-944b-e07fc1f90ae7"}},{"name":"campaignId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCampaignEnrollmentInput"}}}},"responses":{"201":{"description":"Campaign enrollment status.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/campaigns/enrollments":{"get":{"tags":["Campaigns & Outreach"],"summary":"List candidate campaign enrollments","description":"Returns enrollment statuses (`pending`, `enrolled`, `no_data`, `failed`) for a `searchId` + `candidateId`. Requires `hiring:read`.","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}},{"name":"searchId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"candidateId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Candidate campaign enrollments.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/outreach/messages":{"get":{"tags":["Campaigns & Outreach"],"summary":"Read unified candidate outreach & reply thread","description":"Returns chronological outbound emails and correlated inbound candidate replies (`threadId`-anchored across duplicate searches). Requires `hiring:read`.","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}},{"name":"searchId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"candidateId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Candidate message thread.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["Campaigns & Outreach"],"summary":"Send outreach or follow-up email","description":"Creates a verified send intent and dispatches an outbound email to an unlocked candidate address, emitting `outreach.sent`. Requires `outreach:write`.","parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"description":"Target workspace (project) ID. Optional when the API key is already bound to a single default workspace; required for organization-wide keys.","schema":{"type":"string","example":"ws_01J9Z8A2B3C4D5E6"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"UUID v4 key making POST retries safe against duplicate credit charges or duplicate sends.","schema":{"type":"string","format":"uuid","example":"7c9e6679-7425-40de-944b-e07fc1f90ae7"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOutreachInput"}}}},"responses":{"201":{"description":"Outbound message status.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/webhooks":{"get":{"tags":["Webhooks"],"summary":"List webhook endpoints","description":"Lists registered HTTPS webhook endpoints with masked signing secrets. Requires `hiring:read`.","responses":{"200":{"description":"Registered webhook endpoints.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["Webhooks"],"summary":"Register an HTTPS webhook endpoint","description":"Registers an SSRF-validated HTTPS webhook endpoint and returns its `whsec_...` signing secret once. Requires `hiring:write`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookInput"}}}},"responses":{"201":{"description":"Created webhook endpoint.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/webhooks/{webhookId}":{"delete":{"tags":["Webhooks"],"summary":"Delete a webhook endpoint","description":"Removes a webhook endpoint. Requires `hiring:write`.","parameters":[{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Deleted webhook endpoint.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/webhooks/{webhookId}/test":{"post":{"tags":["Webhooks"],"summary":"Send a signed test ping","description":"Dispatches a signed `webhook.ping` payload to verify endpoint reachability and HMAC-SHA256 verification. Requires `hiring:write`.","parameters":[{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Webhook delivery receipt.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/webhooks/{webhookId}/deliveries":{"get":{"tags":["Webhooks"],"summary":"List recent webhook deliveries","description":"Returns recent webhook delivery attempts, HTTP response codes, and error messages. Requires `hiring:read`.","parameters":[{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}}],"responses":{"200":{"description":"Webhook delivery history.","headers":{"X-API-Version":{"description":"Public Hiring API major version.","schema":{"type":"string","example":"1"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Validation error or malformed request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing, malformed, expired, or revoked Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"API key lacks the required scope or workspace editor permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Requested resource or workspace was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded. Check Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}}}