{"openapi":"3.0.3","info":{"title":"CLEATUS REST API","description":"Public REST API for CLEATUS. Covers opportunity discovery, recommendations, pipeline, tasks, saved searches, documents, workflows, teams, notifications, and the entity profile. Authenticate with an OAuth2 Bearer token (same token used by the MCP integration).","version":"1.0.0"},"servers":[{"url":"https://api.cleat.ai"}],"paths":{"/v1/zapier/subscribe":{"post":{"operationId":"zapier-subscribe","summary":"Register a Zapier webhook target","tags":["zapier"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target_url":{"type":"string","format":"uri"},"event":{"type":"string","enum":["all","opportunity.created","pursuit.created","pursuit.updated"],"default":"all"}},"required":["target_url"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"anyOf":[{"type":"string","enum":["subscribed"]},{"type":"string","enum":["error"]}]}},"required":["id","status"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/zapier/unsubscribe":{"post":{"operationId":"zapier-unsubscribe","summary":"Deregister a Zapier webhook","tags":["zapier"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"anyOf":[{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["error"]}]}},"required":["status"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/zapier/opportunity/newest":{"get":{"operationId":"zapier-performListOpportunityCreated","summary":"List newest created opportunity","tags":["zapier"],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"event":{"type":"string","enum":["opportunity.created"]},"timestamp":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string"},"phase":{"type":"string","enum":["preparing","submitted","won","lost","triage"],"nullable":true},"columnId":{"type":"string","nullable":true},"columnTitle":{"type":"string","nullable":true},"complianceScore":{"type":"number","nullable":true},"complianceSummary":{"type":"string","nullable":true},"matchReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"lastFetch":{"type":"string","format":"date-time","nullable":true},"pursuitCreatedAt":{"type":"string","format":"date-time","nullable":true},"pursuitTitle":{"type":"string","nullable":true},"pursuitChanges":{"type":"object","properties":{"before":{"type":"object","properties":{"status":{"type":"string"}},"additionalProperties":true},"after":{"type":"object","properties":{"status":{"type":"string"}},"additionalProperties":true},"description":{"type":"string"}},"required":["description"],"additionalProperties":false,"nullable":true},"contract":{"type":"object","properties":{"id":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"overview":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"naicsId":{"type":"string","nullable":true},"postedDate":{"type":"string","format":"date-time","nullable":true},"deadlineDate":{"type":"string","format":"date-time","nullable":true},"responseType":{"type":"string","enum":["rfp","rfq","ifb","rfi","baa","cso","ota","rftop","other","loi","unknown"],"nullable":true},"solicitationNumber":{"type":"string","nullable":true},"agencyName":{"type":"string","nullable":true},"agencyCode":{"type":"string","nullable":true},"agencyOrgName":{"type":"string","nullable":true},"type":{"type":"string","enum":["presolicitation","solicitation","sources-sought","combined","forecast","pre-forecast","subcontract","award-notice","special-notice","bundle","sale-of-surplus","justification"],"nullable":true},"awarded":{"type":"boolean","nullable":true},"typeOfSetAside":{"type":"string","nullable":true},"typeOfSetAsideDescription":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"active":{"type":"boolean","nullable":true},"officeZipcode":{"type":"string","nullable":true},"officeCity":{"type":"string","nullable":true},"officeCountryCode":{"type":"string","nullable":true},"officeState":{"type":"string","nullable":true},"placeOfPerformanceStreetAddress":{"type":"string","nullable":true},"placeOfPerformanceStreetAddress2":{"type":"string","nullable":true},"placeOfPerformanceCityCode":{"type":"string","nullable":true},"placeOfPerformanceCityName":{"type":"string","nullable":true},"placeOfPerformanceCityStateCode":{"type":"string","nullable":true},"placeOfPerformanceCityStateName":{"type":"string","nullable":true},"placeOfPerformanceCountryCode":{"type":"string","nullable":true},"placeOfPerformanceCountryName":{"type":"string","nullable":true},"placeOfPerformanceZipcode":{"type":"string","nullable":true},"pointOfContact":{"nullable":true},"sourceId":{"type":"string","nullable":true},"sourceUrl":{"type":"string","nullable":true},"sourceType":{"type":"string","nullable":true},"providerUrl":{"type":"string","nullable":true},"providerType":{"type":"string","enum":["sam","sam-doc-backfill","amtrak","aal","iarpa","bbnc","entity-imported","ca-cmas","caleprocure","caltrans-ppmoe","ceqanet","txsmartbuy","nyscr","commbuys","cook-county-socrata","opengov","gep-smart","georgia","alabamabuys","cgieva","biddingo","workday-strategic-sourcing","fairfax-water","dc-ocp","deca","plum","legistar","federal-register","alberta-purchasing-connection","ms","mta","mwaa","wmata-cfm","virginia-local","bidexpress","bidlocker","bidnetdirect","sandiegocounty","nc","demandstar","bonfirehub","kentucky","michigan","illinois","phl-contracts","ehawaii","cherokee","columbus","ctsource","ridop","proactis-webprocure","infor-cloudsuite","oregonbuys","sbcounty","emma-maryland","chickasawbusinessnetwork","choctaw-nation","fedconnect","federal-reserve","sasktenders","pa-emarketplace","myfloridamarketplace","losangelescounty","palm-springs","washington","canadabuys","dhs-apfs","doj-forecast","dos-forecast","usfs-vipr","grants-gov","nasa-nspires","arpa-e","gsa-forecast","gsa-oasis-symphony","ssa-forecast","scbo","osdbu-treasury","oh-dot","ohio-buys","vermont","indiana-dapw","rampla","planetbids","procureware","louisiana","sceis","nespower","diu","dibbs","uibidx","tennessee","wisconsin-vendornet","highergov","usaspending","usaspending-vehicles","usaspending-subawards","usaspending-grants","newyorkcity","nyc-passport-public","ny-ogs-centralized","wvoasis","aepa-wv","alexrenew-va","fcwsa-va","nvtc-va","uosa-va","sbcx-forecasting","nasa","bidcobra-tx","pre-forecast","iowa","central-auction-house","maine-vss","ionwave","housingmarketplace","naspovaluepoint","sourcewell-mn","ksu-bidportal","port-gamble","kumc","portmoody","lambtoncounty","publicpurchase","colorado-vss","omniapartners","buyboard","colville-tribes","muscogee-nation","nativeedge","nativeknot","navajo-nation","suquamish","sbir-gov","usda-nifa","darpa-mil","space-force-front-door","nih-contract-topics","nasa-sbir","nsf-seedfund","nsf-forecast","neco-navy","beaconbid","hud","doed-forecast","usacearmy","agency-sbir-pdf-enrichment","dsip","jpl-nasa","doe-forecast","naval-iws-forecast","txdot-plans","projectbids-drexeltech","sd-bidletting","e-rate","leawood-ks","sam-entities","gpo","jaggaer","ontario-tenders-portal","sd-bidx-state","tulalip-tribes","tulsa","austin-finance","sanantonio","portseattle","hogbid","bxwa","facts-fl","tx-dir","transparency-ky","transparency-ri","oracle-cloud-erp","nevadaepro","idoa-in-contracts","sfcitypartner","peppm-pdfs","ma-osd-swc","chicago-vendor-contracts","hgacbuy","datasf-sfo","datasf-supplier-contracts","mn-mndot-eadvert","txdot-peps","civicplus-bids","gojep","bvi-tenders","sba-subnet","la-socrata","augusta-me-bids","nh-municipal-association","maine-dot-bids","ma-central-register","bidamerica","nh-das-apps","army-chess-ites","lametro"],"nullable":true}},"required":["id","title","overview","summary","naicsId","postedDate","deadlineDate","responseType","solicitationNumber","agencyName","agencyCode","agencyOrgName","type","awarded","typeOfSetAside","typeOfSetAsideDescription","description","active","officeZipcode","officeCity","officeCountryCode","officeState","placeOfPerformanceStreetAddress","placeOfPerformanceStreetAddress2","placeOfPerformanceCityCode","placeOfPerformanceCityName","placeOfPerformanceCityStateCode","placeOfPerformanceCityStateName","placeOfPerformanceCountryCode","placeOfPerformanceCountryName","placeOfPerformanceZipcode","sourceId","sourceUrl","sourceType","providerUrl","providerType"],"additionalProperties":false}},"required":["id","phase","columnId","columnTitle","complianceScore","complianceSummary","matchReason","createdAt","lastFetch","pursuitCreatedAt","pursuitTitle","pursuitChanges","contract"],"additionalProperties":false}},"required":["id","event","timestamp","data"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/zapier/pursuits/created":{"get":{"operationId":"zapier-performListPursuitsCreated","summary":"List pursuits created after a given timestamp","tags":["zapier"],"parameters":[{"name":"created_after","in":"query","required":true,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"event":{"type":"string","enum":["pursuit.created"]},"timestamp":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string"},"phase":{"type":"string","enum":["preparing","submitted","won","lost","triage"],"nullable":true},"columnId":{"type":"string","nullable":true},"columnTitle":{"type":"string","nullable":true},"complianceScore":{"type":"number","nullable":true},"complianceSummary":{"type":"string","nullable":true},"matchReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"lastFetch":{"type":"string","format":"date-time","nullable":true},"pursuitCreatedAt":{"type":"string","format":"date-time","nullable":true},"pursuitTitle":{"type":"string","nullable":true},"pursuitChanges":{"type":"object","properties":{"before":{"type":"object","properties":{"status":{"type":"string"}},"additionalProperties":true},"after":{"type":"object","properties":{"status":{"type":"string"}},"additionalProperties":true},"description":{"type":"string"}},"required":["description"],"additionalProperties":false,"nullable":true},"contract":{"type":"object","properties":{"id":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"overview":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"naicsId":{"type":"string","nullable":true},"postedDate":{"type":"string","format":"date-time","nullable":true},"deadlineDate":{"type":"string","format":"date-time","nullable":true},"responseType":{"type":"string","enum":["rfp","rfq","ifb","rfi","baa","cso","ota","rftop","other","loi","unknown"],"nullable":true},"solicitationNumber":{"type":"string","nullable":true},"agencyName":{"type":"string","nullable":true},"agencyCode":{"type":"string","nullable":true},"agencyOrgName":{"type":"string","nullable":true},"type":{"type":"string","enum":["presolicitation","solicitation","sources-sought","combined","forecast","pre-forecast","subcontract","award-notice","special-notice","bundle","sale-of-surplus","justification"],"nullable":true},"awarded":{"type":"boolean","nullable":true},"typeOfSetAside":{"type":"string","nullable":true},"typeOfSetAsideDescription":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"active":{"type":"boolean","nullable":true},"officeZipcode":{"type":"string","nullable":true},"officeCity":{"type":"string","nullable":true},"officeCountryCode":{"type":"string","nullable":true},"officeState":{"type":"string","nullable":true},"placeOfPerformanceStreetAddress":{"type":"string","nullable":true},"placeOfPerformanceStreetAddress2":{"type":"string","nullable":true},"placeOfPerformanceCityCode":{"type":"string","nullable":true},"placeOfPerformanceCityName":{"type":"string","nullable":true},"placeOfPerformanceCityStateCode":{"type":"string","nullable":true},"placeOfPerformanceCityStateName":{"type":"string","nullable":true},"placeOfPerformanceCountryCode":{"type":"string","nullable":true},"placeOfPerformanceCountryName":{"type":"string","nullable":true},"placeOfPerformanceZipcode":{"type":"string","nullable":true},"pointOfContact":{"nullable":true},"sourceId":{"type":"string","nullable":true},"sourceUrl":{"type":"string","nullable":true},"sourceType":{"type":"string","nullable":true},"providerUrl":{"type":"string","nullable":true},"providerType":{"type":"string","enum":["sam","sam-doc-backfill","amtrak","aal","iarpa","bbnc","entity-imported","ca-cmas","caleprocure","caltrans-ppmoe","ceqanet","txsmartbuy","nyscr","commbuys","cook-county-socrata","opengov","gep-smart","georgia","alabamabuys","cgieva","biddingo","workday-strategic-sourcing","fairfax-water","dc-ocp","deca","plum","legistar","federal-register","alberta-purchasing-connection","ms","mta","mwaa","wmata-cfm","virginia-local","bidexpress","bidlocker","bidnetdirect","sandiegocounty","nc","demandstar","bonfirehub","kentucky","michigan","illinois","phl-contracts","ehawaii","cherokee","columbus","ctsource","ridop","proactis-webprocure","infor-cloudsuite","oregonbuys","sbcounty","emma-maryland","chickasawbusinessnetwork","choctaw-nation","fedconnect","federal-reserve","sasktenders","pa-emarketplace","myfloridamarketplace","losangelescounty","palm-springs","washington","canadabuys","dhs-apfs","doj-forecast","dos-forecast","usfs-vipr","grants-gov","nasa-nspires","arpa-e","gsa-forecast","gsa-oasis-symphony","ssa-forecast","scbo","osdbu-treasury","oh-dot","ohio-buys","vermont","indiana-dapw","rampla","planetbids","procureware","louisiana","sceis","nespower","diu","dibbs","uibidx","tennessee","wisconsin-vendornet","highergov","usaspending","usaspending-vehicles","usaspending-subawards","usaspending-grants","newyorkcity","nyc-passport-public","ny-ogs-centralized","wvoasis","aepa-wv","alexrenew-va","fcwsa-va","nvtc-va","uosa-va","sbcx-forecasting","nasa","bidcobra-tx","pre-forecast","iowa","central-auction-house","maine-vss","ionwave","housingmarketplace","naspovaluepoint","sourcewell-mn","ksu-bidportal","port-gamble","kumc","portmoody","lambtoncounty","publicpurchase","colorado-vss","omniapartners","buyboard","colville-tribes","muscogee-nation","nativeedge","nativeknot","navajo-nation","suquamish","sbir-gov","usda-nifa","darpa-mil","space-force-front-door","nih-contract-topics","nasa-sbir","nsf-seedfund","nsf-forecast","neco-navy","beaconbid","hud","doed-forecast","usacearmy","agency-sbir-pdf-enrichment","dsip","jpl-nasa","doe-forecast","naval-iws-forecast","txdot-plans","projectbids-drexeltech","sd-bidletting","e-rate","leawood-ks","sam-entities","gpo","jaggaer","ontario-tenders-portal","sd-bidx-state","tulalip-tribes","tulsa","austin-finance","sanantonio","portseattle","hogbid","bxwa","facts-fl","tx-dir","transparency-ky","transparency-ri","oracle-cloud-erp","nevadaepro","idoa-in-contracts","sfcitypartner","peppm-pdfs","ma-osd-swc","chicago-vendor-contracts","hgacbuy","datasf-sfo","datasf-supplier-contracts","mn-mndot-eadvert","txdot-peps","civicplus-bids","gojep","bvi-tenders","sba-subnet","la-socrata","augusta-me-bids","nh-municipal-association","maine-dot-bids","ma-central-register","bidamerica","nh-das-apps","army-chess-ites","lametro"],"nullable":true}},"required":["id","title","overview","summary","naicsId","postedDate","deadlineDate","responseType","solicitationNumber","agencyName","agencyCode","agencyOrgName","type","awarded","typeOfSetAside","typeOfSetAsideDescription","description","active","officeZipcode","officeCity","officeCountryCode","officeState","placeOfPerformanceStreetAddress","placeOfPerformanceStreetAddress2","placeOfPerformanceCityCode","placeOfPerformanceCityName","placeOfPerformanceCityStateCode","placeOfPerformanceCityStateName","placeOfPerformanceCountryCode","placeOfPerformanceCountryName","placeOfPerformanceZipcode","sourceId","sourceUrl","sourceType","providerUrl","providerType"],"additionalProperties":false}},"required":["id","phase","columnId","columnTitle","complianceScore","complianceSummary","matchReason","createdAt","lastFetch","pursuitCreatedAt","pursuitTitle","pursuitChanges","contract"],"additionalProperties":false}},"required":["id","event","timestamp","data"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/zapier/pursuits/updated":{"get":{"operationId":"zapier-performListPursuitsUpdated","summary":"List pursuits updated after a given timestamp","tags":["zapier"],"parameters":[{"name":"updated_after","in":"query","required":true,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"event":{"type":"string","enum":["pursuit.updated"]},"timestamp":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string"},"phase":{"type":"string","enum":["preparing","submitted","won","lost","triage"],"nullable":true},"columnId":{"type":"string","nullable":true},"columnTitle":{"type":"string","nullable":true},"complianceScore":{"type":"number","nullable":true},"complianceSummary":{"type":"string","nullable":true},"matchReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"lastFetch":{"type":"string","format":"date-time","nullable":true},"pursuitCreatedAt":{"type":"string","format":"date-time","nullable":true},"pursuitTitle":{"type":"string","nullable":true},"pursuitChanges":{"type":"object","properties":{"before":{"type":"object","properties":{"status":{"type":"string"}},"additionalProperties":true},"after":{"type":"object","properties":{"status":{"type":"string"}},"additionalProperties":true},"description":{"type":"string"}},"required":["description"],"additionalProperties":false,"nullable":true},"contract":{"type":"object","properties":{"id":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"overview":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"naicsId":{"type":"string","nullable":true},"postedDate":{"type":"string","format":"date-time","nullable":true},"deadlineDate":{"type":"string","format":"date-time","nullable":true},"responseType":{"type":"string","enum":["rfp","rfq","ifb","rfi","baa","cso","ota","rftop","other","loi","unknown"],"nullable":true},"solicitationNumber":{"type":"string","nullable":true},"agencyName":{"type":"string","nullable":true},"agencyCode":{"type":"string","nullable":true},"agencyOrgName":{"type":"string","nullable":true},"type":{"type":"string","enum":["presolicitation","solicitation","sources-sought","combined","forecast","pre-forecast","subcontract","award-notice","special-notice","bundle","sale-of-surplus","justification"],"nullable":true},"awarded":{"type":"boolean","nullable":true},"typeOfSetAside":{"type":"string","nullable":true},"typeOfSetAsideDescription":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"active":{"type":"boolean","nullable":true},"officeZipcode":{"type":"string","nullable":true},"officeCity":{"type":"string","nullable":true},"officeCountryCode":{"type":"string","nullable":true},"officeState":{"type":"string","nullable":true},"placeOfPerformanceStreetAddress":{"type":"string","nullable":true},"placeOfPerformanceStreetAddress2":{"type":"string","nullable":true},"placeOfPerformanceCityCode":{"type":"string","nullable":true},"placeOfPerformanceCityName":{"type":"string","nullable":true},"placeOfPerformanceCityStateCode":{"type":"string","nullable":true},"placeOfPerformanceCityStateName":{"type":"string","nullable":true},"placeOfPerformanceCountryCode":{"type":"string","nullable":true},"placeOfPerformanceCountryName":{"type":"string","nullable":true},"placeOfPerformanceZipcode":{"type":"string","nullable":true},"pointOfContact":{"nullable":true},"sourceId":{"type":"string","nullable":true},"sourceUrl":{"type":"string","nullable":true},"sourceType":{"type":"string","nullable":true},"providerUrl":{"type":"string","nullable":true},"providerType":{"type":"string","enum":["sam","sam-doc-backfill","amtrak","aal","iarpa","bbnc","entity-imported","ca-cmas","caleprocure","caltrans-ppmoe","ceqanet","txsmartbuy","nyscr","commbuys","cook-county-socrata","opengov","gep-smart","georgia","alabamabuys","cgieva","biddingo","workday-strategic-sourcing","fairfax-water","dc-ocp","deca","plum","legistar","federal-register","alberta-purchasing-connection","ms","mta","mwaa","wmata-cfm","virginia-local","bidexpress","bidlocker","bidnetdirect","sandiegocounty","nc","demandstar","bonfirehub","kentucky","michigan","illinois","phl-contracts","ehawaii","cherokee","columbus","ctsource","ridop","proactis-webprocure","infor-cloudsuite","oregonbuys","sbcounty","emma-maryland","chickasawbusinessnetwork","choctaw-nation","fedconnect","federal-reserve","sasktenders","pa-emarketplace","myfloridamarketplace","losangelescounty","palm-springs","washington","canadabuys","dhs-apfs","doj-forecast","dos-forecast","usfs-vipr","grants-gov","nasa-nspires","arpa-e","gsa-forecast","gsa-oasis-symphony","ssa-forecast","scbo","osdbu-treasury","oh-dot","ohio-buys","vermont","indiana-dapw","rampla","planetbids","procureware","louisiana","sceis","nespower","diu","dibbs","uibidx","tennessee","wisconsin-vendornet","highergov","usaspending","usaspending-vehicles","usaspending-subawards","usaspending-grants","newyorkcity","nyc-passport-public","ny-ogs-centralized","wvoasis","aepa-wv","alexrenew-va","fcwsa-va","nvtc-va","uosa-va","sbcx-forecasting","nasa","bidcobra-tx","pre-forecast","iowa","central-auction-house","maine-vss","ionwave","housingmarketplace","naspovaluepoint","sourcewell-mn","ksu-bidportal","port-gamble","kumc","portmoody","lambtoncounty","publicpurchase","colorado-vss","omniapartners","buyboard","colville-tribes","muscogee-nation","nativeedge","nativeknot","navajo-nation","suquamish","sbir-gov","usda-nifa","darpa-mil","space-force-front-door","nih-contract-topics","nasa-sbir","nsf-seedfund","nsf-forecast","neco-navy","beaconbid","hud","doed-forecast","usacearmy","agency-sbir-pdf-enrichment","dsip","jpl-nasa","doe-forecast","naval-iws-forecast","txdot-plans","projectbids-drexeltech","sd-bidletting","e-rate","leawood-ks","sam-entities","gpo","jaggaer","ontario-tenders-portal","sd-bidx-state","tulalip-tribes","tulsa","austin-finance","sanantonio","portseattle","hogbid","bxwa","facts-fl","tx-dir","transparency-ky","transparency-ri","oracle-cloud-erp","nevadaepro","idoa-in-contracts","sfcitypartner","peppm-pdfs","ma-osd-swc","chicago-vendor-contracts","hgacbuy","datasf-sfo","datasf-supplier-contracts","mn-mndot-eadvert","txdot-peps","civicplus-bids","gojep","bvi-tenders","sba-subnet","la-socrata","augusta-me-bids","nh-municipal-association","maine-dot-bids","ma-central-register","bidamerica","nh-das-apps","army-chess-ites","lametro"],"nullable":true}},"required":["id","title","overview","summary","naicsId","postedDate","deadlineDate","responseType","solicitationNumber","agencyName","agencyCode","agencyOrgName","type","awarded","typeOfSetAside","typeOfSetAsideDescription","description","active","officeZipcode","officeCity","officeCountryCode","officeState","placeOfPerformanceStreetAddress","placeOfPerformanceStreetAddress2","placeOfPerformanceCityCode","placeOfPerformanceCityName","placeOfPerformanceCityStateCode","placeOfPerformanceCityStateName","placeOfPerformanceCountryCode","placeOfPerformanceCountryName","placeOfPerformanceZipcode","sourceId","sourceUrl","sourceType","providerUrl","providerType"],"additionalProperties":false}},"required":["id","phase","columnId","columnTitle","complianceScore","complianceSummary","matchReason","createdAt","lastFetch","pursuitCreatedAt","pursuitTitle","pursuitChanges","contract"],"additionalProperties":false}},"required":["id","event","timestamp","data"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/zapier/pipeline-columns":{"get":{"operationId":"zapier-listPipelineColumns","summary":"List the authenticated entity's pipeline columns","tags":["zapier"],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/zapier/opportunity/create":{"post":{"operationId":"zapier-createOpportunity","summary":"Create an opportunity in CLEATUS from an external source","tags":["zapier"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","minLength":1},"agency_name":{"type":"string","minLength":1,"maxLength":512},"solicitation_number":{"type":"string","minLength":1,"maxLength":127},"posted_date":{"type":"string","format":"date-time"},"deadline_date":{"type":"string","format":"date-time"},"source_url":{"type":"string","format":"uri","maxLength":2048},"naics_code":{"type":"string","maxLength":127},"type_of_set_aside":{"type":"string","maxLength":127},"place_of_performance_state_code":{"type":"string","minLength":2,"maxLength":2},"place_of_performance_city":{"type":"string","maxLength":127},"place_of_performance_zipcode":{"type":"string","maxLength":127},"place_of_performance_country":{"type":"string","maxLength":127},"point_of_contact":{"type":"array","items":{"type":"object","properties":{"full_name":{"type":"string","maxLength":255},"email":{"type":"string","format":"email","maxLength":255},"phone":{"type":"string","maxLength":64},"contact_title":{"type":"string","maxLength":127}},"additionalProperties":false},"maxItems":5},"add_to_pipeline":{"type":"boolean","default":true},"column_id":{"type":"string","minLength":1,"maxLength":127},"assignee_user_id":{"type":"string","minLength":1,"maxLength":127},"note":{"type":"string","maxLength":4000},"documents":{"type":"array","items":{"type":"string","format":"uri","maxLength":2048},"maxItems":20},"is_test_request":{"type":"boolean","default":false}},"required":["title","description","agency_name","solicitation_number"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"contract_id":{"type":"string"},"pursuit_id":{"type":"string","nullable":true},"contract_already_existed":{"type":"boolean"},"pursuit_already_existed":{"type":"boolean"}},"required":["contract_id","pursuit_id","contract_already_existed","pursuit_already_existed"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/zapier/team-members":{"get":{"operationId":"zapier-listTeamMembers","summary":"List the authenticated entity's team members","tags":["zapier"],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false}}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/zapier/test-trigger":{"post":{"operationId":"zapier-testTrigger","summary":"Test the trigger","tags":["zapier"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"data":{}},"required":["type"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["pong"]},"message":{"type":"string"}},"required":["status","message"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/zapier/oauth/token":{"post":{"operationId":"zapier-token","summary":"OAuth2 Token endpoint","tags":["zapier-oauth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"grant_type":{"type":"string","enum":["authorization_code"]},"client_id":{"type":"string"},"client_secret":{"type":"string"},"code":{"type":"string"},"refresh_token":{"type":"string"},"redirect_uri":{"type":"string","format":"uri"},"code_verifier":{"type":"string"}},"required":["grant_type","client_id","client_secret"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string"},"token_type":{"type":"string","enum":["Bearer"]},"expires_in":{"type":"number"},"refresh_token":{"type":"string"}},"required":["access_token","token_type","expires_in"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/zapier/oauth/refresh":{"post":{"operationId":"zapier-refreshToken","summary":"OAuth2 Refresh Token endpoint","tags":["zapier-oauth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"refresh_token":{"type":"string"}},"required":["refresh_token"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string"},"token_type":{"type":"string","enum":["Bearer"]},"expires_in":{"type":"number"},"refresh_token":{"type":"string"}},"required":["access_token","token_type","expires_in","refresh_token"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/zapier/oauth/me":{"get":{"operationId":"zapier-oauthMe","summary":"Test OAuth2 authentication","tags":["zapier-oauth"],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"entityId":{"type":"string"},"message":{"type":"string"},"entityName":{"type":"string"},"userEmail":{"type":"string"}},"required":["userId","entityId","message"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/opportunities/search":{"get":{"operationId":"apiV1-searchOpportunities","tags":["Opportunities"],"parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"naics_codes","in":"query","required":false,"schema":{"anyOf":[{"not":{}},{"anyOf":[{"not":{}},{"type":"string"}]}]},"description":"Filter by NAICS codes (OR). 6-digit codes from the 2022 catalog; unknown codes are rejected."},{"name":"set_asides","in":"query","required":false,"schema":{"anyOf":[{"not":{}},{"type":"string"}]}},{"name":"agencies","in":"query","required":false,"schema":{"anyOf":[{"not":{}},{"type":"string"}]}},{"name":"states","in":"query","required":false,"schema":{"anyOf":[{"not":{}},{"anyOf":[{"not":{}},{"type":"string"}]}]},"description":"Filter by place-of-performance state code (OR). 2-letter US codes; unknown codes rejected."},{"name":"posted_since","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"due_before","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active"]}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","enum":["relevance","posted_date","due_date","match_score"]}},{"name":"min_score","in":"query","required":false,"schema":{"type":"number","minimum":0,"maximum":100}},{"name":"limit","in":"query","required":false,"schema":{"type":"number","minimum":1,"maximum":50,"default":20},"description":"Results per page (max 50)"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/contracts/search":{"get":{"operationId":"apiV1-searchContracts","tags":["Contracts"],"parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":500},"description":"Search query. A bare keyword (\"ammunition\") returns every contract containing that word plus semantically related work; a natural-language phrase (\"cybersecurity incident response\") leans on meaning-based matching. Results are one relevance-ranked list."},{"name":"limit","in":"query","required":false,"schema":{"type":"number","minimum":1,"maximum":50,"default":20},"description":"Results per page (max 50)"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","enum":["all","active"],"default":"active"},"description":"Corpus to search. 'active' (default) restricts to currently-open, unawarded opportunities (deadline in the future, posted within the last year). 'all' searches the ENTIRE contract catalog including closed, awarded, and historical opportunities — use for market research over the full corpus."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/opportunities/{opportunity_id}":{"get":{"operationId":"apiV1-getOpportunity","tags":["Opportunities"],"parameters":[{"name":"opportunity_id","in":"path","required":true,"schema":{"type":"string"},"description":"Contract/opportunity ID (contract_* or forecast_*). Accepts a pursuit ID (pur_*) too — it will be resolved to the linked contract."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/recommendations":{"get":{"operationId":"apiV1-getRecommendations","tags":["Opportunities"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"number","minimum":1,"maximum":100,"default":10},"description":"Recommendations per page (max 100). For a full export, request a high limit AND page through with the cursor until has_more is false — a single call only returns the top page by score."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"min_score","in":"query","required":false,"schema":{"type":"number","minimum":0,"maximum":100,"default":80},"description":"Minimum match score (0–100). Only return recommendations scoring at least this value. For \"score above 60\" → pass 60. Default 80 matches the dashboard Recommended page; pass a lower value only when the user explicitly wants weak matches too."},{"name":"include_expired","in":"query","required":false,"schema":{"anyOf":[{"not":{}},{"type":"boolean"}],"default":false},"description":"Include past-deadline opportunities. Defaults to false — recommendations with a deadline already in the past are filtered out so BD leads see only actionable work. Set true for historical analysis."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/market/search":{"get":{"operationId":"apiV1-searchMarket","tags":["Market Intelligence"],"parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":1},"description":"Semantic search query"},{"name":"types","in":"query","required":false,"schema":{"anyOf":[{"not":{}},{"type":"string"}]}},{"name":"limit","in":"query","required":false,"schema":{"type":"number","minimum":1,"maximum":20,"default":10},"description":"Results per type (max 20)"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/pipeline/add":{"post":{"operationId":"apiV1-addToPipeline","tags":["Pipeline"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"opportunity_id":{"type":"string","description":"Contract/opportunity ID to add"},"column_id":{"type":"string","description":"Target kanban column (defaults to Triage)"},"tags":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":50,"description":"Tags to apply (max 50 tags, each max 60 chars)."},"tag_mode":{"type":"string","enum":["merge","skip"],"default":"merge","description":"How tags are applied when the pursuit already exists. \"merge\" (default) unions with existing tags; \"skip\" leaves existing tags untouched. On a fresh pursuit the requested tags are set as-is regardless."}},"required":["opportunity_id"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/recommendations/dismiss":{"post":{"operationId":"apiV1-dismissRecommendation","tags":["Opportunities"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"opportunity_id":{"type":"string","description":"Contract/opportunity ID to dismiss"},"reason":{"type":"string","maxLength":500,"description":"Reason for dismissal (max 500 chars)"}},"required":["opportunity_id"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/recommendations/undismiss":{"post":{"operationId":"apiV1-undismissRecommendation","tags":["Opportunities"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"opportunity_id":{"type":"string","description":"Contract/opportunity ID to undismiss"}},"required":["opportunity_id"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/pipeline/search":{"get":{"operationId":"apiV1-searchPipeline","tags":["Pipeline"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","archived","won"]}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","enum":["due_date","posted_date","match_score"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"number","minimum":1,"maximum":50,"default":20},"description":"Results per page"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/pursuits/{pursuit_id}":{"get":{"operationId":"apiV1-getPursuit","tags":["Pipeline"],"parameters":[{"name":"pursuit_id","in":"path","required":true,"schema":{"type":"string"},"description":"Pursuit ID"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}},"patch":{"operationId":"apiV1-updatePursuit","tags":["Pipeline"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"column_id":{"type":"string","description":"Move to this pipeline column"},"tags":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":50,"description":"Tags to apply (max 50 tags, each max 60 chars). See tag_mode for how they combine."},"tag_mode":{"type":"string","enum":["replace","merge","remove"],"default":"replace","description":"How tags combine with the existing list. \"replace\" (default, preserves prior behavior) overwrites. \"merge\" unions with existing. \"remove\" strips the given tags from the existing list. Ignored when `tags` is omitted."},"due_date":{"type":"string","format":"date-time","description":"Override due date (ISO datetime)"},"archived":{"type":"boolean","description":"Archive or unarchive"},"favorite":{"type":"boolean","description":"Mark as favorite"}},"additionalProperties":false}}}},"parameters":[{"name":"pursuit_id","in":"path","required":true,"schema":{"type":"string"},"description":"Pursuit ID to update"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/tasks":{"get":{"operationId":"apiV1-listTasks","tags":["Tasks"],"parameters":[{"name":"pursuit_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"number","minimum":1,"maximum":50,"default":20},"description":"Results per page"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}},"post":{"operationId":"apiV1-createTask","tags":["Tasks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pursuit_id":{"type":"string","description":"Pursuit to add the task to"},"name":{"type":"string","minLength":1,"maxLength":200,"description":"Task name (1-200 chars)"},"description":{"type":"string","maxLength":5000,"description":"Task description (max 5000 chars)"},"due_date":{"type":"string","format":"date-time","description":"Due date (ISO datetime)"},"assigned_to":{"type":"array","items":{"type":"string"},"description":"User IDs to assign"}},"required":["pursuit_id","name"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/tasks/{task_id}":{"patch":{"operationId":"apiV1-updateTask","tags":["Tasks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pursuit_id":{"type":"string","description":"Pursuit ID the task belongs to"},"name":{"type":"string","maxLength":200,"description":"New task name (max 200 chars)"},"status":{"type":"string","enum":["pending","complete","completed"],"description":"Task status. \"completed\" is accepted as an alias for \"complete\"."},"due_date":{"type":"string","format":"date-time","description":"Due date (ISO datetime)"},"assigned_to":{"type":"array","items":{"type":"string"},"description":"User IDs to assign"}},"required":["pursuit_id"],"additionalProperties":false}}}},"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string"},"description":"Task ID"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}},"delete":{"operationId":"apiV1-deleteTask","tags":["Tasks"],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string"},"description":"Task ID to delete"},{"name":"pursuit_id","in":"query","required":true,"schema":{"type":"string"},"description":"Pursuit ID the task belongs to"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/saved-searches":{"get":{"operationId":"apiV1-listSavedSearches","tags":["Saved Searches"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"number","minimum":1,"maximum":50,"default":20},"description":"Results per page"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}},"post":{"operationId":"apiV1-createSavedSearch","tags":["Saved Searches"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Name for the saved search (1-120 chars)"},"filters":{"type":"object","properties":{"query":{"type":"string"},"naics_codes":{"type":"string"},"set_asides":{"type":"string"},"agencies":{"type":"string"},"states":{"type":"string"},"posted_since":{"type":"string","format":"date-time"},"due_before":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["active"]},"sort_by":{"type":"string","enum":["relevance","posted_date","due_date","match_score"]}},"additionalProperties":false,"description":"Search filter criteria (mirrors cleatus_search_opportunities inputs: query, naics_codes[], set_asides[], agencies[], states[], posted_since, due_before, status, sort_by). Unknown keys are rejected."},"notifications_enabled":{"type":"boolean","default":true,"description":"Enable email alerts on new matches. Defaults to true (opt-in to save)."}},"required":["name","filters"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/saved-searches/{saved_search_id}":{"patch":{"operationId":"apiV1-updateSavedSearch","tags":["Saved Searches"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":120,"description":"New name (max 120 chars)"},"filters":{"type":"object","properties":{"query":{"type":"string"},"naics_codes":{"type":"string"},"set_asides":{"type":"string"},"agencies":{"type":"string"},"states":{"type":"string"},"posted_since":{"type":"string","format":"date-time"},"due_before":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["active"]},"sort_by":{"type":"string","enum":["relevance","posted_date","due_date","match_score"]}},"additionalProperties":false,"description":"New filter criteria. Unknown keys are rejected."},"filter_mode":{"type":"string","enum":["replace","merge"],"default":"replace","description":"How filters combine with the existing stored filter. \"replace\" (default, preserves pre-existing behavior) overwrites. \"merge\" unions array fields (naics_codes, states, agencies, set_asides) with existing values and overwrites scalar fields. Ignored when `filters` is omitted."},"notifications_enabled":{"type":"boolean","description":"Enable/disable email alerts"}},"additionalProperties":false}}}},"parameters":[{"name":"saved_search_id","in":"path","required":true,"schema":{"type":"string"},"description":"Saved search ID"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}},"delete":{"operationId":"apiV1-deleteSavedSearch","tags":["Saved Searches"],"parameters":[{"name":"saved_search_id","in":"path","required":true,"schema":{"type":"string"},"description":"Saved search ID to delete"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/documents":{"get":{"operationId":"apiV1-listDocuments","tags":["Documents"],"parameters":[{"name":"folder_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"number","minimum":1,"maximum":200,"default":50},"description":"Results per page"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/documents/search":{"get":{"operationId":"apiV1-searchDocuments","tags":["Documents"],"parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":2},"description":"Search query (min 2 characters)"},{"name":"limit","in":"query","required":false,"schema":{"type":"number","minimum":1,"maximum":50,"default":20},"description":"Max results"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/documents/folders":{"post":{"operationId":"apiV1-createFolder","tags":["Documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Folder name (1-200 chars)"},"parent_folder_id":{"type":"string","description":"Parent folder ID (root if omitted)"}},"required":["name"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/documents/{item_id}":{"delete":{"operationId":"apiV1-deleteDocument","tags":["Documents"],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string"},"description":"Document or folder ID to delete"},{"name":"item_type","in":"query","required":true,"schema":{"type":"string","enum":["file","folder"]},"description":"Whether this is a file or folder"},{"name":"folder_id","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/workflows":{"get":{"operationId":"apiV1-listWorkflows","tags":["Workflows"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"number","minimum":1,"maximum":50,"default":20},"description":"Results per page"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}},"post":{"operationId":"apiV1-createWorkflow","tags":["Workflows"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"template_id":{"type":"string","description":"Template ID to create from (provide exactly one of template_id or graph)"},"name":{"type":"string","maxLength":120,"description":"Custom workflow name (max 120 chars; template mode only — graph mode names via graph.name)"},"graph":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Workflow name (max 120 chars)"},"description":{"type":"string","maxLength":2000,"description":"Workflow description"},"trigger_event":{"type":"string","description":"Trigger event, e.g. schedule, recommendation.created, pipeline.item_added, amendment.created, award.created, manual, webhook"},"settings":{"type":"object","additionalProperties":{},"description":"Workflow settings. schedule triggers put scheduleConfig here ({preset: daily|weekly|monthly, timezone, dailyTime, weeklyDays?, monthlyDays?}); recommendation.created triggers put scoreThreshold (0-100) here AND in the trigger node config."},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Authoring id (e.g. trigger_1) — re-identified server-side"},"type":{"type":"string","description":"Node type (trigger, agent, filter, if, send_email, add_to_pipeline, ...)"},"name":{"type":"string","minLength":1,"description":"Display name — referenced by {{ nodes.<Name>.json.<field> }}"},"config":{"type":"object","additionalProperties":{},"description":"Node-type-specific config"},"settings":{"type":"object","additionalProperties":{},"description":"Per-node execution settings"}},"required":["id","type","name"],"additionalProperties":false},"minItems":1,"maxItems":40},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"source_node_id":{"type":"string","minLength":1},"target_node_id":{"type":"string","minLength":1},"source_port":{"type":"string","description":"'main' (default); 'true'/'false' off an if node"},"target_port":{"type":"string","description":"'main' (default)"}},"required":["id","source_node_id","target_node_id"],"additionalProperties":false},"maxItems":80,"default":[]}},"required":["name","trigger_event","nodes"],"additionalProperties":false,"description":"Full custom workflow graph (provide exactly one of template_id or graph)"}},"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/workflows/{workflow_id}/activate":{"post":{"operationId":"apiV1-activateWorkflow","tags":["Workflows"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean","default":true,"description":"Pass false to deactivate (return to draft) without deleting."}},"additionalProperties":false}}}},"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"},"description":"Workflow ID to activate"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/workflows/{workflow_id}/run":{"post":{"operationId":"apiV1-runWorkflow","tags":["Workflows"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"object","additionalProperties":{},"description":"Custom payload for the workflow"},"dry_run":{"type":"boolean","description":"Execute the full graph but suppress side effects: send_email and every mutating node (add_to_pipeline, create_task, ...) skip their effect. Draft workflows can ONLY be run with dry_run — a completed dry run is the test that unlocks activation. When payload is omitted, a realistic sample payload is built from the entity's real data (same as the editor's test run), so nodes that read trigger fields resolve."}},"additionalProperties":false}}}},"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"},"description":"Workflow ID to run"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/workflows/runs/{run_id}":{"get":{"operationId":"apiV1-getWorkflowRun","tags":["Workflows"],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string"},"description":"Run ID (from cleatus_run_workflow or cleatus_list_workflows)"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/workflows/{workflow_id}":{"delete":{"operationId":"apiV1-deleteWorkflow","tags":["Workflows"],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"},"description":"Workflow ID to delete"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/profile":{"get":{"operationId":"apiV1-getEntityProfile","tags":["Context"],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/notifications":{"get":{"operationId":"apiV1-getNotifications","tags":["Context"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"not":{}},{"type":"string","enum":["unread","all"]}],"default":"all"},"description":"Filter by read status"},{"name":"limit","in":"query","required":false,"schema":{"type":"number","minimum":1,"maximum":50,"default":10},"description":"Number of notifications (max 50)"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/notifications/read":{"post":{"operationId":"apiV1-markNotificationRead","tags":["Context"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"notification_id":{"type":"string","description":"Specific notification ID to mark read (omit to mark ALL read)"}},"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/credits":{"get":{"operationId":"apiV1-getCreditBalance","tags":["Context"],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/teams":{"get":{"operationId":"apiV1-listTeamMembers","tags":["Teams"],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}},"/v1/workflow-templates":{"get":{"operationId":"apiV1-listWorkflowTemplates","tags":["Workflows"],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"default":{"$ref":"#/components/responses/error"}}}}},"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}}}}},"tags":[{"name":"Opportunities","description":"Search, recommendations, and opportunity detail"},{"name":"Market Intelligence","description":"Cross-source SAM.gov / GovWin-style market search"},{"name":"Pipeline","description":"Pursuits, columns, and pipeline search"},{"name":"Tasks","description":"Task list, create, update, delete"},{"name":"Saved Searches","description":"Saved searches with email-alert toggles"},{"name":"Documents","description":"List, search, folder create, delete"},{"name":"Workflows","description":"List, create, run, activate, templates"},{"name":"Teams","description":"Team member roster"},{"name":"Context","description":"Entity profile, notifications, credit balance"},{"name":"zapier","description":"Zapier webhook and polling endpoints"},{"name":"zapier-oauth","description":"OAuth2 authentication for Zapier"}]}