{"openapi":"3.1.0","info":{"title":"RFP Hub API","version":"1.0.0","description":"Open, neutral aggregation platform for web3 funding opportunities (grants, RFPs, bounties).","license":{"name":"MIT"}},"servers":[{"url":"https://rfp-hub-api.fly.dev","description":"Production"},{"url":"http://localhost:3000","description":"Development"}],"components":{"schemas":{},"parameters":{}},"paths":{"/api/v1/opportunities":{"get":{"tags":["Opportunities"],"parameters":[{"schema":{"type":"string","maxLength":500},"required":false,"name":"q","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type","in":"query"},{"schema":{"type":"string"},"required":false,"name":"ecosystem","in":"query"},{"schema":{"type":"string"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"funder","in":"query"},{"schema":{"type":"string"},"required":false,"name":"category","in":"query"},{"schema":{"type":"string"},"required":false,"name":"tag","in":"query"},{"schema":{"type":"number","nullable":true,"minimum":0},"required":false,"name":"min_budget","in":"query"},{"schema":{"type":"number","nullable":true,"minimum":0},"required":false,"name":"max_budget","in":"query"},{"schema":{"type":"string","nullable":true},"required":false,"name":"closing_after","in":"query"},{"schema":{"type":"string","nullable":true},"required":false,"name":"closing_before","in":"query"},{"schema":{"type":"string","pattern":"^(created_at|closes_at|budget_max|budget_min|title):(asc|desc)$","default":"created_at:desc"},"required":false,"name":"sort","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"List of funding opportunities","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalId":{"type":"string","nullable":true,"maxLength":500},"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9-]+$"},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string"},"summary":{"type":"string","maxLength":280},"rfpType":{"type":"string","enum":["rfp","grant","bounty","fellowship","hackathon"]},"fundingMechanism":{"type":"string","nullable":true,"maxLength":100},"budgetMin":{"type":"number","nullable":true,"minimum":0},"budgetMax":{"type":"number","nullable":true,"minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3,"default":"USD"},"opensAt":{"type":"string","nullable":true},"closesAt":{"type":"string","nullable":true},"projectDuration":{"type":"string","nullable":true,"maxLength":100},"status":{"type":"string","enum":["draft","open","closing_soon","closed","awarded"]},"categories":{"type":"array","items":{"type":"string"}},"ecosystems":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"sourceId":{"type":"string","format":"uuid"},"applicationUrl":{"type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri"},"submittedBy":{"type":"string","maxLength":255},"submittedAt":{"type":"string","nullable":true},"verifiedBy":{"type":"string","nullable":true,"maxLength":255},"verifiedAt":{"type":"string","nullable":true},"publisherType":{"type":"string","enum":["community","verified_publisher"]},"eligibility":{"type":"array","items":{"type":"string"}},"requiredCredentials":{"type":"array","items":{"type":"string"}},"contactEmail":{"type":"string","nullable":true,"format":"email"},"logoUrl":{"type":"string","nullable":true,"format":"uri"},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"version":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1},"isActive":{"type":"boolean","default":true},"duplicateOf":{"type":"string","nullable":true,"format":"uuid"}},"required":["id","externalId","slug","title","description","summary","rfpType","fundingMechanism","budgetMin","budgetMax","opensAt","closesAt","projectDuration","status","categories","ecosystems","tags","sourceId","applicationUrl","sourceUrl","submittedBy","submittedAt","verifiedBy","verifiedAt","publisherType","eligibility","requiredCredentials","contactEmail","logoUrl","createdAt","updatedAt","duplicateOf"]}},"meta":{"type":"object","properties":{"total":{"type":"number"},"page":{"type":"number"},"limit":{"type":"number"},"hasMore":{"type":"boolean"},"nextCursor":{"type":"string","nullable":true,"format":"uuid"}},"required":["total","page","limit","hasMore"]}},"required":["data","meta"]}}}},"304":{"description":"Not Modified"}}},"post":{"tags":["Opportunities"],"security":[{"apiKey":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"externalId":{"type":"string","nullable":true,"maxLength":500},"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9-]+$"},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string"},"summary":{"type":"string","maxLength":280},"rfpType":{"type":"string","enum":["rfp","grant","bounty","fellowship","hackathon"]},"fundingMechanism":{"type":"string","nullable":true,"maxLength":100},"budgetMin":{"type":"number","nullable":true,"minimum":0},"budgetMax":{"type":"number","nullable":true,"minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3,"default":"USD"},"opensAt":{"type":"string","nullable":true},"closesAt":{"type":"string","nullable":true},"projectDuration":{"type":"string","nullable":true,"maxLength":100},"status":{"type":"string","enum":["draft","open","closing_soon","closed","awarded"]},"categories":{"type":"array","items":{"type":"string"}},"ecosystems":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"sourceId":{"type":"string","format":"uuid"},"applicationUrl":{"type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri"},"submittedBy":{"type":"string","maxLength":255},"submittedAt":{"type":"string","nullable":true},"publisherType":{"type":"string","enum":["community","verified_publisher"]},"eligibility":{"type":"array","items":{"type":"string"}},"requiredCredentials":{"type":"array","items":{"type":"string"}},"contactEmail":{"type":"string","nullable":true,"format":"email"},"logoUrl":{"type":"string","nullable":true,"format":"uri"},"isActive":{"type":"boolean","default":true}},"required":["externalId","slug","title","description","summary","rfpType","fundingMechanism","budgetMin","budgetMax","opensAt","closesAt","projectDuration","status","categories","ecosystems","tags","sourceId","applicationUrl","sourceUrl","submittedBy","submittedAt","publisherType","eligibility","requiredCredentials","contactEmail","logoUrl"]}}}},"responses":{"201":{"description":"Created opportunity","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalId":{"type":"string","nullable":true,"maxLength":500},"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9-]+$"},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string"},"summary":{"type":"string","maxLength":280},"rfpType":{"type":"string","enum":["rfp","grant","bounty","fellowship","hackathon"]},"fundingMechanism":{"type":"string","nullable":true,"maxLength":100},"budgetMin":{"type":"number","nullable":true,"minimum":0},"budgetMax":{"type":"number","nullable":true,"minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3,"default":"USD"},"opensAt":{"type":"string","nullable":true},"closesAt":{"type":"string","nullable":true},"projectDuration":{"type":"string","nullable":true,"maxLength":100},"status":{"type":"string","enum":["draft","open","closing_soon","closed","awarded"]},"categories":{"type":"array","items":{"type":"string"}},"ecosystems":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"sourceId":{"type":"string","format":"uuid"},"applicationUrl":{"type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri"},"submittedBy":{"type":"string","maxLength":255},"submittedAt":{"type":"string","nullable":true},"verifiedBy":{"type":"string","nullable":true,"maxLength":255},"verifiedAt":{"type":"string","nullable":true},"publisherType":{"type":"string","enum":["community","verified_publisher"]},"eligibility":{"type":"array","items":{"type":"string"}},"requiredCredentials":{"type":"array","items":{"type":"string"}},"contactEmail":{"type":"string","nullable":true,"format":"email"},"logoUrl":{"type":"string","nullable":true,"format":"uri"},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"version":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1},"isActive":{"type":"boolean","default":true},"duplicateOf":{"type":"string","nullable":true,"format":"uuid"}},"required":["id","externalId","slug","title","description","summary","rfpType","fundingMechanism","budgetMin","budgetMax","opensAt","closesAt","projectDuration","status","categories","ecosystems","tags","sourceId","applicationUrl","sourceUrl","submittedBy","submittedAt","verifiedBy","verifiedAt","publisherType","eligibility","requiredCredentials","contactEmail","logoUrl","createdAt","updatedAt","duplicateOf"]}}}}}}},"/api/v1/opportunities/:id":{"get":{"tags":["Opportunities"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Single funding opportunity","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalId":{"type":"string","nullable":true,"maxLength":500},"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9-]+$"},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string"},"summary":{"type":"string","maxLength":280},"rfpType":{"type":"string","enum":["rfp","grant","bounty","fellowship","hackathon"]},"fundingMechanism":{"type":"string","nullable":true,"maxLength":100},"budgetMin":{"type":"number","nullable":true,"minimum":0},"budgetMax":{"type":"number","nullable":true,"minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3,"default":"USD"},"opensAt":{"type":"string","nullable":true},"closesAt":{"type":"string","nullable":true},"projectDuration":{"type":"string","nullable":true,"maxLength":100},"status":{"type":"string","enum":["draft","open","closing_soon","closed","awarded"]},"categories":{"type":"array","items":{"type":"string"}},"ecosystems":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"sourceId":{"type":"string","format":"uuid"},"applicationUrl":{"type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri"},"submittedBy":{"type":"string","maxLength":255},"submittedAt":{"type":"string","nullable":true},"verifiedBy":{"type":"string","nullable":true,"maxLength":255},"verifiedAt":{"type":"string","nullable":true},"publisherType":{"type":"string","enum":["community","verified_publisher"]},"eligibility":{"type":"array","items":{"type":"string"}},"requiredCredentials":{"type":"array","items":{"type":"string"}},"contactEmail":{"type":"string","nullable":true,"format":"email"},"logoUrl":{"type":"string","nullable":true,"format":"uri"},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"version":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1},"isActive":{"type":"boolean","default":true},"duplicateOf":{"type":"string","nullable":true,"format":"uuid"}},"required":["id","externalId","slug","title","description","summary","rfpType","fundingMechanism","budgetMin","budgetMax","opensAt","closesAt","projectDuration","status","categories","ecosystems","tags","sourceId","applicationUrl","sourceUrl","submittedBy","submittedAt","verifiedBy","verifiedAt","publisherType","eligibility","requiredCredentials","contactEmail","logoUrl","createdAt","updatedAt","duplicateOf"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"put":{"tags":["Opportunities"],"security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"externalId":{"type":"string","nullable":true,"maxLength":500},"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9-]+$"},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string"},"summary":{"type":"string","maxLength":280},"rfpType":{"type":"string","enum":["rfp","grant","bounty","fellowship","hackathon"]},"fundingMechanism":{"type":"string","nullable":true,"maxLength":100},"budgetMin":{"type":"number","nullable":true,"minimum":0},"budgetMax":{"type":"number","nullable":true,"minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3,"default":"USD"},"opensAt":{"type":"string","nullable":true},"closesAt":{"type":"string","nullable":true},"projectDuration":{"type":"string","nullable":true,"maxLength":100},"status":{"type":"string","enum":["draft","open","closing_soon","closed","awarded"]},"categories":{"type":"array","items":{"type":"string"}},"ecosystems":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"sourceId":{"type":"string","format":"uuid"},"applicationUrl":{"type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri"},"submittedBy":{"type":"string","maxLength":255},"submittedAt":{"type":"string","nullable":true},"publisherType":{"type":"string","enum":["community","verified_publisher"]},"eligibility":{"type":"array","items":{"type":"string"}},"requiredCredentials":{"type":"array","items":{"type":"string"}},"contactEmail":{"type":"string","nullable":true,"format":"email"},"logoUrl":{"type":"string","nullable":true,"format":"uri"},"isActive":{"type":"boolean","default":true}}}}}},"responses":{"200":{"description":"Updated opportunity","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalId":{"type":"string","nullable":true,"maxLength":500},"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9-]+$"},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string"},"summary":{"type":"string","maxLength":280},"rfpType":{"type":"string","enum":["rfp","grant","bounty","fellowship","hackathon"]},"fundingMechanism":{"type":"string","nullable":true,"maxLength":100},"budgetMin":{"type":"number","nullable":true,"minimum":0},"budgetMax":{"type":"number","nullable":true,"minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3,"default":"USD"},"opensAt":{"type":"string","nullable":true},"closesAt":{"type":"string","nullable":true},"projectDuration":{"type":"string","nullable":true,"maxLength":100},"status":{"type":"string","enum":["draft","open","closing_soon","closed","awarded"]},"categories":{"type":"array","items":{"type":"string"}},"ecosystems":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"sourceId":{"type":"string","format":"uuid"},"applicationUrl":{"type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri"},"submittedBy":{"type":"string","maxLength":255},"submittedAt":{"type":"string","nullable":true},"verifiedBy":{"type":"string","nullable":true,"maxLength":255},"verifiedAt":{"type":"string","nullable":true},"publisherType":{"type":"string","enum":["community","verified_publisher"]},"eligibility":{"type":"array","items":{"type":"string"}},"requiredCredentials":{"type":"array","items":{"type":"string"}},"contactEmail":{"type":"string","nullable":true,"format":"email"},"logoUrl":{"type":"string","nullable":true,"format":"uri"},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"version":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1},"isActive":{"type":"boolean","default":true},"duplicateOf":{"type":"string","nullable":true,"format":"uuid"}},"required":["id","externalId","slug","title","description","summary","rfpType","fundingMechanism","budgetMin","budgetMax","opensAt","closesAt","projectDuration","status","categories","ecosystems","tags","sourceId","applicationUrl","sourceUrl","submittedBy","submittedAt","verifiedBy","verifiedAt","publisherType","eligibility","requiredCredentials","contactEmail","logoUrl","createdAt","updatedAt","duplicateOf"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/api/v1/sources":{"get":{"tags":["Sources"],"responses":{"200":{"description":"List of funding sources","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":255},"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9-]+$"},"description":{"type":"string","nullable":true,"maxLength":2000},"websiteUrl":{"type":"string","nullable":true,"format":"uri"},"logoUrl":{"type":"string","nullable":true,"format":"uri"},"contactEmail":{"type":"string","nullable":true,"format":"email"},"ecosystems":{"type":"array","items":{"type":"string"}},"isActive":{"type":"boolean","default":true},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true}},"required":["id","name","slug","description","websiteUrl","logoUrl","contactEmail","ecosystems","createdAt","updatedAt"]}}},"required":["data"]}}}}}}},"/api/v1/sources/:id":{"get":{"tags":["Sources"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Single funding source","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":255},"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9-]+$"},"description":{"type":"string","nullable":true,"maxLength":2000},"websiteUrl":{"type":"string","nullable":true,"format":"uri"},"logoUrl":{"type":"string","nullable":true,"format":"uri"},"contactEmail":{"type":"string","nullable":true,"format":"email"},"ecosystems":{"type":"array","items":{"type":"string"}},"isActive":{"type":"boolean","default":true},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true}},"required":["id","name","slug","description","websiteUrl","logoUrl","contactEmail","ecosystems","createdAt","updatedAt"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/api/v1/submit":{"post":{"tags":["Community"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string"},"summary":{"type":"string","maxLength":280},"rfpType":{"type":"string","enum":["rfp","grant","bounty","fellowship","hackathon"]},"applicationUrl":{"type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri"},"budgetMin":{"type":"number","nullable":true,"minimum":0},"budgetMax":{"type":"number","nullable":true,"minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3,"default":"USD"},"opensAt":{"type":"string","nullable":true},"closesAt":{"type":"string","nullable":true},"categories":{"type":"array","items":{"type":"string"}},"ecosystems":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"submitterEmail":{"type":"string","nullable":true,"format":"email"},"submitterName":{"type":"string","nullable":true,"maxLength":255}},"required":["title","description","summary","rfpType","applicationUrl","sourceUrl","budgetMin","budgetMax","opensAt","closesAt","categories","ecosystems","tags","submitterEmail","submitterName"]}}}},"responses":{"201":{"description":"Submission received","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"submissionId":{"type":"string","format":"uuid"}},"required":["message","submissionId"]}}}}}}},"/api/v1/export":{"get":{"tags":["Export"],"parameters":[{"schema":{"type":"string","maxLength":500},"required":false,"name":"q","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type","in":"query"},{"schema":{"type":"string"},"required":false,"name":"ecosystem","in":"query"},{"schema":{"type":"string"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"funder","in":"query"},{"schema":{"type":"string"},"required":false,"name":"category","in":"query"},{"schema":{"type":"string"},"required":false,"name":"tag","in":"query"},{"schema":{"type":"number","nullable":true,"minimum":0},"required":false,"name":"min_budget","in":"query"},{"schema":{"type":"number","nullable":true,"minimum":0},"required":false,"name":"max_budget","in":"query"},{"schema":{"type":"string","nullable":true},"required":false,"name":"closing_after","in":"query"},{"schema":{"type":"string","nullable":true},"required":false,"name":"closing_before","in":"query"},{"schema":{"type":"string","enum":["json","csv"],"default":"json"},"required":false,"name":"format","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":10000,"default":10000},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Exported funding opportunities","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalId":{"type":"string","nullable":true,"maxLength":500},"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9-]+$"},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string"},"summary":{"type":"string","maxLength":280},"rfpType":{"type":"string","enum":["rfp","grant","bounty","fellowship","hackathon"]},"fundingMechanism":{"type":"string","nullable":true,"maxLength":100},"budgetMin":{"type":"number","nullable":true,"minimum":0},"budgetMax":{"type":"number","nullable":true,"minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3,"default":"USD"},"opensAt":{"type":"string","nullable":true},"closesAt":{"type":"string","nullable":true},"projectDuration":{"type":"string","nullable":true,"maxLength":100},"status":{"type":"string","enum":["draft","open","closing_soon","closed","awarded"]},"categories":{"type":"array","items":{"type":"string"}},"ecosystems":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"sourceId":{"type":"string","format":"uuid"},"applicationUrl":{"type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri"},"submittedBy":{"type":"string","maxLength":255},"submittedAt":{"type":"string","nullable":true},"verifiedBy":{"type":"string","nullable":true,"maxLength":255},"verifiedAt":{"type":"string","nullable":true},"publisherType":{"type":"string","enum":["community","verified_publisher"]},"eligibility":{"type":"array","items":{"type":"string"}},"requiredCredentials":{"type":"array","items":{"type":"string"}},"contactEmail":{"type":"string","nullable":true,"format":"email"},"logoUrl":{"type":"string","nullable":true,"format":"uri"},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"version":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1},"isActive":{"type":"boolean","default":true},"duplicateOf":{"type":"string","nullable":true,"format":"uuid"}},"required":["id","externalId","slug","title","description","summary","rfpType","fundingMechanism","budgetMin","budgetMax","opensAt","closesAt","projectDuration","status","categories","ecosystems","tags","sourceId","applicationUrl","sourceUrl","submittedBy","submittedAt","verifiedBy","verifiedAt","publisherType","eligibility","requiredCredentials","contactEmail","logoUrl","createdAt","updatedAt","duplicateOf"]}}},"required":["data"]}},"text/csv":{"schema":{"type":"string"}}}}}}},"/api/v1/publishers":{"post":{"tags":["Publishers"],"security":[{"apiKey":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"contactEmail":{"type":"string","format":"email"},"websiteUrl":{"type":"string","nullable":true,"format":"uri"},"logoUrl":{"type":"string","nullable":true,"format":"uri"},"role":{"type":"string","enum":["publisher","admin"],"default":"publisher"},"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9-]+$"},"isVerified":{"type":"boolean","default":false}},"required":["name","contactEmail"]}}}},"responses":{"201":{"description":"Publisher created with one-time API key","content":{"application/json":{"schema":{"type":"object","properties":{"publisher":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":255},"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9-]+$"},"websiteUrl":{"type":"string","nullable":true,"format":"uri"},"logoUrl":{"type":"string","nullable":true,"format":"uri"},"contactEmail":{"type":"string","format":"email"},"isVerified":{"type":"boolean"},"role":{"type":"string","enum":["publisher","admin"]},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true}},"required":["id","name","slug","websiteUrl","logoUrl","contactEmail","isVerified","role","createdAt","updatedAt"]},"apiKey":{"type":"string"}},"required":["publisher","apiKey"]}}}}}},"get":{"tags":["Publishers"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"List of all publishers","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":255},"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9-]+$"},"websiteUrl":{"type":"string","nullable":true,"format":"uri"},"logoUrl":{"type":"string","nullable":true,"format":"uri"},"contactEmail":{"type":"string","format":"email"},"isVerified":{"type":"boolean"},"role":{"type":"string","enum":["publisher","admin"]},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true}},"required":["id","name","slug","websiteUrl","logoUrl","contactEmail","isVerified","role","createdAt","updatedAt"]}}},"required":["data"]}}}}}}},"/api/v1/publishers/:id":{"get":{"tags":["Publishers"],"security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Publisher details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":255},"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9-]+$"},"websiteUrl":{"type":"string","nullable":true,"format":"uri"},"logoUrl":{"type":"string","nullable":true,"format":"uri"},"contactEmail":{"type":"string","format":"email"},"isVerified":{"type":"boolean"},"role":{"type":"string","enum":["publisher","admin"]},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true}},"required":["id","name","slug","websiteUrl","logoUrl","contactEmail","isVerified","role","createdAt","updatedAt"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/api/v1/publishers/:id/rotate-key":{"post":{"tags":["Publishers"],"security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"New API key","content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"type":"string"},"message":{"type":"string"}},"required":["apiKey","message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/api/v1/publishers/:id/revoke":{"delete":{"tags":["Publishers"],"security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Publisher revoked","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/api/v1/bulk-import":{"post":{"tags":["Import"],"security":[{"apiKey":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"opportunities":{"type":"array","items":{"type":"object","properties":{"externalId":{"type":"string","nullable":true,"maxLength":500},"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9-]+$"},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string"},"summary":{"type":"string","maxLength":280},"rfpType":{"type":"string","enum":["rfp","grant","bounty","fellowship","hackathon"]},"fundingMechanism":{"type":"string","nullable":true,"maxLength":100},"budgetMin":{"type":"number","nullable":true,"minimum":0},"budgetMax":{"type":"number","nullable":true,"minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3,"default":"USD"},"opensAt":{"type":"string","nullable":true},"closesAt":{"type":"string","nullable":true},"projectDuration":{"type":"string","nullable":true,"maxLength":100},"status":{"type":"string","enum":["draft","open","closing_soon","closed","awarded"]},"categories":{"type":"array","items":{"type":"string"}},"ecosystems":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"sourceId":{"type":"string","format":"uuid"},"applicationUrl":{"type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri"},"submittedBy":{"type":"string","maxLength":255},"submittedAt":{"type":"string","nullable":true},"publisherType":{"type":"string","enum":["community","verified_publisher"]},"eligibility":{"type":"array","items":{"type":"string"}},"requiredCredentials":{"type":"array","items":{"type":"string"}},"contactEmail":{"type":"string","nullable":true,"format":"email"},"logoUrl":{"type":"string","nullable":true,"format":"uri"},"isActive":{"type":"boolean","default":true}},"required":["externalId","slug","title","description","summary","rfpType","fundingMechanism","budgetMin","budgetMax","opensAt","closesAt","projectDuration","status","categories","ecosystems","tags","sourceId","applicationUrl","sourceUrl","submittedBy","submittedAt","publisherType","eligibility","requiredCredentials","contactEmail","logoUrl"]},"minItems":1,"maxItems":100}},"required":["opportunities"]}}}},"responses":{"200":{"description":"Bulk import results","content":{"application/json":{"schema":{"type":"object","properties":{"imported":{"type":"number"},"duplicates":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"message":{"type":"string"}},"required":["index","message"]}}},"required":["imported","duplicates","errors"]}}}}}}},"/api/v1/admin/submissions":{"get":{"tags":["Admin"],"security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","enum":["pending","approved","rejected"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Paginated submissions","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string"},"summary":{"type":"string","maxLength":280},"rfpType":{"type":"string","enum":["rfp","grant","bounty","fellowship","hackathon"]},"applicationUrl":{"type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri"},"budgetMin":{"type":"number","nullable":true,"minimum":0},"budgetMax":{"type":"number","nullable":true,"minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3,"default":"USD"},"opensAt":{"type":"string","nullable":true},"closesAt":{"type":"string","nullable":true},"categories":{"type":"array","items":{"type":"string"}},"ecosystems":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"submitterEmail":{"type":"string","nullable":true,"format":"email"},"submitterName":{"type":"string","nullable":true,"maxLength":255},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewedBy":{"type":"string","nullable":true,"maxLength":255},"reviewedAt":{"type":"string","nullable":true},"reviewNotes":{"type":"string","nullable":true},"opportunityId":{"type":"string","nullable":true,"format":"uuid"},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true}},"required":["id","title","description","summary","rfpType","applicationUrl","sourceUrl","budgetMin","budgetMax","opensAt","closesAt","categories","ecosystems","tags","submitterEmail","submitterName","status","reviewedBy","reviewedAt","reviewNotes","opportunityId","createdAt","updatedAt"]}},"meta":{"type":"object","properties":{"total":{"type":"number"},"page":{"type":"number"},"limit":{"type":"number"}},"required":["total","page","limit"]}},"required":["data","meta"]}}}}}}},"/api/v1/admin/submissions/:id":{"get":{"tags":["Admin"],"security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Submission details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string"},"summary":{"type":"string","maxLength":280},"rfpType":{"type":"string","enum":["rfp","grant","bounty","fellowship","hackathon"]},"applicationUrl":{"type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri"},"budgetMin":{"type":"number","nullable":true,"minimum":0},"budgetMax":{"type":"number","nullable":true,"minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3,"default":"USD"},"opensAt":{"type":"string","nullable":true},"closesAt":{"type":"string","nullable":true},"categories":{"type":"array","items":{"type":"string"}},"ecosystems":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"submitterEmail":{"type":"string","nullable":true,"format":"email"},"submitterName":{"type":"string","nullable":true,"maxLength":255},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewedBy":{"type":"string","nullable":true,"maxLength":255},"reviewedAt":{"type":"string","nullable":true},"reviewNotes":{"type":"string","nullable":true},"opportunityId":{"type":"string","nullable":true,"format":"uuid"},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true}},"required":["id","title","description","summary","rfpType","applicationUrl","sourceUrl","budgetMin","budgetMax","opensAt","closesAt","categories","ecosystems","tags","submitterEmail","submitterName","status","reviewedBy","reviewedAt","reviewNotes","opportunityId","createdAt","updatedAt"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/api/v1/admin/submissions/:id/review":{"post":{"tags":["Admin"],"security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["approve","reject"]},"reviewNotes":{"type":"string"}},"required":["action"]}}}},"responses":{"200":{"description":"Review result","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"opportunityId":{"type":"string","nullable":true,"format":"uuid"}},"required":["message","opportunityId"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/api/v1/admin/audit-log":{"get":{"tags":["Admin"],"security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"entityType","in":"query"},{"schema":{"type":"string"},"required":false,"name":"action","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Paginated audit log","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"entityType":{"type":"string"},"entityId":{"type":"string","format":"uuid"},"action":{"type":"string"},"changes":{"nullable":true},"performedBy":{"type":"string"},"performedAt":{"type":"string","nullable":true}},"required":["id","entityType","entityId","action","performedBy","performedAt"]}},"meta":{"type":"object","properties":{"total":{"type":"number"},"page":{"type":"number"},"limit":{"type":"number"}},"required":["total","page","limit"]}},"required":["data","meta"]}}}}}}},"/health":{"get":{"tags":["System"],"responses":{"200":{"description":"Health check response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"timestamp":{"type":"string"},"version":{"type":"string"}},"required":["status","timestamp","version"]}}}}}}},"/api/v1/schema":{"get":{"tags":["System"],"responses":{"200":{"description":"JSON Schema definitions for all entities","content":{"application/json":{"schema":{"nullable":true}}}}}}}}}