{"openapi":"3.1.0","info":{"title":"epiensos API","version":"1.0.0","description":"Full lifecycle grant platform: discover, qualify, decide, apply, monitor, deliver, learn. Every request is scoped to one team selected by the X-Team-Id header (defaults to the caller's first team). Lists paginate with cursor and limit. Money is integer minor units with currencyCode. Nothing is submitted without confirm true. An MCP server with the same operations is served at /mcp."},"servers":[{"url":"https://api.epiensos.com/v1"}],"security":[{"clerkSession":[]},{"apiKey":[]}],"tags":[{"name":"Me"},{"name":"Teams"},{"name":"Settings"},{"name":"Dashboard"},{"name":"Matches"},{"name":"Opportunities"},{"name":"Funders"},{"name":"Applications"},{"name":"Information requests"},{"name":"Facts"},{"name":"Awards"},{"name":"Deliverables"},{"name":"Tasks"},{"name":"Email"},{"name":"TALR"},{"name":"AI jobs"},{"name":"Admin"},{"name":"Public"}],"paths":{"/me":{"get":{"summary":"Current user and teams","tags":["Me"],"operationId":"get_me","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/teams":{"post":{"summary":"Create a team","tags":["Teams"],"operationId":"post_teams","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"useDefaultProfile":{"type":"boolean"}},"required":["name"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Team"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/teams/current":{"get":{"summary":"Current team with profile and settings","tags":["Teams"],"operationId":"get_teams_current","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Team"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/teams/current/profile":{"patch":{"summary":"Update company profile (partial)","tags":["Teams"],"operationId":"patch_teams_current_profile","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyProfile"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Team"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/teams/current/settings":{"patch":{"summary":"Update team settings (partial)","tags":["Teams"],"operationId":"patch_teams_current_settings","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamSettings"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Team"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/teams/current/members":{"get":{"summary":"List members","tags":["Teams"],"operationId":"get_teams_current_members","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Member"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/teams/current/invitations":{"post":{"summary":"Invite a member","tags":["Teams"],"operationId":"post_teams_current_invitations","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"emailAddress":{"type":"string"},"role":{"$ref":"#/components/schemas/TeamRole"}},"required":["emailAddress"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/teams/current/members/{id}":{"patch":{"summary":"Update member role or active flag","tags":["Teams"],"operationId":"patch_teams_current_members_id","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/TeamRole"},"isActive":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Member"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/settings/strictness-preview":{"get":{"summary":"Preview queue for a strictness value","tags":["Settings"],"operationId":"get_settings_strictness_preview","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"value","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrictnessPreview"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/settings/integrations":{"get":{"summary":"Integration status","tags":["Settings"],"operationId":"get_settings_integrations","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Integration"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/settings/integrations/{provider}/connect":{"post":{"summary":"Connect an integration (OAuth URL or token)","tags":["Settings"],"operationId":"post_settings_integrations_provider_connect","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"apiUrl":{"type":"string"},"code":{"type":"string"},"redirectUri":{"type":"string"},"accountLabel":{"type":"string"},"config":{}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/settings/integrations/{provider}":{"delete":{"summary":"Disconnect an integration","tags":["Settings"],"operationId":"delete_settings_integrations_provider","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/settings/sources":{"get":{"summary":"Grant sources with team enablement","tags":["Settings"],"operationId":"get_settings_sources","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Source"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/settings/sources/{key}":{"patch":{"summary":"Enable a source or store credentials","tags":["Settings"],"operationId":"patch_settings_sources_key","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"credentials":{"type":"object","additionalProperties":{"type":"string"}}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api-keys":{"get":{"summary":"List API keys","tags":["Settings"],"operationId":"get_api_keys","security":[{"clerkSession":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create an API key (returned once)","tags":["Settings"],"operationId":"post_api_keys","security":[{"clerkSession":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["read","write","agent","admin","*"]}}},"required":["label"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api-keys/{id}":{"delete":{"summary":"Revoke an API key","tags":["Settings"],"operationId":"delete_api_keys_id","security":[{"clerkSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/dashboard":{"get":{"summary":"Dashboard","tags":["Dashboard"],"operationId":"get_dashboard","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/dashboard/timeline":{"get":{"summary":"Timeline events for a Gantt view","tags":["Dashboard"],"operationId":"get_dashboard_timeline","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TimelineEvent"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/matches":{"get":{"summary":"List matches","tags":["Matches"],"operationId":"get_matches","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"stage","in":"query","required":false,"schema":{"type":"string"}},{"name":"minScore","in":"query","required":false,"schema":{"type":"string"}},{"name":"funderId","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Match"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/matches/{id}":{"get":{"summary":"Match detail","tags":["Matches"],"operationId":"get_matches_id","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Match"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/matches/{id}/approve":{"post":{"summary":"Approve a match and create the application","tags":["Matches"],"operationId":"post_matches_id_approve","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/matches/{id}/decline":{"post":{"summary":"Decline a match","tags":["Matches"],"operationId":"post_matches_id_decline","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Match"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/matches/{id}/rescore":{"post":{"summary":"Rescore a match","tags":["Matches"],"operationId":"post_matches_id_rescore","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/opportunities":{"get":{"summary":"All opportunities","tags":["Opportunities"],"operationId":"get_opportunities","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"closeBefore","in":"query","required":false,"schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Opportunity"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Manual opportunity entry","tags":["Opportunities"],"operationId":"post_opportunities","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"funderName":{"type":"string"},"url":{"type":"string"},"closeDate":{"type":"string"},"awardCeilingMinor":{"type":"integer"},"description":{"type":"string"}},"required":["title","funderName"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Opportunity"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/opportunities/{id}":{"get":{"summary":"Opportunity detail","tags":["Opportunities"],"operationId":"get_opportunities_id","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Opportunity"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/funders":{"get":{"summary":"Funders with team history","tags":["Funders"],"operationId":"get_funders","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Funder"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/funders/{id}":{"get":{"summary":"Funder detail","tags":["Funders"],"operationId":"get_funders_id","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Funder"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications":{"get":{"summary":"List applications","tags":["Applications"],"operationId":"get_applications","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Application"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{id}":{"get":{"summary":"Application detail","tags":["Applications"],"operationId":"get_applications_id","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update application","tags":["Applications"],"operationId":"patch_applications_id","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{id}/draft":{"post":{"summary":"Queue AI drafting of empty sections","tags":["Applications"],"operationId":"post_applications_id_draft","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"instructions":{"type":"string"},"sectionKeys":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{id}/sections/{key}":{"patch":{"summary":"Update a section","tags":["Applications"],"operationId":"patch_applications_id_sections_key","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"},"status":{"type":"string"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Section"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{id}/sections/{key}/redraft":{"post":{"summary":"Redraft a section with instructions","tags":["Applications"],"operationId":"post_applications_id_sections_key_redraft","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"instructions":{"type":"string"}},"required":["instructions"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobRef"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{id}/files":{"post":{"summary":"Upload a file (multipart: file, kind, sourceUrl)","tags":["Applications"],"operationId":"post_applications_id_files","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"kind":{"type":"string"},"sourceUrl":{"type":"string"}},"required":["file"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationFile"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{id}/files/{fileId}/download":{"get":{"summary":"Download a file","tags":["Applications"],"operationId":"get_applications_id_files_fileId_download","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{id}/fill-forms":{"post":{"summary":"Build the form field map from sections and facts","tags":["Applications"],"operationId":"post_applications_id_fill_forms","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{id}/review":{"post":{"summary":"AI review panel","tags":["Applications"],"operationId":"post_applications_id_review","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobRef"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{id}/submit":{"post":{"summary":"Submit (requires confirm true)","tags":["Applications"],"operationId":"post_applications_id_submit","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"method":{"type":"string"},"confirm":{"type":"boolean","enum":[true]},"confirmationNumber":{"type":"string"},"note":{"type":"string"}},"required":["method","confirm"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/applications/{id}/outcome":{"post":{"summary":"Record the funder decision","tags":["Applications"],"operationId":"post_applications_id_outcome","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["awarded","rejected"]},"amountMinor":{"type":"integer"},"decisionDate":{"type":"string"},"feedback":{"type":"string"},"reviewerScores":{"type":"object","additionalProperties":{"type":"number"}},"awardNumber":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"terms":{"$ref":"#/components/schemas/AwardTerms"}},"required":["status","decisionDate"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/information-requests":{"get":{"summary":"List information requests","tags":["Information requests"],"operationId":"get_information_requests","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/InformationRequest"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/information-requests/{id}/answer":{"post":{"summary":"Answer a request","tags":["Information requests"],"operationId":"post_information_requests_id_answer","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"answer":{"type":"string"},"saveAsFact":{"type":"boolean"},"factKey":{"type":"string"}},"required":["answer"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InformationRequest"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/facts":{"get":{"summary":"Search facts","tags":["Facts"],"operationId":"get_facts","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Fact"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create or replace a fact","tags":["Facts"],"operationId":"post_facts","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"factKey":{"type":"string"},"question":{"type":"string"},"answer":{"type":"string"},"category":{"type":"string"},"sourceDocument":{"type":"string"}},"required":["factKey","question","answer"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Fact"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/facts/{id}":{"patch":{"summary":"Update a fact","tags":["Facts"],"operationId":"patch_facts_id","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"},"category":{"type":"string"},"sourceDocument":{"type":"string"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Fact"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a fact","tags":["Facts"],"operationId":"delete_facts_id","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/facts/refresh":{"post":{"summary":"AI scan of the company folder","tags":["Facts"],"operationId":"post_facts_refresh","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobRef"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/awards":{"get":{"summary":"List awards","tags":["Awards"],"operationId":"get_awards","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Award"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/awards/{id}":{"get":{"summary":"Award detail with deliverables, accounting, success fee","tags":["Awards"],"operationId":"get_awards_id","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Award"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update an award","tags":["Awards"],"operationId":"patch_awards_id","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Award"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Award"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/awards/{id}/extract-terms":{"post":{"summary":"Extract terms from an award letter file","tags":["Awards"],"operationId":"post_awards_id_extract_terms","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileId":{"type":"string"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobRef"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/awards/{id}/accounting":{"get":{"summary":"Spend versus budget","tags":["Awards"],"operationId":"get_awards_id_accounting","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/deliverables":{"get":{"summary":"List deliverables","tags":["Deliverables"],"operationId":"get_deliverables","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"dueBefore","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Deliverable"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/deliverables/{id}":{"get":{"summary":"Deliverable detail","tags":["Deliverables"],"operationId":"get_deliverables_id","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deliverable"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update a deliverable","tags":["Deliverables"],"operationId":"patch_deliverables_id","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deliverable"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deliverable"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/deliverables/{id}/generate":{"post":{"summary":"AI generate content","tags":["Deliverables"],"operationId":"post_deliverables_id_generate","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobRef"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/deliverables/{id}/submit":{"post":{"summary":"Submit (requires confirm true)","tags":["Deliverables"],"operationId":"post_deliverables_id_submit","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"boolean","enum":[true]}},"required":["confirm"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deliverable"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tasks":{"get":{"summary":"List tasks","tags":["Tasks"],"operationId":"get_tasks","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"assignedTo","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Task"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a task (assigned by role)","tags":["Tasks"],"operationId":"post_tasks","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"roleRequired":{"$ref":"#/components/schemas/TeamRole"},"assignedTo":{"type":"string"},"dueDate":{"type":"string"},"priority":{"type":"integer"},"relatedType":{"type":"string"},"relatedId":{"type":"string"}},"required":["title"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tasks/{id}":{"patch":{"summary":"Update a task","tags":["Tasks"],"operationId":"patch_tasks_id","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tasks/{id}/complete":{"post":{"summary":"Complete a task","tags":["Tasks"],"operationId":"post_tasks_id_complete","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tasks/sync":{"post":{"summary":"Pull changes from Melina or Todoist","tags":["Tasks"],"operationId":"post_tasks_sync","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/email/messages":{"get":{"summary":"Classified inbound email","tags":["Email"],"operationId":"get_email_messages","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"classification","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/EmailMessage"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/email/scan":{"post":{"summary":"Scan the mailbox now","tags":["Email"],"operationId":"post_email_scan","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/talr/cycles":{"get":{"summary":"TALR cycles","tags":["TALR"],"operationId":"get_talr_cycles","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"applicationId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TalrCycle"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/talr/cycles/{id}/think":{"post":{"summary":"Record Think","tags":["TALR"],"operationId":"post_talr_cycles_id_think","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"bestNextAction":{"type":"string"},"expectedResult":{"type":"string"},"reasoning":{"type":"string"},"disconfirmingEvidence":{"type":"string"},"expectedScore":{"type":"number"},"assumptions":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"category":{"type":"string"},"isHighestRisk":{"type":"boolean"}}}}},"required":["bestNextAction","expectedResult","reasoning"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TalrCycle"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/talr/cycles/{id}/act":{"post":{"summary":"Record Act","tags":["TALR"],"operationId":"post_talr_cycles_id_act","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"actionDescription":{"type":"string"},"heldConstant":{"type":"array","items":{"type":"string"}},"changedVariables":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string"},"change":{"type":"string"},"assumptionId":{"type":"string"}}}}},"required":["actionDescription"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TalrCycle"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/talr/cycles/{id}/learn":{"post":{"summary":"Record Learn","tags":["TALR"],"operationId":"post_talr_cycles_id_learn","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"actualResult":{"type":"string"},"variance":{"type":"string"},"assumptionUpdates":{"type":"array","items":{"type":"object","properties":{"assumptionId":{"type":"string"},"verdict":{"type":"string"},"rationale":{"type":"string"}}}},"modelChanges":{"type":"array","items":{"type":"string"}},"whatWorked":{"type":"array","items":{"type":"string"}},"whatFailed":{"type":"array","items":{"type":"string"}}},"required":["actualResult"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TalrCycle"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/talr/cycles/{id}/repeat":{"post":{"summary":"Record Repeat","tags":["TALR"],"operationId":"post_talr_cycles_id_repeat","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"nextCycleChanges":{"type":"string"},"preserve":{"type":"array","items":{"type":"string"}},"stop":{"type":"array","items":{"type":"string"}},"tryNext":{"type":"array","items":{"type":"string"}},"objectiveDecision":{"type":"string","enum":["keep","change","reject"]},"objectiveChangeReason":{"type":"string"}},"required":["nextCycleChanges","objectiveDecision"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TalrCycle"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/talr/model":{"get":{"summary":"Model entries","tags":["TALR"],"operationId":"get_talr_model","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ModelEntry"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/talr/model/{id}":{"patch":{"summary":"Update a model entry","tags":["TALR"],"operationId":"patch_talr_model_id","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"statement":{"type":"string"},"confidence":{"type":"number"},"status":{"type":"string"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelEntry"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/strategy":{"get":{"summary":"Strategy notes","tags":["TALR"],"operationId":"get_strategy","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/StrategyNote"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/strategy/refresh":{"post":{"summary":"Refresh strategy notes","tags":["TALR"],"operationId":"post_strategy_refresh","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobRef"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ai/jobs":{"get":{"summary":"AI jobs (agent scope)","tags":["AI jobs"],"operationId":"get_ai_jobs","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AiJob"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ai/jobs/{id}":{"get":{"summary":"AI job","tags":["AI jobs"],"operationId":"get_ai_jobs_id","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiJob"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ai/jobs/{id}/claim":{"post":{"summary":"Claim a job","tags":["AI jobs"],"operationId":"post_ai_jobs_id_claim","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiJob"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ai/jobs/{id}/complete":{"post":{"summary":"Complete a job","tags":["AI jobs"],"operationId":"post_ai_jobs_id_complete","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"output":{"oneOf":[{"type":"string"},{"type":"object","properties":{"text":{"type":"string"},"json":{},"model":{"type":"string"},"provider":{"type":"string"},"inputTokens":{"type":"integer"},"outputTokens":{"type":"integer"}}}]}},"required":["output"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiJob"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ai/jobs/{id}/fail":{"post":{"summary":"Fail a job","tags":["AI jobs"],"operationId":"post_ai_jobs_id_fail","security":[{"clerkSession":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiJob"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/users":{"get":{"summary":"All users","tags":["Admin"],"operationId":"get_admin_users","security":[{"clerkSession":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/User"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/users/{id}":{"patch":{"summary":"Update a user","tags":["Admin"],"operationId":"patch_admin_users_id","security":[{"clerkSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"isPlatformAdmin":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/waitlist":{"get":{"summary":"Waitlist","tags":["Admin"],"operationId":"get_admin_waitlist","security":[{"clerkSession":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WaitlistEntry"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/waitlist/{id}/approve":{"post":{"summary":"Approve a waitlist entry","tags":["Admin"],"operationId":"post_admin_waitlist_id_approve","security":[{"clerkSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string"},"role":{"$ref":"#/components/schemas/TeamRole"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/waitlist/{id}/reject":{"post":{"summary":"Reject a waitlist entry","tags":["Admin"],"operationId":"post_admin_waitlist_id_reject","security":[{"clerkSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/settings":{"get":{"summary":"Platform settings","tags":["Admin"],"operationId":"get_admin_settings","security":[{"clerkSession":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformSettings"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update platform settings","tags":["Admin"],"operationId":"patch_admin_settings","security":[{"clerkSession":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformSettings"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformSettings"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/teams":{"get":{"summary":"All teams","tags":["Admin"],"operationId":"get_admin_teams","security":[{"clerkSession":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Team"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/waitlist":{"post":{"summary":"Join the waitlist","tags":["Public"],"operationId":"post_public_waitlist","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistEntry"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/status":{"get":{"summary":"Health","tags":["Public"],"operationId":"get_public_status","security":[],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/openapi.json":{"get":{"summary":"This document","tags":["Public"],"operationId":"get_openapi_json","security":[],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden, including code waitlisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"clerkSession":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Clerk session token"},"apiKey":{"type":"http","scheme":"bearer","description":"Team API key starting with epk_live_"}},"parameters":{"teamId":{"name":"X-Team-Id","in":"header","required":false,"schema":{"type":"string"},"description":"Team to act on"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"detail":{}},"required":["code","message"]},"requestId":{"type":"string"}},"required":["error"]},"User":{"type":"object","properties":{"id":{"type":"string"},"emailAddress":{"type":"string","nullable":true},"fullName":{"type":"string","nullable":true},"status":{"type":"string","enum":["active","waitlisted","invited","disabled"]},"isPlatformAdmin":{"type":"boolean"},"isAgent":{"type":"boolean"}}},"TeamSummary":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"slug":{"type":"string","nullable":true},"role":{"$ref":"#/components/schemas/TeamRole"}}},"TeamRole":{"type":"string","enum":["owner","admin","grant_writer","finance","clinical","regulatory","reviewer","viewer"]},"Me":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"},"teams":{"type":"array","items":{"$ref":"#/components/schemas/TeamSummary"}},"platformAdmin":{"type":"boolean"},"currentTeamId":{"type":"string","nullable":true}}},"CompanyProfile":{"type":"object","additionalProperties":true,"description":"See packages/core CompanyProfile"},"TeamSettings":{"type":"object","additionalProperties":true,"description":"See packages/core TeamSettings"},"Team":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"companyProfile":{"$ref":"#/components/schemas/CompanyProfile"},"settings":{"$ref":"#/components/schemas/TeamSettings"},"planCode":{"type":"string"},"role":{"$ref":"#/components/schemas/TeamRole"}}},"Member":{"type":"object","properties":{"id":{"type":"string"},"appUserId":{"type":"string"},"emailAddress":{"type":"string"},"fullName":{"type":"string","nullable":true},"role":{"$ref":"#/components/schemas/TeamRole"},"isActive":{"type":"boolean"}}},"StrictnessPreview":{"type":"object","properties":{"value":{"type":"number"},"count":{"type":"integer"},"totalCeilingMinor":{"type":"integer"},"likelyVolumeMinor":{"type":"integer"},"sample":{"type":"array","items":{"$ref":"#/components/schemas/MatchSummary"}}}},"MatchSummary":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"funderName":{"type":"string","nullable":true},"fitScore":{"type":"number"},"winProbability":{"type":"number"},"awardCeilingMinor":{"type":"integer","nullable":true},"eligibilityStatus":{"type":"string"},"closeDate":{"type":"string","nullable":true}}},"Integration":{"type":"object","properties":{"provider":{"type":"string"},"status":{"type":"string","enum":["connected","disconnected","error"]},"accountLabel":{"type":"string","nullable":true},"lastSyncAt":{"type":"string","nullable":true},"lastError":{"type":"string","nullable":true}}},"Source":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"isEnabled":{"type":"boolean"},"isPaid":{"type":"boolean"},"pricingNote":{"type":"string","nullable":true},"requiresCredentials":{"type":"boolean"},"credentialFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"help":{"type":"string"}}}},"team":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"hasCredentials":{"type":"boolean"}}}}},"ApiKey":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"keyPrefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"lastUsedAt":{"type":"string","nullable":true},"key":{"type":"string","description":"Only returned once on creation"}}},"Dashboard":{"type":"object","properties":{"pipeline":{"type":"object","properties":{"new":{"type":"integer"},"queued":{"type":"integer"},"approved":{"type":"integer"},"applying":{"type":"integer"},"submitted":{"type":"integer"},"awarded":{"type":"integer"},"rejected":{"type":"integer"}}},"amounts":{"type":"object","properties":{"queuedCeilingMinor":{"type":"integer"},"submittedRequestedMinor":{"type":"integer"},"awardedMinor":{"type":"integer"},"likelyVolumeMinor":{"type":"integer"}}},"upcomingDeadlines":{"type":"array","items":{}},"expectedDecisions":{"type":"array","items":{}},"deliverablesDue":{"type":"array","items":{}},"openInformationRequests":{"type":"integer"},"recentActivity":{"type":"array","items":{}}}},"TimelineEvent":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["deadline","expected_decision","award_period","deliverable"]},"title":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"status":{"type":"string"},"relatedType":{"type":"string"},"relatedId":{"type":"string"}}},"Match":{"type":"object","properties":{"id":{"type":"string"},"stage":{"$ref":"#/components/schemas/MatchStage"},"fitScore":{"type":"number"},"winProbability":{"type":"number"},"expectedValueMinor":{"type":"integer"},"costToApplyMinor":{"type":"integer"},"eligibilityStatus":{"type":"string"},"eligibilityFlags":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"type":"string"},"message":{"type":"string"}}}},"scoreBreakdown":{},"rationale":{"type":"string","nullable":true},"deliverablesSummary":{"type":"array","items":{"type":"string"}},"stringsAttached":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"detail":{"type":"string"},"severity":{"type":"string"}}}},"worthApplying":{"type":"string"},"recommendation":{"type":"string","nullable":true},"opportunity":{"$ref":"#/components/schemas/Opportunity"},"funder":{"$ref":"#/components/schemas/Funder","nullable":true}}},"MatchStage":{"type":"string","enum":["new","queued","approved","declined","applying","submitted","awarded","rejected","withdrawn","expired"]},"Opportunity":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"opportunityNumber":{"type":"string","nullable":true},"status":{"type":"string"},"postDate":{"type":"string","nullable":true},"closeDate":{"type":"string","nullable":true},"awardCeilingMinor":{"type":"integer","nullable":true},"awardFloorMinor":{"type":"integer","nullable":true},"currencyCode":{"type":"string"},"program":{"type":"string","nullable":true},"phase":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"eligibilityText":{"type":"string","nullable":true},"applicantTypes":{"type":"array","items":{"type":"string"}},"attachments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"}}}}}},"Funder":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"applicationsCount":{"type":"integer"},"awardedCount":{"type":"integer"},"rejectedCount":{"type":"integer"},"totalAwardedMinor":{"type":"integer"},"lastApplicationAt":{"type":"string","nullable":true}}},"Application":{"type":"object","properties":{"id":{"type":"string"},"opportunityId":{"type":"string"},"matchId":{"type":"string","nullable":true},"funderId":{"type":"string","nullable":true},"status":{"$ref":"#/components/schemas/ApplicationStatus"},"submissionMethod":{"type":"string","nullable":true},"requestedAmountMinor":{"type":"integer","nullable":true},"awardedAmountMinor":{"type":"integer","nullable":true},"currencyCode":{"type":"string"},"portalUrl":{"type":"string","nullable":true},"confirmationNumber":{"type":"string","nullable":true},"dropboxPath":{"type":"string","nullable":true},"dueDate":{"type":"string","nullable":true},"submittedAt":{"type":"string","nullable":true},"expectedDecisionDate":{"type":"string","nullable":true},"decisionDate":{"type":"string","nullable":true}}},"ApplicationStatus":{"type":"string","enum":["drafting","needs_information","ready_for_review","approved_to_submit","submitted","under_review","awarded","rejected","withdrawn"]},"Section":{"type":"object","properties":{"id":{"type":"string"},"sectionKey":{"type":"string"},"title":{"type":"string"},"prompt":{"type":"string","nullable":true},"content":{"type":"string"},"wordLimit":{"type":"integer","nullable":true},"charLimit":{"type":"integer","nullable":true},"pageLimit":{"type":"number","nullable":true},"sortOrder":{"type":"integer"},"status":{"type":"string","enum":["empty","drafted","reviewed","final"]},"authoredBy":{"type":"string"},"version":{"type":"integer"}}},"ApplicationFile":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"fileName":{"type":"string"},"mimeType":{"type":"string","nullable":true},"dropboxPath":{"type":"string","nullable":true},"sourceUrl":{"type":"string","nullable":true},"formFields":{"type":"object","additionalProperties":{"type":"string"},"nullable":true},"sizeBytes":{"type":"integer","nullable":true}}},"InformationRequest":{"type":"object","properties":{"id":{"type":"string"},"applicationId":{"type":"string","nullable":true},"deliverableId":{"type":"string","nullable":true},"question":{"type":"string"},"factKey":{"type":"string","nullable":true},"context":{"type":"string","nullable":true},"status":{"type":"string","enum":["open","answered","dismissed"]},"answer":{"type":"string","nullable":true},"roleRequired":{"$ref":"#/components/schemas/TeamRole","nullable":true},"assignedTo":{"type":"string","nullable":true},"taskId":{"type":"string","nullable":true}}},"Fact":{"type":"object","properties":{"id":{"type":"string"},"factKey":{"type":"string"},"question":{"type":"string"},"answer":{"type":"string"},"category":{"type":"string"},"sourceDocument":{"type":"string","nullable":true},"lastVerifiedAt":{"type":"string","nullable":true},"usageCount":{"type":"integer"}}},"Award":{"type":"object","properties":{"id":{"type":"string"},"applicationId":{"type":"string"},"funderId":{"type":"string","nullable":true},"awardNumber":{"type":"string","nullable":true},"amountMinor":{"type":"integer"},"currencyCode":{"type":"string"},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"terms":{"$ref":"#/components/schemas/AwardTerms"},"status":{"type":"string"},"successFeeStatus":{"type":"string"},"accountingProjectRef":{"type":"string","nullable":true}}},"AwardTerms":{"type":"object","properties":{"reportingSchedule":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"title":{"type":"string"},"dueDate":{"type":"string"},"method":{"type":"string"},"target":{"type":"string"}}}},"indirectRatePercent":{"type":"number"},"costSharePercent":{"type":"number"},"dataRights":{"type":"string"},"publicationRules":{"type":"string"},"foreignRestrictions":{"type":"string"},"auditThresholdMinor":{"type":"integer"},"otherObligations":{"type":"array","items":{"type":"string"}}}},"Deliverable":{"type":"object","properties":{"id":{"type":"string"},"awardId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"kind":{"type":"string"},"dueDate":{"type":"string"},"status":{"type":"string"},"submissionMethod":{"type":"string","nullable":true},"submissionTarget":{"type":"string","nullable":true},"generatedContent":{"type":"string","nullable":true},"dropboxPath":{"type":"string","nullable":true},"submittedAt":{"type":"string","nullable":true},"remindersSent":{"type":"array","items":{"type":"integer"}},"taskId":{"type":"string","nullable":true}}},"Task":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"priority":{"type":"integer"},"roleRequired":{"$ref":"#/components/schemas/TeamRole","nullable":true},"assignedTo":{"type":"string","nullable":true},"escalated":{"type":"boolean"},"dueDate":{"type":"string","nullable":true},"status":{"type":"string","enum":["open","done","cancelled"]},"relatedType":{"type":"string","nullable":true},"relatedId":{"type":"string","nullable":true},"externalProvider":{"type":"string","nullable":true},"externalUrl":{"type":"string","nullable":true}}},"EmailMessage":{"type":"object","properties":{"id":{"type":"string"},"providerMessageId":{"type":"string"},"fromAddress":{"type":"string","nullable":true},"subject":{"type":"string","nullable":true},"snippet":{"type":"string","nullable":true},"receivedAt":{"type":"string","nullable":true},"classification":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"applicationId":{"type":"string","nullable":true},"awardId":{"type":"string","nullable":true}}},"TalrCycle":{"type":"object","properties":{"id":{"type":"string"},"applicationId":{"type":"string"},"cycleNumber":{"type":"integer"},"stage":{"type":"string","enum":["think","act","learn","repeat","closed"]},"objective":{"type":"string"},"think":{},"act":{},"learn":{},"repeat":{}}},"ModelEntry":{"type":"object","properties":{"id":{"type":"string"},"scope":{"type":"string"},"funderId":{"type":"string","nullable":true},"program":{"type":"string","nullable":true},"statement":{"type":"string"},"confidence":{"type":"number"},"status":{"type":"string"}}},"StrategyNote":{"type":"object","properties":{"id":{"type":"string"},"topic":{"type":"string"},"summary":{"type":"string"},"sourceUrl":{"type":"string","nullable":true},"sourceTitle":{"type":"string","nullable":true},"appliesTo":{"type":"array","items":{"type":"string"}},"capturedAt":{"type":"string"}}},"AiJob":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"tier":{"type":"string"},"driver":{"type":"string","enum":["api","agent"]},"status":{"type":"string","enum":["queued","running","done","failed"]},"input":{"type":"object","properties":{"prompt":{"type":"object","properties":{"system":{"type":"string"},"user":{"type":"string"}}},"json":{"type":"boolean"},"context":{}}},"output":{},"error":{"type":"string","nullable":true},"relatedType":{"type":"string","nullable":true},"relatedId":{"type":"string","nullable":true}}},"JobRef":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"driver":{"type":"string"}}}}},"PlatformSettings":{"type":"object","properties":{"waitlistOpen":{"type":"boolean"},"allowedDomains":{"type":"array","items":{"type":"string"}},"pricing":{"type":"object","properties":{"monthlyFeeMinor":{"type":"integer"},"successFeePercent":{"type":"number"},"currencyCode":{"type":"string"}}}}},"WaitlistEntry":{"type":"object","properties":{"id":{"type":"string"},"emailAddress":{"type":"string"},"fullName":{"type":"string","nullable":true},"organizationName":{"type":"string","nullable":true},"isAgent":{"type":"boolean"},"agentDescription":{"type":"string","nullable":true},"message":{"type":"string","nullable":true},"status":{"type":"string"}}}}}}