{"openapi":"3.1.0","info":{"title":"Mellowhire API","version":"1.0.0"},"servers":[{"url":"https://mellowhire.com/api/v1"}],"security":[{"workspaceKey":[]}],"paths":{"/workspace":{"get":{"operationId":"getWorkspace","summary":"Get the connected workspace","description":"Required permission: jobs:read","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Workspace"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/jobs":{"get":{"operationId":"listJobs","summary":"List jobs","description":"Required permission: jobs:read","parameters":[{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":600}},{"in":"query","name":"status","schema":{"type":"string","enum":["draft","published","active","closed"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Job"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createJob","summary":"Create a job draft","description":"Required permission: jobs:write","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","minLength":0,"maxLength":80000},"location":{"type":"string","minLength":0,"maxLength":300},"employment_type":{"type":"string","minLength":0,"maxLength":100},"posting_type":{"type":"string","enum":["job","spontaneous"]},"hosted_public":{"type":"boolean"},"form_schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"label":{"type":"string","minLength":1,"maxLength":160},"type":{"type":"string","enum":["text","textarea","email","tel","url","file","select","checkbox"]},"required":{"type":"boolean"},"placeholder":{"type":"string","minLength":0,"maxLength":240},"half":{"type":"string","enum":["left","right"]},"accept":{"type":"string","minLength":0,"maxLength":400},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":160},"value":{"type":"string","minLength":1,"maxLength":160}},"required":["label","value"],"additionalProperties":false},"maxItems":50}},"required":["id","label","type"],"additionalProperties":false},"maxItems":40}},"required":["title"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Created"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/jobs/{jobId}":{"get":{"operationId":"getJob","summary":"Read a job and its application form","description":"Required permission: jobs:read","parameters":[{"in":"path","name":"jobId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Job"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateJob","summary":"Update a job or application form","description":"Required permission: jobs:write","parameters":[{"in":"path","name":"jobId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","minLength":0,"maxLength":80000},"location":{"type":"string","minLength":0,"maxLength":300},"employment_type":{"type":"string","minLength":0,"maxLength":100},"posting_type":{"type":"string","enum":["job","spontaneous"]},"hosted_public":{"type":"boolean"},"form_schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"label":{"type":"string","minLength":1,"maxLength":160},"type":{"type":"string","enum":["text","textarea","email","tel","url","file","select","checkbox"]},"required":{"type":"boolean"},"placeholder":{"type":"string","minLength":0,"maxLength":240},"half":{"type":"string","enum":["left","right"]},"accept":{"type":"string","minLength":0,"maxLength":400},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":160},"value":{"type":"string","minLength":1,"maxLength":160}},"required":["label","value"],"additionalProperties":false},"maxItems":50}},"required":["id","label","type"],"additionalProperties":false},"maxItems":40}},"required":[],"additionalProperties":false,"minProperties":1}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Created"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/jobs/{jobId}/publish":{"post":{"operationId":"publishJob","summary":"Publish a job","description":"Required permission: jobs:publish","parameters":[{"in":"path","name":"jobId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Created"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/jobs/{jobId}/close":{"post":{"operationId":"closeJob","summary":"Close a job","description":"Required permission: jobs:publish","parameters":[{"in":"path","name":"jobId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Created"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pipeline-stages":{"get":{"operationId":"listStages","summary":"List pipeline stages","description":"Required permission: applications:read","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Stage"}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications":{"get":{"operationId":"listApplications","summary":"List applications and their stages","description":"Required permission: applications:read","parameters":[{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":600}},{"in":"query","name":"job_id","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},{"in":"query","name":"stage_id","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Application"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createApplication","summary":"Import an application without sending an email","description":"Required permission: applications:write","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"first_name":{"type":"string","minLength":1,"maxLength":160},"last_name":{"type":"string","minLength":1,"maxLength":160},"email":{"type":"string","minLength":1,"maxLength":254,"pattern":"^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"},"phone":{"type":"string","minLength":0,"maxLength":60},"answers":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"maxProperties":40,"additionalProperties":{"type":"string","minLength":0,"maxLength":10000}}},"required":["job_id","first_name","last_name","email"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Created"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{applicationId}":{"get":{"operationId":"getApplication","summary":"Read application pipeline details","description":"Required permission: applications:read","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Application"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{applicationId}/stage":{"patch":{"operationId":"moveApplication","summary":"Move an application to a pipeline stage","description":"Required permission: applications:write","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"stage_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},"required":["stage_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Created"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{applicationId}/candidate":{"get":{"operationId":"getCandidate","summary":"Read candidate contact details and form answers","description":"Required permission: candidates:read","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Candidate"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateCandidate","summary":"Update candidate contact details","description":"Required permission: applications:write","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":160},"last_name":{"type":"string","minLength":1,"maxLength":160},"email":{"type":"string","minLength":1,"maxLength":254,"pattern":"^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"},"phone":{"type":"string","minLength":0,"maxLength":60}},"required":[],"additionalProperties":false,"minProperties":1}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Created"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{applicationId}/notes":{"get":{"operationId":"listNotes","summary":"List internal notes","description":"Required permission: candidates:read","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":600}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Note"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createNote","summary":"Add an internal note","description":"Required permission: applications:write","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":10000}},"required":["content"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Created"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{applicationId}/assessments":{"get":{"operationId":"listAssessments","summary":"List recorded assessments","description":"Required permission: candidates:read","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":600}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Assessment"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"saveAssessment","summary":"Record a human-provided criterion score","description":"Required permission: applications:write","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"criterion_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"rating":{"type":"integer","minimum":1,"maximum":5},"comment":{"type":"string","minLength":0,"maxLength":5000}},"required":["criterion_id","rating"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Created"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/jobs/{jobId}/criteria":{"get":{"operationId":"listCriteria","summary":"List assessment criteria for a job","description":"Required permission: jobs:read","parameters":[{"in":"path","name":"jobId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":600}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Criterion"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{applicationId}/interviews":{"get":{"operationId":"listInterviews","summary":"List interview records","description":"Required permission: candidates:read","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":600}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Interview"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createInterview","summary":"Record an interview and notes","description":"Required permission: applications:write","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":160},"notes":{"type":"string","minLength":1,"maxLength":10000},"scheduled_at":{"type":"string","minLength":1,"maxLength":40}},"required":["notes"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Created"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{applicationId}/reference-checks":{"get":{"operationId":"listReferences","summary":"List reference checks","description":"Required permission: candidates:read","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":600}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Reference"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createReference","summary":"Record a reference check","description":"Required permission: applications:write","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reference_person":{"type":"string","minLength":1,"maxLength":160},"reference_role":{"type":"string","minLength":1,"maxLength":160},"notes":{"type":"string","minLength":1,"maxLength":10000}},"required":["reference_person","notes"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Created"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{applicationId}/files":{"get":{"operationId":"listFiles","summary":"List candidate attachments","description":"Required permission: files:read","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":600}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{applicationId}/files/{fileId}/download":{"get":{"operationId":"downloadFile","summary":"Create a short-lived attachment URL","description":"Required permission: files:read","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},{"in":"path","name":"fileId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Download"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{applicationId}/uploads":{"post":{"operationId":"startUpload","summary":"Start a resumable attachment upload","description":"Required permission: files:write","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_name":{"type":"string","minLength":1,"maxLength":240},"file_type":{"type":"string","minLength":1,"maxLength":160},"field_key":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"file_size":{"type":"integer","minimum":1,"maximum":52428800}},"required":["file_name","file_type","file_size"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Upload"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{applicationId}/uploads/{uploadId}/complete":{"post":{"operationId":"finishUpload","summary":"Attach a completed upload","description":"Required permission: files:write","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},{"in":"path","name":"uploadId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/UploadResult"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{applicationId}/emails":{"get":{"operationId":"listEmails","summary":"List candidate email delivery history","description":"Required permission: email:read","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":600}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailLog"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"sendEmail","summary":"Send a candidate email","description":"Required permission: email:send","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"template_slug":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"subject":{"type":"string","minLength":1,"maxLength":300},"body_html":{"type":"string","minLength":1,"maxLength":40000}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Delivery"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{applicationId}/emails/preview":{"post":{"operationId":"previewEmail","summary":"Preview a candidate email","description":"Required permission: email:send","parameters":[{"in":"path","name":"applicationId","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"template_slug":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"subject":{"type":"string","minLength":1,"maxLength":300},"body_html":{"type":"string","minLength":1,"maxLength":40000}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/EmailPreview"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid or expired credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict or duplicate operation still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"503":{"description":"Service unavailable or delivery outcome unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"workspaceKey":{"type":"http","scheme":"bearer"}},"schemas":{"Workspace":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"name":{"type":"string","minLength":1,"maxLength":160},"scopes":{"type":"array","items":{"type":"string","enum":["jobs:read","jobs:write","jobs:publish","applications:read","candidates:read","applications:write","files:read","files:write","email:read","email:send"]},"maxItems":10}},"required":["id","name","scopes"],"additionalProperties":false},"Job":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","minLength":0,"maxLength":80000},"location":{"type":"string","minLength":0,"maxLength":300},"employment_type":{"type":"string","minLength":0,"maxLength":100},"posting_type":{"type":"string","enum":["job","spontaneous"]},"hosted_public":{"type":"boolean"},"form_schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"label":{"type":"string","minLength":1,"maxLength":160},"type":{"type":"string","enum":["text","textarea","email","tel","url","file","select","checkbox"]},"required":{"type":"boolean"},"placeholder":{"type":"string","minLength":0,"maxLength":240},"half":{"type":"string","enum":["left","right"]},"accept":{"type":"string","minLength":0,"maxLength":400},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":160},"value":{"type":"string","minLength":1,"maxLength":160}},"required":["label","value"],"additionalProperties":false},"maxItems":50}},"required":["id","label","type"],"additionalProperties":false},"maxItems":40},"slug":{"type":"string","minLength":1,"maxLength":160},"status":{"type":"string","minLength":1,"maxLength":160},"application_count":{"type":"number"},"published_at":{"type":["string","null"],"format":"date-time"}},"required":["id"]},"Stage":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"name":{"type":"string","minLength":1,"maxLength":160},"slug":{"type":"string","minLength":1,"maxLength":160},"color":{"type":"string","minLength":1,"maxLength":160},"sort_order":{"type":"number"}},"required":["id"]},"Application":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"job_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"job_title":{"type":"string","minLength":1,"maxLength":160},"stage_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"stage_slug":{"type":"string","minLength":1,"maxLength":160},"applied_at":{"type":["string","null"],"format":"date-time"},"source":{"type":"string","minLength":1,"maxLength":160}},"required":["id"]},"Answer":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"field_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"field_key":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"value":{}},"required":["id"]},"Candidate":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"first_name":{"type":"string","minLength":0,"maxLength":160},"last_name":{"type":"string","minLength":0,"maxLength":160},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"answers":{"type":"array","items":{"$ref":"#/components/schemas/Answer"},"maxItems":100}},"required":["id","answers"],"additionalProperties":false},"Note":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"content":{"type":"string","minLength":0,"maxLength":10000}},"required":["id"]},"Assessment":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"criterion_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"rating":{"type":["integer","null"]},"comment":{"type":["string","null"]}},"required":["id"]},"Criterion":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"name":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","minLength":0,"maxLength":10000},"sort_order":{"type":"number"}},"required":["id"]},"Interview":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"title":{"type":["string","null"]},"notes":{"type":["string","null"]},"scheduled_at":{"type":["string","null"]},"structured_answers":{}},"required":["id"]},"Reference":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"reference_person":{"type":"string","minLength":1,"maxLength":160},"reference_role":{"type":"string","minLength":1,"maxLength":160},"notes":{"type":["string","null"]},"structured_answers":{}},"required":["id"]},"File":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"field_key":{"type":["string","null"]},"file_name":{"type":"string","minLength":1,"maxLength":240},"file_type":{"type":"string","minLength":1,"maxLength":160},"file_size":{"type":["integer","null"]}},"required":["id"]},"EmailLog":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"recipient_email":{"type":["string","null"]},"subject":{"type":["string","null"]},"status":{"type":"string","minLength":1,"maxLength":160},"email_type":{"type":"string","minLength":1,"maxLength":160}},"required":["id"]},"EmailPreview":{"type":"object","properties":{"to":{"type":"string","minLength":1,"maxLength":254,"pattern":"^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"},"subject":{"type":"string","minLength":1,"maxLength":300},"html":{"type":"string","minLength":0,"maxLength":40000},"from":{"type":["string","null"]},"from_name":{"type":["string","null"]}},"required":["to","subject","html"],"additionalProperties":false},"Download":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expires_at":{"type":"string","format":"date-time"}},"required":["url","expires_at"],"additionalProperties":false},"Upload":{"type":"object","properties":{"success":{"type":"boolean"},"upload_url":{"type":"string","format":"uri"},"upload_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},"required":["success","upload_url","upload_id"],"additionalProperties":false},"UploadResult":{"type":"object","properties":{"success":{"type":"boolean"},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"file_name":{"type":"string","minLength":1,"maxLength":240}},"required":["id","file_name"],"additionalProperties":false},"maxItems":1}},"required":["success","files"],"additionalProperties":false},"Created":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},"required":["id"],"additionalProperties":false},"Delivery":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"status":{"type":"string","enum":["sent"]}},"required":["id","status"],"additionalProperties":false},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":160},"message":{"type":"string","minLength":1,"maxLength":1000},"request_id":{"type":"string","minLength":1,"maxLength":160}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}