{"openapi":"3.1.0","info":{"title":"Rezome Public API","version":"1.0.0","description":"Rezome is an AI-powered ATS. The Public REST API gives integrations a stable, versioned\nsurface for jobs, candidates, applications, interviews, offers, and webhooks.\nThis document also includes the native mobile token exchange endpoints used by first-party clients.\n\n## Base URL\nAll endpoints are served under `/api`. Combined with the resource\npaths below (`/v1/jobs`, `/mobile/auth/login`, …) the full URL is\n`https://YOUR_DOMAIN/api/...`.\n\n## Public API Authentication\nFor `/v1/*`, pass an organization-scoped API key as a Bearer token:\n\n```\nAuthorization: Bearer rzm_live_...\n```\n\nGenerate keys in **Settings → Developers → API keys**. Each key has scopes\n(e.g. `jobs:read`, `candidates:write`), an optional IP allowlist, and an\noptional rate-limit override. The plaintext is shown exactly once at creation.\n`rzm_live_...` keys do not mint user JWTs and cannot be used as mobile login credentials.\n\n## Mobile User Authentication\nNative clients sign in with `POST /mobile/auth/login`, store the returned access\nand refresh tokens in Keychain, and call user-authenticated app endpoints with:\n\n```\nAuthorization: Bearer <access_token>\n```\n\nRefresh expired access tokens with `POST /mobile/auth/refresh`.\nFetch the signed-in user and all organization memberships with `GET /mobile/me`.\nDo not use `/v1/me` for mobile org selection; it is intentionally scoped to one organization API key.\n\n## Pagination\nList endpoints use cursor-based pagination. Pass `?limit=` (1–100, default 25)\nand use the `next_cursor` from the response to fetch the next page:\n\n```\nGET /v1/candidates?limit=50&cursor=eyJpZCI6Ii4uLiJ9\n```\n\n## Idempotency\nPOST endpoints accept `Idempotency-Key`. Retried requests with the same key\nand body return the original response. Different bodies yield `409 conflict`.\n\n## Rate limits\nDefault is 60 req/min per key (configurable). Limited responses set\n`X-RateLimit-Limit` and `Retry-After`.\n\n## Webhooks\nConfigure outbound webhooks under **Settings → Developers → Webhooks**.\nDeliveries are signed with `X-Rezome-Signature: t=<unix>,v1=<hmac_sha256(secret, \"<t>.<body>\")>`."},"servers":[{"url":"https://rezome.ai/api"}],"tags":[{"name":"Authentication"},{"name":"Mobile Auth"},{"name":"Jobs"},{"name":"Candidates"},{"name":"Applications"},{"name":"Interviews"},{"name":"Offers"},{"name":"Tags"},{"name":"Documents"},{"name":"Members"},{"name":"Webhooks"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"rzm_live_…"},"mobileBearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Supabase user access token returned by `/api/mobile/auth/login` or `/api/mobile/auth/refresh`."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","rate_limited","validation_error","conflict","plan_required","ip_blocked","internal_error"]},"message":{"type":"string"},"request_id":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}},"MobileAuthError":{"type":"object","required":["error","code","message"],"properties":{"error":{"type":"string","enum":["auth_provider_error","email_not_confirmed","internal_error","invalid_credentials","invalid_request","provider_rate_limited","rate_limit_unavailable","rate_limited"]},"code":{"type":"string"},"message":{"type":"string"},"email":{"type":"string","format":"email","nullable":true},"user_type":{"type":"string","nullable":true}}},"MobileLoginRequest":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string","format":"email"},"password":{"type":"string","format":"password"}}},"MobileRefreshRequest":{"type":"object","required":["refresh_token"],"properties":{"refresh_token":{"type":"string"}}},"MobileUser":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email","nullable":true},"email_confirmed_at":{"type":"string","format":"date-time","nullable":true},"phone":{"type":"string","nullable":true},"user_metadata":{"type":"object","additionalProperties":true},"app_metadata":{"type":"object","additionalProperties":true}}},"MobileSession":{"type":"object","required":["access_token","refresh_token","token_type","expires_in","expires_at"],"properties":{"access_token":{"type":"string","description":"Supabase user JWT. Store in Keychain and send as `Authorization: Bearer <token>`."},"refresh_token":{"type":"string","description":"Long-lived refresh token. Store in Keychain only."},"token_type":{"type":"string","example":"bearer"},"expires_in":{"type":"integer"},"expires_at":{"type":"integer","nullable":true}}},"MobileAuthResponse":{"type":"object","required":["user","session"],"properties":{"user":{"$ref":"#/components/schemas/MobileUser"},"session":{"$ref":"#/components/schemas/MobileSession"}}},"MobileMeResponse":{"type":"object","required":["user","currentOrgId","memberships"],"properties":{"user":{"$ref":"#/components/schemas/MobileUser"},"currentOrgId":{"type":"string","format":"uuid","nullable":true},"memberships":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","recruiter","viewer"]},"permissions":{"type":"object","nullable":true,"additionalProperties":true},"organization":{"type":"object","nullable":true,"additionalProperties":true}}}}}},"Job":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"requirements":{"type":"object","nullable":true,"additionalProperties":true},"status":{"type":"string","enum":["draft","open","paused","closed"]},"archived":{"type":"boolean"},"auto_screen_new_candidates":{"type":"boolean"},"auto_shortlist_min_score":{"type":"integer","minimum":0,"maximum":100,"nullable":true},"public_apply_url":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"JobCreate":{"type":"object","required":["title"],"properties":{"title":{"type":"string","maxLength":200},"description":{"type":"string"},"status":{"type":"string","enum":["draft","open","paused","closed"]},"requirements":{"type":"object","additionalProperties":true},"auto_screen_new_candidates":{"type":"boolean"},"auto_shortlist_min_score":{"type":"integer","minimum":0,"maximum":100,"nullable":true,"description":"After AI screening, move applications scoring at or above this to shortlisted. Null = off. Clamped to 0-100."}}},"Candidate":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"full_name":{"type":"string"},"email":{"type":"string","format":"email","nullable":true},"phone":{"type":"string","nullable":true},"phone_country_code":{"type":"string","nullable":true},"location":{"type":"string","nullable":true},"linkedin":{"type":"string","nullable":true},"portfolio":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"skills":{"type":"array","items":{"type":"string"}},"languages":{"type":"array","items":{"type":"string"}},"education":{"type":"array","items":{"type":"object","additionalProperties":true}},"experience":{"type":"array","items":{"type":"object","additionalProperties":true}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"CandidateCreate":{"type":"object","required":["full_name"],"properties":{"full_name":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"phone_country_code":{"type":"string"},"location":{"type":"string"},"linkedin":{"type":"string"},"portfolio":{"type":"string"},"summary":{"type":"string"},"skills":{"type":"array","items":{"type":"string"}},"languages":{"type":"array","items":{"type":"string"}}}},"Application":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"job_id":{"type":"string","format":"uuid"},"candidate_id":{"type":"string","format":"uuid"},"stage":{"type":"string","enum":["new","screened","shortlisted","interview","offer","hired","rejected"]},"stage_updated_at":{"type":"string","format":"date-time"},"score":{"type":"number","nullable":true},"notes":{"type":"string","nullable":true},"risk_flags":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"ApplicationCreate":{"type":"object","required":["job_id","candidate_id"],"properties":{"job_id":{"type":"string","format":"uuid"},"candidate_id":{"type":"string","format":"uuid"},"stage":{"type":"string","enum":["new","screened","shortlisted","interview","offer","hired","rejected"]},"notes":{"type":"string"}}},"Note":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"candidate_id":{"type":"string","format":"uuid"},"content":{"type":"string"},"created_by":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time"}}},"Document":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"candidate_id":{"type":"string","format":"uuid"},"file_name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer","nullable":true},"extraction_status":{"type":"string","enum":["queued","processing","extracted","failed"]},"created_at":{"type":"string","format":"date-time"}}},"DocumentUploadResponse":{"allOf":[{"$ref":"#/components/schemas/Document"},{"type":"object","properties":{"upload":{"type":"object","properties":{"url":{"type":"string"},"method":{"type":"string","enum":["PUT"]},"expires_in_sec":{"type":"integer"},"file_path":{"type":"string"}}}}}]},"Tag":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"candidate_id":{"type":"string","format":"uuid"},"tag":{"type":"string"},"type":{"type":"string"},"confidence":{"type":"number","nullable":true},"auto_generated":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"CandidateIngestResponse":{"type":"object","required":["ingest_id","candidate","is_existing","document","application","extraction"],"properties":{"ingest_id":{"type":"string","format":"uuid"},"candidate":{"$ref":"#/components/schemas/Candidate"},"is_existing":{"type":"boolean"},"document":{"$ref":"#/components/schemas/Document"},"application":{"oneOf":[{"$ref":"#/components/schemas/Application"},{"type":"null"}]},"extraction":{"type":"object","properties":{"extracted_email":{"type":"string","nullable":true},"extracted_name":{"type":"string","nullable":true},"skills_count":{"type":"integer"},"experience_count":{"type":"integer"}}}}},"CandidateIngestAccepted":{"type":"object","required":["ingest_id","status","status_url"],"properties":{"ingest_id":{"type":"string","format":"uuid","description":"Poll `GET /v1/candidates/ingest/{ingest_id}` for status."},"status":{"type":"string","enum":["queued"]},"status_url":{"type":"string"}}},"CandidateIngestStatus":{"type":"object","required":["ingest_id","status"],"properties":{"ingest_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["queued","processing","extracted","failed"]},"error":{"type":"string","nullable":true},"file_name":{"type":"string"},"document":{"oneOf":[{"$ref":"#/components/schemas/Document"},{"type":"null"}]},"candidate":{"oneOf":[{"$ref":"#/components/schemas/Candidate"},{"type":"null"}]},"application":{"oneOf":[{"$ref":"#/components/schemas/Application"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Interview":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"application_id":{"type":"string","format":"uuid"},"scheduled_for":{"type":"string","format":"date-time","nullable":true},"duration_minutes":{"type":"integer"},"mode":{"type":"string","enum":["onsite","online","phone"]},"location":{"type":"string","nullable":true},"meeting_link":{"type":"string","nullable":true},"interviewer_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Offer":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"application_id":{"type":"string","format":"uuid"},"job_id":{"type":"string","format":"uuid"},"title":{"type":"string"},"compensation":{"type":"object","properties":{"amount":{"type":"number","nullable":true},"currency":{"type":"string"},"period":{"type":"string","enum":["yearly","monthly","hourly"]}}},"start_date":{"type":"string","nullable":true},"employment_type":{"type":"string","nullable":true},"location":{"type":"string","nullable":true},"is_remote":{"type":"boolean"},"benefits":{"type":"string","nullable":true},"status":{"type":"string","nullable":true,"enum":["pending","accepted","rejected","expired","withdrawn"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Member":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"user_id":{"type":"string","format":"uuid"},"email":{"type":"string","nullable":true},"full_name":{"type":"string","nullable":true},"role":{"type":"string","enum":["owner","admin","recruiter","viewer"]},"created_at":{"type":"string","format":"date-time"}}},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string"},"event_types":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"failure_count":{"type":"integer"},"last_delivery_at":{"type":"string","format":"date-time","nullable":true},"created_at":{"type":"string","format":"date-time"}}},"Me":{"type":"object","properties":{"organization":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}},"api_key":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"prefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time"},"last_used_at":{"type":"string","format":"date-time","nullable":true},"expires_at":{"type":"string","format":"date-time","nullable":true}}}}}}},"security":[{"bearerAuth":[]}],"paths":{"/mobile/auth/login":{"post":{"tags":["Mobile Auth"],"summary":"Mobile sign-in","description":"First-party native app login. Verifies email/password with Supabase Auth and returns a user access token plus refresh token. Store both tokens only in the mobile Keychain. This endpoint does not accept `rzm_live_...` organization API keys.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileLoginRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileAuthResponse"}}}},"400":{"description":"Invalid request or credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileAuthError"}}}},"403":{"description":"Email not confirmed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileAuthError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileAuthError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileAuthError"}}}}}}},"/mobile/auth/refresh":{"post":{"tags":["Mobile Auth"],"summary":"Refresh mobile session","description":"Exchanges a valid mobile refresh token for a fresh user access token and refresh token. Store the returned token pair in Keychain and replace the previous pair.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileRefreshRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileAuthResponse"}}}},"400":{"description":"Invalid request or refresh token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileAuthError"}}}},"403":{"description":"Email not confirmed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileAuthError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileAuthError"}}}}}}},"/mobile/me":{"get":{"tags":["Mobile Auth"],"summary":"Get mobile user and organizations","description":"Returns the signed-in user, current organization id, and all organization memberships for the mobile user JWT. Use this for native app org selection. `/v1/me` is API-key scoped and returns only the one organization behind an `rzm_live_...` key.","security":[{"mobileBearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileMeResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileAuthError"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileAuthError"}}}}}}},"/v1/me":{"get":{"tags":["Authentication"],"summary":"Verify a key","description":"Returns information about the one organization and API key behind the request. Use this to smoke-test an `rzm_live_...` integration key. Mobile user JWT clients should use `GET /mobile/me` to fetch all user organizations.","security":[{"bearerAuth":["members:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/jobs":{"get":{"tags":["Jobs"],"summary":"List jobs","security":[{"bearerAuth":["jobs:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"description":"Page size. Max 100."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor returned in `next_cursor` from a previous page."},{"name":"status","in":"query","schema":{"type":"string","enum":["draft","open","paused","closed"]}},{"name":"include_archived","in":"query","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK (paginated)","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","limit"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Job"}},"next_cursor":{"type":"string","nullable":true},"limit":{"type":"integer"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Jobs"],"summary":"Create a job","security":[{"bearerAuth":["jobs:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreate"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/jobs/{id}":{"get":{"tags":["Jobs"],"summary":"Get a job","security":[{"bearerAuth":["jobs:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Jobs"],"summary":"Update a job","security":[{"bearerAuth":["jobs:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Jobs"],"summary":"Delete a job","security":[{"bearerAuth":["jobs:delete"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Deleted"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/jobs/{id}/archive":{"post":{"tags":["Jobs"],"summary":"Archive (or restore) a job","security":[{"bearerAuth":["jobs:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"archive":{"type":"boolean","default":true}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/candidates":{"get":{"tags":["Candidates"],"summary":"List candidates","security":[{"bearerAuth":["candidates:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"description":"Page size. Max 100."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor returned in `next_cursor` from a previous page."},{"name":"email","in":"query","schema":{"type":"string"}},{"name":"tag","in":"query","schema":{"type":"string"}},{"name":"created_after","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OK (paginated)","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","limit"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Candidate"}},"next_cursor":{"type":"string","nullable":true},"limit":{"type":"integer"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Candidates"],"summary":"Create (or link) a candidate","security":[{"bearerAuth":["candidates:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CandidateCreate"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Candidate"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/candidates/{id}":{"get":{"tags":["Candidates"],"summary":"Get a candidate","security":[{"bearerAuth":["candidates:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Candidate"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Candidates"],"summary":"Update a source-owned candidate","description":"Updates canonical candidate fields. Only the candidate source organization (`source_org_id`) can mutate this shared row. Linked organizations that can see the candidate through `org_candidates` receive `403 Forbidden` instead of changing data visible to other tenants.","security":[{"bearerAuth":["candidates:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CandidateCreate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Candidate"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Candidates"],"summary":"Remove from talent pool","security":[{"bearerAuth":["candidates:delete"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Deleted"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/candidates/ingest":{"post":{"tags":["Candidates"],"summary":"Ingest a CV in one call","description":"Upload a CV (PDF / DOC / DOCX) and Rezome will extract the candidate data, dedupe by email, store the document, and optionally create an application.\n\n**Two modes:**\n- `wait=false` (default) — asynchronous. Returns `202` within ~1s with an `ingest_id`. A worker drains the queue every minute. Subscribe to the `candidate.ingest_completed` / `candidate.ingest_failed` webhook events, or poll `GET /v1/candidates/ingest/{ingest_id}`. Recommended for production.\n- `wait=true` — synchronous. Returns `201` with the full result. Can take 10–60s for typical PDFs; extraction aborts after 80s so the response is sent before the 100s gateway timeout. Convenient for one-off scripts; use `wait=false` for long or scanned CVs.","security":[{"bearerAuth":["candidates:write"]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"PDF, DOC, or DOCX file. Max 10 MB."},"job_id":{"type":"string","format":"uuid","description":"Optional. Create an application for this job."},"stage":{"type":"string","description":"Initial stage when job_id is set. Defaults to `new`."},"tags":{"type":"string","description":"Optional comma-separated tag labels to attach."},"wait":{"type":"string","enum":["true","false"],"default":"false","description":"Defaults to `false` (async). Set `true` to block until extraction finishes."}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CandidateIngestResponse"}}}},"202":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CandidateIngestAccepted"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/candidates/ingest/{ingest_id}":{"get":{"tags":["Candidates"],"summary":"Get the status of an async ingest","description":"Poll the result of a `POST /v1/candidates/ingest` call made with `wait=false`. `status` transitions: `queued` → `processing` → `extracted` (or `failed`).","security":[{"bearerAuth":["candidates:read"]}],"parameters":[{"name":"ingest_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CandidateIngestStatus"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/candidates/{id}/documents":{"get":{"tags":["Documents"],"summary":"List documents","security":[{"bearerAuth":["candidates:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"description":"Page size. Max 100."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor returned in `next_cursor` from a previous page."}],"responses":{"200":{"description":"OK (paginated)","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","limit"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Document"}},"next_cursor":{"type":"string","nullable":true},"limit":{"type":"integer"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Documents"],"summary":"Register a document and get a signed upload URL","security":[{"bearerAuth":["candidates:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["file_name"],"properties":{"file_name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUploadResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/candidates/{id}/documents/{doc_id}":{"get":{"tags":["Documents"],"summary":"Get a signed download URL for a document","security":[{"bearerAuth":["candidates:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/candidates/{id}/tags":{"get":{"tags":["Tags"],"summary":"List a candidate's tags","security":[{"bearerAuth":["candidates:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Tags"],"summary":"Add a tag","security":[{"bearerAuth":["candidates:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tag"],"properties":{"tag":{"type":"string"},"type":{"type":"string"},"confidence":{"type":"number"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/candidates/{id}/tags/{tag_id}":{"delete":{"tags":["Tags"],"summary":"Remove a tag","security":[{"bearerAuth":["candidates:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"tag_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Deleted"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tags":{"get":{"tags":["Tags"],"summary":"List distinct tags in use","security":[{"bearerAuth":["candidates:read"]}],"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/applications":{"get":{"tags":["Applications"],"summary":"List applications","security":[{"bearerAuth":["pipeline:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"description":"Page size. Max 100."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor returned in `next_cursor` from a previous page."},{"name":"job_id","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"candidate_id","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"stage","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK (paginated)","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","limit"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Application"}},"next_cursor":{"type":"string","nullable":true},"limit":{"type":"integer"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Applications"],"summary":"Create an application","security":[{"bearerAuth":["pipeline:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCreate"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/applications/{id}":{"get":{"tags":["Applications"],"summary":"Get an application","security":[{"bearerAuth":["pipeline:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Applications"],"summary":"Update an application (move stage, score, notes)","security":[{"bearerAuth":["pipeline:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"stage":{"type":"string"},"notes":{"type":"string"},"score":{"type":"number"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/applications/{id}/notes":{"get":{"tags":["Applications"],"summary":"List notes on the candidate behind this application","security":[{"bearerAuth":["pipeline:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"description":"Page size. Max 100."}],"responses":{"200":{"description":"OK (paginated)","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","limit"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Note"}},"next_cursor":{"type":"string","nullable":true},"limit":{"type":"integer"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Applications"],"summary":"Add a note","security":[{"bearerAuth":["pipeline:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["content"],"properties":{"content":{"type":"string"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Note"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/interviews":{"get":{"tags":["Interviews"],"summary":"List interviews","security":[{"bearerAuth":["interviews:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"description":"Page size. Max 100."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor returned in `next_cursor` from a previous page."},{"name":"application_id","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"scheduled_after","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OK (paginated)","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","limit"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Interview"}},"next_cursor":{"type":"string","nullable":true},"limit":{"type":"integer"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Interviews"],"summary":"Schedule an interview","security":[{"bearerAuth":["interviews:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["application_id"],"properties":{"application_id":{"type":"string","format":"uuid"},"scheduled_for":{"type":"string","format":"date-time"},"duration_minutes":{"type":"integer"},"mode":{"type":"string","enum":["onsite","online","phone"]},"location":{"type":"string"},"meeting_link":{"type":"string"},"interviewer_ids":{"type":"array","items":{"type":"string","format":"uuid"}}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Interview"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/interviews/{id}":{"get":{"tags":["Interviews"],"summary":"Get an interview","security":[{"bearerAuth":["interviews:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Interview"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Interviews"],"summary":"Update an interview","security":[{"bearerAuth":["interviews:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Interview"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/interviews/{id}/cancel":{"post":{"tags":["Interviews"],"summary":"Cancel an interview","security":[{"bearerAuth":["interviews:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Interview"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/offers":{"get":{"tags":["Offers"],"summary":"List offers","security":[{"bearerAuth":["offers:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"description":"Page size. Max 100."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor returned in `next_cursor` from a previous page."},{"name":"application_id","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK (paginated)","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","limit"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Offer"}},"next_cursor":{"type":"string","nullable":true},"limit":{"type":"integer"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Offers"],"summary":"Create an offer","security":[{"bearerAuth":["offers:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["application_id","title"],"properties":{"application_id":{"type":"string","format":"uuid"},"title":{"type":"string"},"compensation":{"type":"object"},"start_date":{"type":"string"},"employment_type":{"type":"string"},"location":{"type":"string"},"is_remote":{"type":"boolean"},"benefits":{"type":"string"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Offer"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/offers/{id}":{"get":{"tags":["Offers"],"summary":"Get an offer","security":[{"bearerAuth":["offers:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Offer"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Offers"],"summary":"Update an offer","security":[{"bearerAuth":["offers:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Offer"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/members":{"get":{"tags":["Members"],"summary":"List org members","security":[{"bearerAuth":["members:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"description":"Page size. Max 100."}],"responses":{"200":{"description":"OK (paginated)","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","limit"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Member"}},"next_cursor":{"type":"string","nullable":true},"limit":{"type":"integer"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks":{"get":{"tags":["Webhooks"],"summary":"List webhook endpoints","security":[{"bearerAuth":["webhooks:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"description":"Page size. Max 100."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor returned in `next_cursor` from a previous page."}],"responses":{"200":{"description":"OK (paginated)","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","limit"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}},"next_cursor":{"type":"string","nullable":true},"limit":{"type":"integer"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Webhooks"],"summary":"Create a webhook endpoint","security":[{"bearerAuth":["webhooks:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string"},"event_types":{"type":"array","items":{"type":"string","enum":["job.created","job.updated","job.archived","candidate.created","candidate.updated","candidate.deleted","candidate.ingest_completed","candidate.ingest_failed","application.created","application.stage_changed","application.updated","interview.scheduled","interview.cancelled","interview.updated","offer.created","offer.updated","note.created","tag.added","tag.removed","ping"]}}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks/{id}":{"get":{"tags":["Webhooks"],"summary":"Get a webhook endpoint","security":[{"bearerAuth":["webhooks:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete a webhook endpoint","security":[{"bearerAuth":["webhooks:delete"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Deleted"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks/{id}/test":{"post":{"tags":["Webhooks"],"summary":"Send a test ping event","security":[{"bearerAuth":["webhooks:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"202":{"description":"Queued for delivery"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"x-webhook-events":["job.created","job.updated","job.archived","candidate.created","candidate.updated","candidate.deleted","candidate.ingest_completed","candidate.ingest_failed","application.created","application.stage_changed","application.updated","interview.scheduled","interview.cancelled","interview.updated","offer.created","offer.updated","note.created","tag.added","tag.removed","ping"]}