{"openapi":"3.1.0","info":{"title":"MarketPrior API","summary":"Cited company diligence reports, monitoring and leads.","description":"The MarketPrior public API: cited diligence reports, monitoring alerts, and the\nleads product (ICP search, trigger feed, saved searches, contacts) — the same\ndata, paywall and credit metering as the dashboard.\n\n**Auth.** Send an API key (Settings → API keys) as `Authorization: Bearer mp_…`\n(or `X-API-Key: mp_…`). Each key is bound to one workspace and carries scopes;\nevery operation lists its `x-required-scope`.\n\n**Paywall.** The free screen (`fused_scorecard`, `risk_score`, `upside_score`,\nrisk/upside citations) is always readable. Other sections answer `402\nreport_locked` until the company's report is unlocked (plan allowance or a\npurchased report) — identical to the dashboard.\n\n**Metering.** Starting a diligence run on a NEW company spends one assessment;\ncontact reveals and CSV exports spend lead credits (`402\nlead_credits_required` when short). Use `Idempotency-Key` on POSTs so a retried\nrequest is never charged twice.\n\n**Errors.** `{\"error\": {\"code\", \"message\", \"status\", \"details\"}}`.\n**Pagination.** List endpoints return `{\"data\", \"next_cursor\", \"has_more\"}`; pass\n`cursor=<next_cursor>`.\n**Rate limits.** Per key (default 120 requests/minute): `X-RateLimit-Limit`,\n`X-RateLimit-Remaining`, `X-RateLimit-Reset`; `429` + `Retry-After` when exceeded.\n","version":"1.0.0"},"servers":[{"url":"https://marketprior-diligence.fly.dev"}],"paths":{"/v1/contacts/companies/{company_id}":{"get":{"tags":["Leads"],"summary":"Get Company Contacts","operationId":"get_company_contacts_v1_contacts_companies__company_id__get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","title":"Company Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:read"}},"/v1/contacts/companies/{company_id}/refresh":{"post":{"tags":["Leads"],"summary":"Request Refresh","operationId":"request_refresh_v1_contacts_companies__company_id__refresh_post","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","title":"Company Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry-safe key (≤255 chars): a repeat with the same body replays the first response and is never charged twice.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceBody"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:read"}},"/v1/leads/credits":{"get":{"tags":["Leads"],"summary":"Get Credits","description":"Lead-credit balance, allowances and per-action costs.","operationId":"get_credits_v1_leads_credits_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Credits V1 Leads Credits Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:read"}},"/v1/leads/outcomes":{"post":{"tags":["Leads"],"summary":"Post Outcomes","description":"Report lead outcomes. Each event needs one of company_id /\ncontact_point_id / email (the email is hashed, never stored). Features\n(the company's recent signal / trigger types, the contact's derivation and\nconfidence) are snapshotted when not sent.","operationId":"post_outcomes_v1_leads_outcomes_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry-safe key (≤255 chars): a repeat with the same body replays the first response and is never charged twice.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomesBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Post Outcomes V1 Leads Outcomes Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:write"}},"/v1/leads/outcomes/stats":{"get":{"tags":["Leads"],"summary":"Outcome Stats","description":"What the outcome learning currently does: base reply rate, per-feature\nlift and multiplier (applied or not, and why), email calibration bins.","operationId":"outcome_stats_v1_leads_outcomes_stats_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Outcome Stats V1 Leads Outcomes Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:read"}},"/v1/leads/events":{"get":{"tags":["Leads"],"summary":"List Events","description":"What happened: dated, evidenced trigger events, newest first, with\nper-type counts over the whole filtered window.","operationId":"list_events_v1_leads_events_get","parameters":[{"name":"event_types","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Event Types"}},{"name":"since_days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":7,"title":"Since Days"}},{"name":"countries","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Countries"}},{"name":"regions","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Regions"}},{"name":"industries","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Industries"}},{"name":"min_amount","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"title":"Min Amount"}},{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Events V1 Leads Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:read"}},"/v1/leads/search":{"post":{"tags":["Leads"],"summary":"Search","operationId":"search_v1_leads_search_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry-safe key (≤255 chars): a repeat with the same body replays the first response and is never charged twice.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Search V1 Leads Search Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:read"}},"/v1/leads/companies/suggest":{"get":{"tags":["Leads"],"summary":"Suggest Companies","description":"Type-ahead for \"diligence a company\": ranked corpus matches (SQL 376)\nplus, when none is a strong match, registry candidates not yet tracked\n(``tracked: false`` — select one with POST /companies/add). An EU VAT\nnumber as ``q`` looks the company up by VAT (SQL 424; rows carry ``vat``).","operationId":"suggest_companies_v1_leads_companies_suggest_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"title":"Q"}},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}],"title":"Country"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":6,"title":"Limit"}},{"name":"discover","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Discover"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Suggest Companies V1 Leads Companies Suggest Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:read"}},"/v1/leads/companies/add":{"post":{"tags":["Leads"],"summary":"Add Company","description":"Add a discovered registry company to the corpus. The registry record is\nre-fetched by identifier (the client's copy is not trusted); an existing\nrow for the same identifier / name is returned instead of a new one.","operationId":"add_company_v1_leads_companies_add_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry-safe key (≤255 chars): a repeat with the same body replays the first response and is never charged twice.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCompanyBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Company V1 Leads Companies Add Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:write"}},"/v1/leads/jobs/{job_id}":{"get":{"tags":["Leads"],"summary":"Get Lead Job","description":"Poll an on-demand enrichment job (also pushed as ``kind: \"job\"`` events).","operationId":"get_lead_job_v1_leads_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Lead Job V1 Leads Jobs  Job Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:read"}},"/v1/leads/companies/{company_id}/enrichment":{"get":{"tags":["Leads"],"summary":"Get Company Enrichment","description":"Enrichment progress (registry → domain → contacts stage ledger) for a\ncorpus company — what \"Add to MarketPrior\" shows while the job runs.","operationId":"get_company_enrichment_v1_leads_companies__company_id__enrichment_get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","title":"Company Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Company Enrichment V1 Leads Companies  Company Id  Enrichment Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:read"}},"/v1/leads/saved-searches":{"get":{"tags":["Leads"],"summary":"List Saved Searches","operationId":"list_saved_searches_v1_leads_saved_searches_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Saved Searches V1 Leads Saved Searches Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:read"},"post":{"tags":["Leads"],"summary":"Create Saved Search","operationId":"create_saved_search_v1_leads_saved_searches_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry-safe key (≤255 chars): a repeat with the same body replays the first response and is never charged twice.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Saved Search V1 Leads Saved Searches Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:write"}},"/v1/leads/saved-searches/{search_id}":{"patch":{"tags":["Leads"],"summary":"Update Saved Search","operationId":"update_saved_search_v1_leads_saved_searches__search_id__patch","parameters":[{"name":"search_id","in":"path","required":true,"schema":{"type":"string","title":"Search Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Saved Search V1 Leads Saved Searches  Search Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:write"},"delete":{"tags":["Leads"],"summary":"Delete Saved Search","operationId":"delete_saved_search_v1_leads_saved_searches__search_id__delete","parameters":[{"name":"search_id","in":"path","required":true,"schema":{"type":"string","title":"Search Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:write"}},"/v1/leads/saved-searches/{search_id}/preview":{"get":{"tags":["Leads"],"summary":"Preview Saved Search","description":"What this search's alert would contain for the last ``days`` (no writes).","operationId":"preview_saved_search_v1_leads_saved_searches__search_id__preview_get","parameters":[{"name":"search_id","in":"path","required":true,"schema":{"type":"string","title":"Search Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":7,"title":"Days"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Preview Saved Search V1 Leads Saved Searches  Search Id  Preview Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:read"}},"/v1/leads/alerts":{"get":{"tags":["Leads"],"summary":"List Alerts","operationId":"list_alerts_v1_leads_alerts_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Alerts V1 Leads Alerts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:read"}},"/v1/leads/alerts/{alert_id}/read":{"post":{"tags":["Leads"],"summary":"Read Alert","operationId":"read_alert_v1_leads_alerts__alert_id__read_post","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","title":"Alert Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry-safe key (≤255 chars): a repeat with the same body replays the first response and is never charged twice.","schema":{"type":"string","maxLength":255}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:write"}},"/v1/leads/export/quote":{"post":{"tags":["Leads"],"summary":"Export Quote","description":"Cost preview: rows, already-exported (free), from allowance, credits.","operationId":"export_quote_v1_leads_export_quote_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry-safe key (≤255 chars): a repeat with the same body replays the first response and is never charged twice.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Export Quote V1 Leads Export Quote Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:read"}},"/v1/leads/export":{"post":{"tags":["Leads"],"summary":"Export","operationId":"export_v1_leads_export_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry-safe key (≤255 chars): a repeat with the same body replays the first response and is never charged twice.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:export"}},"/v1/leads/contacts/{contact_id}/reveal":{"post":{"tags":["Leads"],"summary":"Reveal Contact","operationId":"reveal_contact_v1_leads_contacts__contact_id__reveal_post","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","title":"Contact Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry-safe key (≤255 chars): a repeat with the same body replays the first response and is never charged twice.","schema":{"type":"string","maxLength":255}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RevealBody"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reveal Contact V1 Leads Contacts  Contact Id  Reveal Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:reveal"}},"/v1/leads/lists":{"get":{"tags":["Leads"],"summary":"Get Lists","operationId":"get_lists_v1_leads_lists_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Lists V1 Leads Lists Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:read"},"post":{"tags":["Leads"],"summary":"Create List","operationId":"create_list_v1_leads_lists_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry-safe key (≤255 chars): a repeat with the same body replays the first response and is never charged twice.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create List V1 Leads Lists Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:export"}},"/v1/leads/lists/{list_id}/companies":{"post":{"tags":["Leads"],"summary":"Add To List","operationId":"add_to_list_v1_leads_lists__list_id__companies_post","parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string","title":"List Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry-safe key (≤255 chars): a repeat with the same body replays the first response and is never charged twice.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAddBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add To List V1 Leads Lists  List Id  Companies Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:export"}},"/v1/leads/lists/{list_id}":{"get":{"tags":["Leads"],"summary":"Get List","operationId":"get_list_v1_leads_lists__list_id__get","parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string","title":"List Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":200,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get List V1 Leads Lists  List Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:read"},"delete":{"tags":["Leads"],"summary":"Delete List","operationId":"delete_list_v1_leads_lists__list_id__delete","parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string","title":"List Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"leads:write"}},"/v1/companies":{"get":{"tags":["Companies & reports"],"summary":"List your companies","description":"Companies in this workspace (each one has a diligence report), most recently updated first.","operationId":"list_companies_v1_companies_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200,"description":"Filter by name/domain substring.","default":"","title":"Q"},"description":"Filter by name/domain substring."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`next_cursor` from the previous page.","title":"Cursor"},"description":"`next_cursor` from the previous page."},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key lacks the required scope (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key rate limit exceeded (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read"},"post":{"tags":["Companies & reports"],"summary":"Add a company","description":"Create (or resolve — idempotent by name) the company's report entry. With a\n`candidate_key` the registry record is also added to the lead corpus. Free:\nnothing is charged until `POST /v1/companies/{id}/diligence-runs`.","operationId":"create_company_v1_companies_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry-safe key (≤255 chars): a repeat with the same body replays the first response and is never charged twice.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCompanyBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key lacks the required scope (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key rate limit exceeded (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"diligence:run"}},"/v1/companies/search":{"get":{"tags":["Companies & reports"],"summary":"Search companies","description":"Your companies + the tracked corpus + registry candidates for a name.","operationId":"search_companies_v1_companies_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"title":"Q"}},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}],"description":"ISO-2 country hint.","title":"Country"},"description":"ISO-2 country hint."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":10,"title":"Limit"}},{"name":"discover","in":"query","required":false,"schema":{"type":"boolean","description":"Also ask free public registries for untracked matches.","default":true,"title":"Discover"},"description":"Also ask free public registries for untracked matches."},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key lacks the required scope (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key rate limit exceeded (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read"}},"/v1/companies/{company_id}":{"get":{"tags":["Companies & reports"],"summary":"Get a company","description":"The company, its report access (free screen vs unlocked) and every section's status + freshness.\n\n`company.vat` (EU companies): `{number, status: valid|invalid|unknown, checked_at, name_match,\nderived_from, source}` — the VAT number derived from the national registry id, verified against\nthe EU VIES service (cached up to 7 days); `null` when none can be derived exactly.","operationId":"get_company_v1_companies__company_id__get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company id (from `GET /v1/companies` or `POST /v1/companies`).","title":"Company Id"},"description":"Company id (from `GET /v1/companies` or `POST /v1/companies`)."},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key lacks the required scope (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key rate limit exceeded (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Company (or section) not found / not computed yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read"}},"/v1/companies/{company_id}/report":{"get":{"tags":["Companies & reports"],"summary":"Get the full report","description":"Every requested section in one call. Locked sections are returned as\n`{\"locked\": true, \"error\": \"report_locked\"}` instead of failing the whole report.","operationId":"get_report_v1_companies__company_id__report_get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company id (from `GET /v1/companies` or `POST /v1/companies`).","title":"Company Id"},"description":"Company id (from `GET /v1/companies` or `POST /v1/companies`)."},{"name":"sections","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Section keys to include (repeatable); default all.","title":"Sections"},"description":"Section keys to include (repeatable); default all."},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key lacks the required scope (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key rate limit exceeded (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Company (or section) not found / not computed yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read"}},"/v1/companies/{company_id}/sections/{section}":{"get":{"tags":["Companies & reports"],"summary":"Get one report section","description":"One section (the same snapshot the dashboard renders): `payload`, `confidence`,\n`evidence_band`, `provenance`, calibration fields and `freshness`.","operationId":"get_section_v1_companies__company_id__sections__section__get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company id (from `GET /v1/companies` or `POST /v1/companies`).","title":"Company Id"},"description":"Company id (from `GET /v1/companies` or `POST /v1/companies`)."},{"name":"section","in":"path","required":true,"schema":{"type":"string","description":"Report section key. One of: fused_scorecard, risk_score, upside_score, benchmark, integrity, founder_screening, market_data, outcome_forecast, financials, ownership, investors, company_profile, competitors, memo, hiring, web_traction, tech_stack, dev_product","title":"Section"},"description":"Report section key. One of: fused_scorecard, risk_score, upside_score, benchmark, integrity, founder_screening, market_data, outcome_forecast, financials, ownership, investors, company_profile, competitors, memo, hiring, web_traction, tech_stack, dev_product"},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key lacks the required scope (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key rate limit exceeded (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Paid report section and this company's report is not unlocked (`report_locked`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Company (or section) not found / not computed yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read"}},"/v1/companies/{company_id}/sections/{section}/provenance":{"get":{"tags":["Companies & reports"],"summary":"Section provenance","description":"The upstream rows / source ids behind a section's numbers.","operationId":"get_section_provenance_v1_companies__company_id__sections__section__provenance_get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company id (from `GET /v1/companies` or `POST /v1/companies`).","title":"Company Id"},"description":"Company id (from `GET /v1/companies` or `POST /v1/companies`)."},{"name":"section","in":"path","required":true,"schema":{"type":"string","description":"Report section key. One of: fused_scorecard, risk_score, upside_score, benchmark, integrity, founder_screening, market_data, outcome_forecast, financials, ownership, investors, company_profile, competitors, memo, hiring, web_traction, tech_stack, dev_product","title":"Section"},"description":"Report section key. One of: fused_scorecard, risk_score, upside_score, benchmark, integrity, founder_screening, market_data, outcome_forecast, financials, ownership, investors, company_profile, competitors, memo, hiring, web_traction, tech_stack, dev_product"},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key lacks the required scope (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key rate limit exceeded (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Paid report section and this company's report is not unlocked (`report_locked`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Company (or section) not found / not computed yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read"}},"/v1/companies/{company_id}/memo":{"get":{"tags":["Companies & reports"],"summary":"Get the investment memo","description":"The cited investment memo (paid report). `format=json` (default) returns\nthe structured memo; `md` / `html` / `pdf` return the rendered document.","operationId":"get_memo_v1_companies__company_id__memo_get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company id (from `GET /v1/companies` or `POST /v1/companies`).","title":"Company Id"},"description":"Company id (from `GET /v1/companies` or `POST /v1/companies`)."},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(json|md|html|pdf)$","default":"json","title":"Format"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}},"text/markdown":{},"text/html":{},"application/pdf":{}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key lacks the required scope (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key rate limit exceeded (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Paid report section and this company's report is not unlocked (`report_locked`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Company (or section) not found / not computed yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read"}},"/v1/companies/{company_id}/citations":{"get":{"tags":["Companies & reports"],"summary":"Source-linked findings","description":"The individual source-linked records behind the scorecard. While the report\nis locked only the free-screen (risk/upside) records are returned (`report_locked: true`).","operationId":"get_citations_v1_companies__company_id__citations_get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company id (from `GET /v1/companies` or `POST /v1/companies`).","title":"Company Id"},"description":"Company id (from `GET /v1/companies` or `POST /v1/companies`)."},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key lacks the required scope (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key rate limit exceeded (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Company (or section) not found / not computed yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read"}},"/v1/companies/{company_id}/data":{"get":{"tags":["Companies & reports"],"summary":"Structured evidence rows","description":"Structured extraction rows per category. While locked, only free-screen categories.","operationId":"get_data_v1_companies__company_id__data_get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company id (from `GET /v1/companies` or `POST /v1/companies`).","title":"Company Id"},"description":"Company id (from `GET /v1/companies` or `POST /v1/companies`)."},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key lacks the required scope (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key rate limit exceeded (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Company (or section) not found / not computed yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read"}},"/v1/companies/{company_id}/benchmark":{"get":{"tags":["Companies & reports"],"summary":"Live cohort benchmark","description":"Cohort-relative percentiles (funding / rounds / founder reach) vs the workspace corpus.","operationId":"get_benchmark_v1_companies__company_id__benchmark_get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company id (from `GET /v1/companies` or `POST /v1/companies`).","title":"Company Id"},"description":"Company id (from `GET /v1/companies` or `POST /v1/companies`)."},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key lacks the required scope (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key rate limit exceeded (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Paid report section and this company's report is not unlocked (`report_locked`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read"}},"/v1/companies/{company_id}/founder-screening":{"get":{"tags":["Companies & reports"],"summary":"Founder screening candidates","description":"Advisory sanctions / disqualified-director candidates for the company's officers (verify first).","operationId":"get_founder_screening_v1_companies__company_id__founder_screening_get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company id (from `GET /v1/companies` or `POST /v1/companies`).","title":"Company Id"},"description":"Company id (from `GET /v1/companies` or `POST /v1/companies`)."},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key lacks the required scope (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key rate limit exceeded (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Paid report section and this company's report is not unlocked (`report_locked`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Company (or section) not found / not computed yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read"}},"/v1/companies/{company_id}/freshness":{"get":{"tags":["Companies & reports"],"summary":"Section freshness","description":"Per-section `{computed_at, stale, refreshing, age_s, ttl_s, …}`, the report\nroll-up and the per-layer TTL policy. Pure read.","operationId":"get_freshness_v1_companies__company_id__freshness_get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company id (from `GET /v1/companies` or `POST /v1/companies`).","title":"Company Id"},"description":"Company id (from `GET /v1/companies` or `POST /v1/companies`)."},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key lacks the required scope (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key rate limit exceeded (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Company (or section) not found / not computed yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read"}},"/v1/companies/{company_id}/refresh":{"post":{"tags":["Companies & reports"],"summary":"Refresh stale sections","description":"The dashboard's \"Re-run\": background refetch of stale (or all) layers of an\nalready-diligenced company — free. While the report is locked only the free\nscreen is refreshed. Returns a job handle (`GET /v1/jobs/{id}`).","operationId":"refresh_company_v1_companies__company_id__refresh_post","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company id (from `GET /v1/companies` or `POST /v1/companies`).","title":"Company Id"},"description":"Company id (from `GET /v1/companies` or `POST /v1/companies`)."},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry-safe key (≤255 chars): a repeat with the same body replays the first response and is never charged twice.","schema":{"type":"string","maxLength":255}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RefreshBody"},{"type":"null"}],"title":"Body"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key lacks the required scope (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key rate limit exceeded (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Never diligenced — start a diligence run first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Company (or section) not found / not computed yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"diligence:run"}},"/v1/companies/{company_id}/diligence-runs":{"post":{"tags":["Companies & reports"],"summary":"Start a diligence run","description":"Sweep every connector, recompute every section and rebuild the memo — the\ndashboard's \"Run diligence\". Returns a job immediately; poll `GET /v1/jobs/{id}`.\nA NEW company spends one assessment (re-runs are free); `quote` says which.\nStarting a run while one is active returns the active job (`deduplicated: true`).","operationId":"start_diligence_run_v1_companies__company_id__diligence_runs_post","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","description":"Company id (from `GET /v1/companies` or `POST /v1/companies`).","title":"Company Id"},"description":"Company id (from `GET /v1/companies` or `POST /v1/companies`)."},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry-safe key (≤255 chars): a repeat with the same body replays the first response and is never charged twice.","schema":{"type":"string","maxLength":255}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DiligenceRunBody"},{"type":"null"}],"title":"Body"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key lacks the required scope (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key rate limit exceeded (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"No assessments left (`upgrade_required`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Company (or section) not found / not computed yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"diligence:run"}},"/v1/jobs":{"get":{"tags":["Jobs"],"summary":"List recent jobs","operationId":"list_jobs_v1_jobs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key lacks the required scope (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key rate limit exceeded (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read"}},"/v1/jobs/{job_id}":{"get":{"tags":["Jobs"],"summary":"Get a job","description":"Diligence-run jobs (`job_…`, from `POST …/diligence-runs`): `status` queued →\nrunning → succeeded | failed; on success `result` holds the verdict + scores and,\nwhen slow layers are still fetching, `background_job_id`. Refresh jobs (from\n`POST …/refresh` or `background_job_id`) use the dashboard's job shape.","operationId":"get_job_v1_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","maxLength":64,"title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key lacks the required scope (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key rate limit exceeded (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read"}},"/v1/alerts":{"get":{"tags":["Monitoring"],"summary":"List monitoring alerts","description":"Risk / upside changes detected on your watchlist, newest first.","operationId":"list_alerts_v1_alerts_get","parameters":[{"name":"unacknowledged","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unacknowledged"}},{"name":"subject_id","in":"query","required":false,"schema":{"type":"string","maxLength":64,"description":"Only alerts for this watchlist subject.","default":"","title":"Subject Id"},"description":"Only alerts for this watchlist subject."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key lacks the required scope (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key rate limit exceeded (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read"}},"/v1/alerts/{alert_id}/ack":{"post":{"tags":["Monitoring"],"summary":"Acknowledge an alert","operationId":"ack_alert_v1_alerts__alert_id__ack_post","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","maxLength":64,"title":"Alert Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry-safe key (≤255 chars): a repeat with the same body replays the first response and is never charged twice.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key lacks the required scope (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key rate limit exceeded (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"monitor:write"}},"/v1/watchlist":{"get":{"tags":["Monitoring"],"summary":"List the monitoring watchlist","operationId":"list_watchlist_v1_watchlist_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key lacks the required scope (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key rate limit exceeded (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read"},"post":{"tags":["Monitoring"],"summary":"Add to the watchlist","description":"Watch a company or person (idempotent — an existing subject is re-activated).\nUses a monitor slot from the plan, exactly like the dashboard.","operationId":"add_to_watchlist_v1_watchlist_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry-safe key (≤255 chars): a repeat with the same body replays the first response and is never charged twice.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key lacks the required scope (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key rate limit exceeded (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"No monitor slots left on this plan (`upgrade_required`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"monitor:write"}},"/v1/watchlist/{subject_id}":{"delete":{"tags":["Monitoring"],"summary":"Remove from the watchlist","operationId":"remove_from_watchlist_v1_watchlist__subject_id__delete","parameters":[{"name":"subject_id","in":"path","required":true,"schema":{"type":"string","maxLength":64,"title":"Subject Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key lacks the required scope (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key rate limit exceeded (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"monitor:write"}},"/v1/credits":{"get":{"tags":["Account"],"summary":"Credit balances","description":"Diligence assessments (plan, used, remaining) and lead credits (balance, allowances, unit costs).","operationId":"get_credits_v1_credits_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key lacks the required scope (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key rate limit exceeded (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-required-scope":"reports:read"}}},"components":{"schemas":{"AddCompanyBody":{"properties":{"candidate_key":{"type":"string","maxLength":80,"minLength":3,"title":"Candidate Key"}},"type":"object","required":["candidate_key"],"title":"AddCompanyBody"},"CreateCompanyBody":{"properties":{"name":{"type":"string","maxLength":300,"title":"Name","description":"Company name (required unless `candidate_key` is given).","default":""},"domain":{"type":"string","maxLength":253,"title":"Domain","description":"Website domain, e.g. `acme.com`.","default":""},"candidate_key":{"type":"string","maxLength":80,"title":"Candidate Key","description":"Registry candidate from `GET /v1/companies/search` (`registry_candidates[].candidate_key`), e.g. `edgar:0001803782`.","default":""}},"type":"object","title":"CreateCompanyBody"},"DiligenceRunBody":{"properties":{"deep_dive":{"type":"boolean","title":"Deep Dive","description":"Add the paid Deep Dive (open-web capture) layer.","default":false}},"type":"object","title":"DiligenceRunBody"},"ExportBody":{"properties":{"query":{"additionalProperties":true,"type":"object","title":"Query"},"company_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Ids"},"max_rows":{"type":"integer","maximum":5000.0,"minimum":1.0,"title":"Max Rows","default":500}},"type":"object","title":"ExportBody"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ListAddBody":{"properties":{"company_ids":{"items":{"type":"string"},"type":"array","maxItems":1000,"minItems":1,"title":"Company Ids"}},"type":"object","required":["company_ids"],"title":"ListAddBody"},"ListBody":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"company_ids":{"items":{"type":"string"},"type":"array","maxItems":1000,"title":"Company Ids"}},"type":"object","required":["name"],"title":"ListBody"},"OutcomeEvent":{"properties":{"event":{"type":"string","pattern":"^(sent|delivered|bounced|replied|positive_reply|meeting|unsubscribed)$","title":"Event"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"source":{"type":"string","pattern":"^(founderreply|cognilead|other)$","title":"Source"},"external_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"External Id"},"company_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Id"},"contact_point_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Point Id"},"email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Email"},"domain":{"anyOf":[{"type":"string","maxLength":253},{"type":"null"}],"title":"Domain"},"signal_types":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Signal Types"},"trigger_types":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Trigger Types"},"trigger_ids":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Trigger Ids"}},"type":"object","required":["event","occurred_at","source"],"title":"OutcomeEvent"},"OutcomesBody":{"properties":{"events":{"items":{"$ref":"#/components/schemas/OutcomeEvent"},"type":"array","maxItems":500,"minItems":1,"title":"Events"}},"type":"object","required":["events"],"title":"OutcomesBody"},"RefreshBody":{"properties":{"scope":{"type":"string","pattern":"^(stale|all)$","title":"Scope","description":"`stale` = refetch stale sections; `all` = refetch every layer.","default":"stale"},"sections":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Sections","description":"Limit to these section keys."}},"type":"object","title":"RefreshBody"},"RevealBody":{"properties":{},"type":"object","title":"RevealBody"},"SavedSearchBody":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"query":{"additionalProperties":true,"type":"object","title":"Query"},"alert_frequency":{"type":"string","pattern":"^(none|daily|weekly)$","title":"Alert Frequency","default":"none"},"alert_email":{"type":"boolean","title":"Alert Email","default":true}},"type":"object","required":["name"],"title":"SavedSearchBody"},"SavedSearchPatch":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"query":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Query"},"alert_frequency":{"anyOf":[{"type":"string","pattern":"^(none|daily|weekly)$"},{"type":"null"}],"title":"Alert Frequency"},"alert_email":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Alert Email"}},"type":"object","title":"SavedSearchPatch"},"SearchBody":{"properties":{"query":{"additionalProperties":true,"type":"object","title":"Query"},"limit":{"type":"integer","maximum":200.0,"minimum":1.0,"title":"Limit","default":50},"offset":{"type":"integer","maximum":10000.0,"minimum":0.0,"title":"Offset","default":0},"discover":{"type":"boolean","title":"Discover","default":true}},"type":"object","title":"SearchBody"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WatchBody":{"properties":{"subject_type":{"type":"string","pattern":"^(company|person)$","title":"Subject Type"},"display_name":{"type":"string","maxLength":300,"minLength":1,"title":"Display Name"},"entity_id":{"type":"string","maxLength":64,"title":"Entity Id","default":""},"cadence":{"type":"string","title":"Cadence","description":"Re-screen cadence (e.g. daily, weekly).","default":"weekly"},"watch_reason":{"type":"string","maxLength":40,"title":"Watch Reason","default":"portfolio"}},"type":"object","required":["subject_type","display_name"],"title":"WatchBody"},"WorkspaceBody":{"properties":{},"type":"object","title":"WorkspaceBody"},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","status"],"properties":{"code":{"type":"string","examples":["report_locked"]},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"object"}}}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"mp_ API key","description":"API key from Settings → API keys: `Authorization: Bearer mp_…`."},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":[{"name":"Companies & reports"},{"name":"Jobs"},{"name":"Monitoring"},{"name":"Leads"},{"name":"Account"}]}