{"swagger":"2.0","info":{"title":"Karma V2 API","description":"API documentation for Karma V2 endpoints - Modern API for managing grants, projects, communities, and funding applications.","version":"2.0.0","contact":{"name":"Karma Team","url":"https://www.karmahq.xyz"}},"definitions":{},"paths":{"/v2/projects":{"get":{"summary":"List/Search Projects","description":"List or search projects. When \"q\" parameter is provided, searches projects by title, slug, or description. Supports sorting via \"sortBy\" (createdAt, updatedAt, title, noOfGrants, noOfProjectMilestones, noOfGrantMilestones) and \"sortOrder\" (asc, desc). Response format depends on \"page\" parameter: with \"page\" returns { payload: [...], pagination: {...} }, without \"page\" returns [...] (legacy array format).","tags":["Projects"],"parameters":[{"type":"string","minLength":3,"description":"Search query string (minimum 3 characters). When provided, searches projects by title, slug, or description.","required":false,"in":"query","name":"q"},{"allOf":[{"anyOf":[{"not":{}},{"anyOf":[{"type":"string"},{"type":"number"}]}]},{"type":"integer","minimum":1,"maximum":50}],"description":"Maximum number of results to return (1-50, default: 10)","required":false,"in":"query","name":"limit"},{"allOf":[{"anyOf":[{"not":{}},{"anyOf":[{"type":"string"},{"type":"number"}]}]},{"anyOf":[{"not":{}},{"type":"integer","minimum":1}]}],"description":"Page number for pagination (1-based). When provided, returns paginated response format { payload: [], pagination: {} }.","required":false,"in":"query","name":"page"},{"type":"string","enum":["createdAt","updatedAt","title","noOfGrants","noOfProjectMilestones","noOfGrantMilestones"],"default":"updatedAt","description":"Field to sort by: createdAt, updatedAt, title, noOfGrants, noOfProjectMilestones, noOfGrantMilestones","required":false,"in":"query","name":"sortBy"},{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort direction: asc or desc","required":false,"in":"query","name":"sortOrder"},{"allOf":[{"anyOf":[{"not":{}},{"anyOf":[{"type":"string"},{"type":"boolean"}]}]},{"type":"boolean"}],"description":"When true, includes stats for each project: grantsCount, grantMilestonesCount, roadmapItemsCount","required":false,"in":"query","name":"includeStats"},{"allOf":[{"anyOf":[{"not":{}},{"anyOf":[{"type":"string"},{"type":"boolean"}]}]},{"type":"boolean"}],"description":"When true, excludes projects with \"test\" (case-insensitive) in title","required":false,"in":"query","name":"excludeTestProjects"},{"allOf":[{"anyOf":[{"not":{}},{"anyOf":[{"type":"string"},{"type":"boolean"}]}]},{"type":"boolean"}],"description":"When true, only returns projects that have at least one payout address configured (payoutAddress or chainPayoutAddress)","required":false,"in":"query","name":"hasPayoutAddress"}],"responses":{"200":{"description":"Default Response","schema":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Project unique identifier"},"chainID":{"type":"number","description":"Blockchain chain ID"},"owner":{"type":"string","description":"Project owner address"},"payoutAddress":{"type":"string","description":"Payout wallet address"},"chainPayoutAddress":{"type":"object","additionalProperties":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"nullable":true,"description":"Chain-specific payout wallet addresses"},"details":{"type":"object","properties":{"title":{"type":"string","description":"Project title"},"description":{"type":"string","description":"Project description"},"problem":{"type":"string","description":"Problem statement"},"solution":{"type":"string","description":"Solution description"},"missionSummary":{"type":"string","description":"Mission summary"},"locationOfImpact":{"type":"string","nullable":true,"description":"Location of impact"},"slug":{"type":"string","description":"Project slug"},"logoUrl":{"type":"string","nullable":true,"description":"Logo URL"},"businessModel":{"type":"string","nullable":true,"description":"Business model"},"stageIn":{"type":"string","nullable":true,"description":"Current stage"},"raisedMoney":{"type":"string","nullable":true,"description":"Raised money information"},"pathToTake":{"type":"string","nullable":true,"description":"Path to take"},"tags":{"type":"array","items":{"type":"string"},"description":"Project tags"},"links":{"type":"array","description":"External links"},"lastDetailsUpdate":{"type":"string","nullable":true,"description":"Last details update timestamp"}},"required":["title","description","slug","tags","links","lastDetailsUpdate"],"additionalProperties":false,"description":"Project details"},"external":{"type":"object","properties":{"gitcoin":{"description":"Gitcoin data"},"oso":{"description":"OSO data"},"divvi_wallets":{"description":"Divvi wallets data"},"github":{"description":"GitHub data"},"network_addresses":{"description":"Network addresses data"},"network_addresses_verified":{"description":"Network addresses that were verified by deployer"}},"additionalProperties":false,"description":"External integrations"},"members":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"Member wallet address"},"role":{"type":"string","description":"Member role"},"joinedAt":{"type":"string","description":"Join timestamp"}},"required":["address","role","joinedAt"],"additionalProperties":false},"description":"Project members"},"endorsements":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Endorsement unique identifier"},"endorsedBy":{"type":"string","description":"Endorser address"},"comment":{"type":"string","description":"Endorsement comment"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","endorsedBy","comment","createdAt"],"additionalProperties":false},"description":"Project endorsements"},"milestones":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Milestone unique identifier"},"title":{"type":"string","description":"Milestone title"},"description":{"type":"string","description":"Milestone description"},"dueDate":{"type":"string","description":"Due date"},"currentStatus":{"type":"string","description":"Current status"},"statusUpdatedAt":{"type":"string","description":"Status update timestamp"},"completed":{"type":"object","properties":{"timestamp":{"type":"string","description":"Completion timestamp"},"attestationUID":{"type":"string","description":"Attestation unique identifier"},"proofOfWork":{"type":"string","description":"Proof of work"},"reason":{"type":"string","description":"Completion reason"},"attester":{"type":"string","description":"Attester address"}},"required":["timestamp","attestationUID","proofOfWork","attester"],"additionalProperties":false,"nullable":true,"description":"Completion details"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","title","description","dueDate","currentStatus","statusUpdatedAt","completed","createdAt"],"additionalProperties":false},"description":"Project milestones"},"impacts":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Impact unique identifier"},"work":{"type":"string","description":"Work description"},"proof":{"type":"string","description":"Proof of impact"},"impact":{"type":"string","description":"Impact description"},"verified":{"type":"boolean","description":"Verification status"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","work","proof","impact","verified","createdAt"],"additionalProperties":false},"description":"Project impacts"},"updates":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Update unique identifier"},"title":{"type":"string","description":"Update title"},"text":{"type":"string","description":"Update text"},"startDate":{"type":"string","description":"Start date"},"endDate":{"type":"string","description":"End date"},"grants":{"type":"array","description":"Related grants"},"indicators":{"type":"array","description":"Progress indicators"},"deliverables":{"type":"array","description":"Deliverables"},"verified":{"type":"boolean","description":"Verification status"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","title","text","startDate","endDate","grants","indicators","deliverables","verified","createdAt"],"additionalProperties":false},"description":"Project updates"},"communities":{"type":"array","description":"Associated communities"},"pointers":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Pointer unique identifier"},"originalProjectUID":{"type":"string","description":"Original project UID"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","originalProjectUID","createdAt"],"additionalProperties":false},"description":"Project pointers (merged projects)"},"createdAt":{"type":"string","description":"Project creation timestamp"},"updatedAt":{"type":"string","description":"Project last update timestamp"},"stats":{"type":"object","properties":{"grantsCount":{"type":"number","description":"Number of grants received"},"grantMilestonesCount":{"type":"number","description":"Total milestones across all grants"},"roadmapItemsCount":{"type":"number","description":"Number of project milestones (roadmap items)"}},"required":["grantsCount","grantMilestonesCount","roadmapItemsCount"],"additionalProperties":false,"description":"Project statistics (only included when includeStats=true)"}},"required":["uid","chainID","owner","chainPayoutAddress","details","external","members","endorsements","milestones","impacts","updates","communities","pointers"],"additionalProperties":false}},{"type":"object","properties":{"payload":{"type":"array","items":{"$ref":"#/anyOf/0/items"},"description":"Array of projects"},"pagination":{"type":"object","properties":{"totalCount":{"type":"number","description":"Total number of results"},"page":{"type":"number","description":"Current page number"},"limit":{"type":"number","description":"Results per page"},"totalPages":{"type":"number","description":"Total number of pages"},"nextPage":{"type":"number","nullable":true,"description":"Next page number or null"},"prevPage":{"type":"number","nullable":true,"description":"Previous page number or null"},"hasNextPage":{"type":"boolean","description":"Whether there is a next page"},"hasPrevPage":{"type":"boolean","description":"Whether there is a previous page"}},"required":["totalCount","page","limit","totalPages","nextPage","prevPage","hasNextPage","hasPrevPage"],"additionalProperties":false,"description":"Pagination metadata"}},"required":["payload","pagination"],"additionalProperties":false}]}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/projects/slug/check/{slug}":{"get":{"summary":"Check Slug Availability","description":"Check if a project slug is available for use. Returns 200 OK with availability status. If the slug is taken, includes information about the existing project.","tags":["Projects"],"parameters":[{"type":"string","minLength":1,"pattern":"^[a-z0-9_-]+$","required":true,"in":"path","name":"slug"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"available":{"type":"boolean","description":"Whether the slug is available for use"},"existingProject":{"type":"object","properties":{"uid":{"type":"string","description":"Existing project UID"},"title":{"type":"string","description":"Existing project title"}},"required":["uid","title"],"additionalProperties":false,"description":"Information about existing project if slug is taken"}},"required":["available"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/projects/{identifier}":{"get":{"summary":"Get Project by Identifier","description":"Get project by UID or slug (auto-detected). Supports both 0x-prefixed UIDs and slug identifiers","tags":["Projects"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"identifier"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"uid":{"type":"string","description":"Project unique identifier"},"chainID":{"type":"number","description":"Blockchain chain ID"},"owner":{"type":"string","description":"Project owner address"},"payoutAddress":{"type":"string","description":"Payout wallet address"},"chainPayoutAddress":{"type":"object","additionalProperties":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"nullable":true,"description":"Chain-specific payout wallet addresses"},"details":{"type":"object","properties":{"title":{"type":"string","description":"Project title"},"description":{"type":"string","description":"Project description"},"problem":{"type":"string","description":"Problem statement"},"solution":{"type":"string","description":"Solution description"},"missionSummary":{"type":"string","description":"Mission summary"},"locationOfImpact":{"type":"string","nullable":true,"description":"Location of impact"},"slug":{"type":"string","description":"Project slug"},"logoUrl":{"type":"string","nullable":true,"description":"Logo URL"},"businessModel":{"type":"string","nullable":true,"description":"Business model"},"stageIn":{"type":"string","nullable":true,"description":"Current stage"},"raisedMoney":{"type":"string","nullable":true,"description":"Raised money information"},"pathToTake":{"type":"string","nullable":true,"description":"Path to take"},"tags":{"type":"array","items":{"type":"string"},"description":"Project tags"},"links":{"type":"array","description":"External links","items":{}},"lastDetailsUpdate":{"type":"string","nullable":true,"description":"Last details update timestamp"}},"required":["title","description","slug","tags","links","lastDetailsUpdate"],"additionalProperties":false,"description":"Project details"},"external":{"type":"object","properties":{"gitcoin":{"description":"Gitcoin data"},"oso":{"description":"OSO data"},"divvi_wallets":{"description":"Divvi wallets data"},"github":{"description":"GitHub data"},"network_addresses":{"description":"Network addresses data"},"network_addresses_verified":{"description":"Network addresses that were verified by deployer"}},"additionalProperties":false,"description":"External integrations"},"members":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"Member wallet address"},"role":{"type":"string","description":"Member role"},"joinedAt":{"type":"string","description":"Join timestamp"}},"required":["address","role","joinedAt"],"additionalProperties":false},"description":"Project members"},"endorsements":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Endorsement unique identifier"},"endorsedBy":{"type":"string","description":"Endorser address"},"comment":{"type":"string","description":"Endorsement comment"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","endorsedBy","comment","createdAt"],"additionalProperties":false},"description":"Project endorsements"},"milestones":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Milestone unique identifier"},"title":{"type":"string","description":"Milestone title"},"description":{"type":"string","description":"Milestone description"},"dueDate":{"type":"string","description":"Due date"},"currentStatus":{"type":"string","description":"Current status"},"statusUpdatedAt":{"type":"string","description":"Status update timestamp"},"completed":{"type":"object","properties":{"timestamp":{"type":"string","description":"Completion timestamp"},"attestationUID":{"type":"string","description":"Attestation unique identifier"},"proofOfWork":{"type":"string","description":"Proof of work"},"reason":{"type":"string","description":"Completion reason"},"attester":{"type":"string","description":"Attester address"}},"required":["timestamp","attestationUID","proofOfWork","attester"],"additionalProperties":false,"nullable":true,"description":"Completion details"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","title","description","dueDate","currentStatus","statusUpdatedAt","completed","createdAt"],"additionalProperties":false},"description":"Project milestones"},"impacts":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Impact unique identifier"},"work":{"type":"string","description":"Work description"},"proof":{"type":"string","description":"Proof of impact"},"impact":{"type":"string","description":"Impact description"},"verified":{"type":"boolean","description":"Verification status"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","work","proof","impact","verified","createdAt"],"additionalProperties":false},"description":"Project impacts"},"updates":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Update unique identifier"},"title":{"type":"string","description":"Update title"},"text":{"type":"string","description":"Update text"},"startDate":{"type":"string","description":"Start date"},"endDate":{"type":"string","description":"End date"},"grants":{"type":"array","description":"Related grants","items":{}},"indicators":{"type":"array","description":"Progress indicators","items":{}},"deliverables":{"type":"array","description":"Deliverables","items":{}},"verified":{"type":"boolean","description":"Verification status"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","title","text","startDate","endDate","grants","indicators","deliverables","verified","createdAt"],"additionalProperties":false},"description":"Project updates"},"communities":{"type":"array","description":"Associated communities","items":{}},"pointers":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Pointer unique identifier"},"originalProjectUID":{"type":"string","description":"Original project UID"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","originalProjectUID","createdAt"],"additionalProperties":false},"description":"Project pointers (merged projects)"},"createdAt":{"type":"string","description":"Project creation timestamp"},"updatedAt":{"type":"string","description":"Project last update timestamp"},"stats":{"type":"object","properties":{"grantsCount":{"type":"number","description":"Number of grants received"},"grantMilestonesCount":{"type":"number","description":"Total milestones across all grants"},"roadmapItemsCount":{"type":"number","description":"Number of project milestones (roadmap items)"}},"required":["grantsCount","grantMilestonesCount","roadmapItemsCount"],"additionalProperties":false,"description":"Project statistics (only included when includeStats=true)"}},"required":["uid","chainID","owner","chainPayoutAddress","details","external","members","endorsements","milestones","impacts","updates","communities","pointers"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/projects/logos/presigned":{"post":{"summary":"Generate Presigned URL for Project Logo Upload","description":"Generate a presigned URL for uploading project logo images to S3","tags":["Projects"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"fileName":{"type":"string","minLength":1,"description":"Name of the file to upload"},"fileType":{"type":"string","enum":["image/jpeg","image/png","image/webp"],"description":"MIME type of the file"},"fileSize":{"type":"number","maximum":5242880,"description":"File size in bytes (max 5MB)"},"width":{"type":"number","minimum":1,"description":"Image width in pixels"},"height":{"type":"number","minimum":1,"description":"Image height in pixels"}},"required":["fileName","fileType","fileSize","width","height"],"additionalProperties":false}}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"uploadUrl":{"type":"string","description":"Presigned URL for uploading the file"},"finalUrl":{"type":"string","description":"Final URL where the file will be accessible"},"key":{"type":"string","description":"Unique key identifying the uploaded file"}},"required":["uploadUrl","finalUrl","key"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/projects/logos/promote-to-permanent":{"post":{"summary":"Promote Logo to Permanent Storage","description":"Promote a temporarily uploaded logo file to permanent storage and associate it with a project","tags":["Projects"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"tempKey":{"type":"string","minLength":1,"description":"Temporary S3 key of the uploaded file"},"projectId":{"type":"string","minLength":1,"description":"Project identifier to associate with the logo"}},"required":["tempKey","projectId"],"additionalProperties":false}}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"permanentUrl":{"type":"string","description":"Permanent URL of the promoted file"},"permanentKey":{"type":"string","description":"Permanent S3 key of the file"},"message":{"type":"string","description":"Success or status message"}},"required":["permanentUrl","permanentKey","message"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/projects/{projectId}/regions":{"put":{"summary":"Update Project Regions","description":"Update the regions assigned to a project. Only community administrators can perform this operation.","tags":["Projects"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"regions":{"type":"array","items":{"type":"string"},"maxItems":1,"description":"Array of region IDs to assign to the project (maximum 1)"},"communityUID":{"type":"string","minLength":1,"description":"Community unique identifier"}},"required":["regions","communityUID"],"additionalProperties":false}},{"type":"string","minLength":1,"description":"Project unique identifier","required":true,"in":"path","name":"projectId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"projectUID":{"type":"string","description":"Project unique identifier"},"regions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Region unique identifier"},"name":{"type":"string","description":"Region name"},"communityUID":{"type":"string","description":"Community unique identifier"},"description":{"type":"string","nullable":true,"description":"Region description"},"isDeleted":{"type":"boolean","description":"Whether the region is deleted"},"createdAt":{"type":"string","format":"date-time","description":"Region creation date"},"updatedAt":{"type":"string","format":"date-time","description":"Region update date"}},"required":["id","name","communityUID","isDeleted","createdAt","updatedAt"],"additionalProperties":false},"description":"Updated regions associated with the project"}},"required":["success","projectUID","regions"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/projects/{projectId}/chain-payout-address":{"put":{"summary":"Update Chain Payout Addresses","description":"Update chain-specific payout addresses for a project. Requires authentication. Only project admins (owner or admin members) or staff can update. Pass empty string or null for a chain ID to remove that address.","tags":["Projects"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"chainPayoutAddresses":{"type":"object","additionalProperties":{"type":"string","pattern":"^(0x[a-fA-F0-9]{40})?$","nullable":true,"description":"Wallet address for receiving donations on this chain, or empty/null to remove"},"description":"Map of chain IDs to payout wallet addresses. Use empty string or null to remove an address."}},"required":["chainPayoutAddresses"],"additionalProperties":false}},{"type":"string","minLength":1,"description":"Project unique identifier (UID or slug)","required":true,"in":"path","name":"projectId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"projectUID":{"type":"string","description":"Project unique identifier"},"chainPayoutAddress":{"type":"object","additionalProperties":{"type":"string"},"nullable":true,"description":"Updated map of chain IDs to payout wallet addresses"}},"required":["success","projectUID","chainPayoutAddress"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/projects/{identifier}/updates":{"get":{"summary":"Get Project Updates","description":"Get project activities, project milestones, and grant milestones from all chains for a project (by UID or slug). Optionally filter grant milestones by program IDs.","tags":["Projects"],"parameters":[{"type":"string","description":"Comma-separated list of program IDs in format programId_chainId (e.g., 920_42161,921_42161)","required":false,"in":"query","name":"programIds"},{"type":"string","description":"Flag to include funding application milestone completion data. Set to \"true\" to enable.","required":false,"in":"query","name":"includeFundingApplicationData"},{"type":"string","enum":["pending","completed","verified"],"description":"Filter milestones by lifecycle status. One of: pending, completed, verified. Omit to return all milestones.","required":false,"in":"query","name":"milestoneStatus"},{"type":"string","minLength":1,"description":"Project identifier (UID or slug)","required":true,"in":"path","name":"identifier"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"projectUpdates":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Update unique identifier"},"recipient":{"type":"string","description":"Address of the update creator"},"title":{"type":"string","description":"Update title"},"description":{"type":"string","description":"Update description"},"verified":{"type":"boolean","description":"Whether update is verified"},"startDate":{"type":"string","nullable":true,"description":"Update start date"},"endDate":{"type":"string","nullable":true,"description":"Update end date"},"createdAt":{"type":"string","nullable":true,"description":"Creation timestamp"},"associations":{"type":"object","properties":{"funding":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Grant title"},"uid":{"type":"string","description":"Grant UID"}},"additionalProperties":false},"description":"Associated funding/grants"},"indicators":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Indicator ID"},"name":{"type":"string","description":"Indicator name"},"description":{"type":"string","description":"Indicator description"},"unitOfMeasure":{"type":"string","description":"Unit of measure for the indicator"}},"additionalProperties":false},"description":"Associated indicators with full details"},"deliverables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Deliverable name"},"proof":{"type":"string","description":"Proof of deliverable"},"description":{"type":"string","description":"Deliverable description"}},"additionalProperties":false},"description":"Update deliverables"}},"required":["funding","indicators","deliverables"],"additionalProperties":false,"description":"Associations with grants, indicators, and deliverables"}},"required":["uid","recipient","title","description","verified","startDate","endDate","createdAt","associations"],"additionalProperties":false},"description":"Project updates/activities"},"projectMilestones":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Milestone unique identifier"},"title":{"type":"string","description":"Milestone title - what needs to be done"},"description":{"type":"string","description":"Milestone description - detailed requirements"},"dueDate":{"type":"string","nullable":true,"description":"Milestone due date"},"createdAt":{"type":"string","nullable":true,"description":"Creation timestamp"},"recipient":{"type":"string","description":"Address of milestone recipient"},"status":{"type":"string","description":"Current status"},"completionDetails":{"type":"object","properties":{"description":{"type":"string","description":"Description of what was completed"},"completedAt":{"type":"string","nullable":true,"description":"Completion timestamp"},"completedBy":{"type":"string","description":"Address of who completed it"},"attestationUID":{"type":"string","description":"Completion attestation UID"},"proofOfWork":{"type":"string","description":"Proof of work submitted"}},"required":["description","completedAt","completedBy"],"additionalProperties":false,"nullable":true,"description":"Completion details - what was actually done (null if not completed)"}},"required":["uid","title","description","dueDate","createdAt","status","completionDetails"],"additionalProperties":false},"description":"Project milestones with completion details"},"grantMilestones":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Grant milestone unique identifier"},"programId":{"type":"string","description":"Associated program ID"},"chainId":{"type":"string","description":"Associated chain ID"},"title":{"type":"string","description":"Milestone title - what needs to be done"},"description":{"type":"string","description":"Milestone description - detailed requirements"},"priority":{"type":"number","description":"Milestone priority (1-5)"},"dueDate":{"type":"string","nullable":true,"description":"Milestone due date"},"createdAt":{"type":"string","nullable":true,"description":"Creation timestamp"},"recipient":{"type":"string","description":"Address of milestone recipient"},"status":{"type":"string","description":"Current status"},"grant":{"type":"object","properties":{"uid":{"type":"string","description":"Grant unique identifier"},"title":{"type":"string","description":"Grant title"},"communityName":{"type":"string","description":"Community name"},"communitySlug":{"type":"string","description":"Community slug"},"communityImage":{"type":"string","description":"Community image URL"}},"required":["uid"],"additionalProperties":false,"description":"Grant information"},"completionDetails":{"type":"object","properties":{"description":{"type":"string","description":"Description of what was completed"},"completedAt":{"type":"string","nullable":true,"description":"Completion timestamp"},"completedBy":{"type":"string","description":"Address of who completed it"},"attestationUID":{"type":"string","description":"Completion attestation UID"},"proofOfWork":{"type":"string","description":"Proof of work submitted"},"completionPercentage":{"type":"number","description":"Percentage of grant completed"},"deliverables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Deliverable name"},"description":{"type":"string","description":"Deliverable description"},"proof":{"type":"string","description":"Proof of deliverable"}},"additionalProperties":false},"description":"Deliverables submitted with completion"}},"required":["description","completedAt","completedBy"],"additionalProperties":false,"nullable":true,"description":"Completion details - what was actually done (null if not completed)"},"verificationDetails":{"type":"object","properties":{"description":{"type":"string","description":"Verification reason/comment"},"verifiedAt":{"type":"string","nullable":true,"description":"Verification timestamp"},"verifiedBy":{"type":"string","description":"Address of who verified it"},"attestationUID":{"type":"string","description":"Verification attestation UID"}},"required":["description","verifiedAt","verifiedBy"],"additionalProperties":false,"nullable":true,"description":"On-chain verification details (null if not verified)"},"fundingApplicationCompletion":{"type":"object","properties":{"id":{"type":"string","description":"Milestone completion ID"},"referenceNumber":{"type":"string","description":"Funding application reference number"},"milestoneFieldLabel":{"type":"string","description":"Milestone field label from form"},"milestoneTitle":{"type":"string","description":"Milestone title"},"completionText":{"type":"string","description":"Completion description/text"},"ownerAddress":{"type":"string","description":"Address of application owner"},"isVerified":{"type":"boolean","description":"Whether completion is verified"},"verifiedBy":{"type":"string","description":"Address of verifier"},"verifiedAt":{"type":"string","nullable":true,"description":"Verification timestamp"},"verificationComment":{"type":"string","description":"Verification comment"},"createdAt":{"type":"string","description":"Creation timestamp"},"updatedAt":{"type":"string","description":"Last update timestamp"}},"required":["id","referenceNumber","milestoneFieldLabel","milestoneTitle","completionText","ownerAddress","isVerified","createdAt","updatedAt"],"additionalProperties":false,"nullable":true,"description":"Funding application milestone completion data if project is linked to a funding application"},"invoiceInfo":{"type":"object","properties":{"status":{"type":"string","description":"Invoice status"},"receivedAt":{"type":"string","nullable":true,"description":"When invoice was received"},"fileKey":{"type":"string","nullable":true,"description":"S3 file key for download"}},"required":["status","receivedAt","fileKey"],"additionalProperties":false,"nullable":true,"description":"Invoice information for this milestone"}},"required":["uid","chainId","title","description","dueDate","createdAt","status","completionDetails","verificationDetails"],"additionalProperties":false},"description":"Grant milestones with completion details"},"grantUpdates":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Grant update unique identifier"},"refUID":{"type":"string","description":"Reference UID of the associated grant"},"chainId":{"type":"number","description":"Chain ID where the grant exists"},"recipient":{"type":"string","description":"Address of the update creator"},"title":{"type":"string","description":"Update title"},"text":{"type":"string","description":"Update text/description"},"proofOfWork":{"type":"string","description":"Proof of work URL or description"},"completionPercentage":{"type":"string","description":"Grant completion percentage"},"currentStatus":{"type":"string","description":"Current status"},"statusUpdatedAt":{"type":"string","nullable":true,"description":"Status update timestamp"},"verified":{"type":"boolean","description":"Whether update is verified"},"createdAt":{"type":"string","nullable":true,"description":"Creation timestamp"},"grant":{"type":"object","properties":{"uid":{"type":"string","description":"Grant unique identifier"},"title":{"type":"string","description":"Grant title"},"communityName":{"type":"string","description":"Community name"},"communitySlug":{"type":"string","description":"Community slug"},"communityImage":{"type":"string","description":"Community image URL"}},"required":["uid"],"additionalProperties":false,"description":"Grant information"}},"required":["uid","refUID","chainId","recipient","title","text","proofOfWork","completionPercentage","currentStatus","statusUpdatedAt","verified","createdAt"],"additionalProperties":false},"description":"Grant updates/progress reports"}},"required":["projectUpdates","projectMilestones","grantMilestones","grantUpdates"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/projects/{identifier}/milestones":{"get":{"summary":"Get Project Milestones","description":"Get project-level milestones (roadmap items) for a project by UID or slug. These are different from grant milestones.","tags":["Projects"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"identifier"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"milestones":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"dueDate":{"type":"string","nullable":true},"currentStatus":{"type":"string"},"statusUpdatedAt":{"type":"string","nullable":true},"completed":{"type":"object","properties":{"timestamp":{"type":"string"},"attestationUID":{"type":"string"},"proofOfWork":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true},"attester":{"type":"string"}},"required":["timestamp","attestationUID","proofOfWork","reason","attester"],"additionalProperties":false,"nullable":true},"createdAt":{"type":"string"}},"required":["uid","title","description","dueDate","currentStatus","statusUpdatedAt","completed","createdAt"],"additionalProperties":false}}},"required":["milestones"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/projects/{identifier}/grants":{"get":{"summary":"Get Project Grants","description":"Get all grants for a project by UID or slug. Returns grants with milestones, updates, and completion data.","tags":["Projects"],"parameters":[{"type":"string","minLength":1,"description":"Project identifier - either a UID (0x-prefixed hex string) or a slug","required":true,"in":"path","name":"identifier"}],"responses":{"200":{"description":"Default Response","schema":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string"},"chainID":{"type":"number"},"type":{"type":"string","enum":["Grant"]},"refUID":{"type":"string"},"projectUID":{"type":"string"},"communityUID":{"type":"string"},"programId":{"type":"string","nullable":true},"programType":{"type":"string","enum":["grant","hackathon","bounty","accelerator","vc_fund","rfp"]},"originalProjectUID":{"type":"string","nullable":true},"data":{"type":"object","properties":{"communityUID":{"type":"string"}},"additionalProperties":false},"details":{"type":"object","properties":{"title":{"type":"string"},"amount":{"type":"string"},"currency":{"type":"string"},"description":{"type":"string"},"proposalURL":{"type":"string"},"startDate":{"type":"string","nullable":true},"receivedDate":{"type":"string","nullable":true},"payoutAddress":{"type":"string"},"questions":{"type":"array","items":{}},"selectedTrackIds":{"type":"array","items":{"type":"string"}},"isCompleted":{"type":"boolean"},"completedAt":{"type":"string","nullable":true},"lastDetailsUpdate":{"type":"string"},"programId":{"type":"string"},"data":{"type":"object","properties":{"title":{"type":"string"},"amount":{"type":"string"},"description":{"type":"string"},"proposalURL":{"type":"string"},"startDate":{"type":"number"},"receivedDate":{"type":"number"},"payoutAddress":{"type":"string"},"questions":{"type":"array","items":{}},"programId":{"type":"string"},"type":{"type":"string","enum":["grant-details"]},"selectedTrackIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}},"required":["title"],"additionalProperties":false,"nullable":true},"milestones":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string"},"chainID":{"type":"number"},"refUID":{"type":"string"},"type":{"type":"string","enum":["Milestone"]},"title":{"type":"string"},"description":{"type":"string"},"endsAt":{"type":"number"},"startsAt":{"type":"number"},"priority":{"type":"number"},"currentStatus":{"type":"string"},"statusUpdatedAt":{"type":"string"},"statusHistory":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"statusReason":{"type":"string"}},"required":["status","updatedAt"],"additionalProperties":false}},"completed":{"type":"object","properties":{"uid":{"type":"string"},"chainID":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"data":{"type":"object","properties":{"reason":{"type":"string"},"proofOfWork":{"type":"string"},"completionPercentage":{"type":"number"},"deliverables":{"type":"array","items":{}}},"additionalProperties":false}},"additionalProperties":false,"nullable":true},"verified":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string"},"attester":{"type":"string"},"reason":{"type":"string"},"createdAt":{"type":"string"}},"required":["uid","attester","createdAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"data":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"endsAt":{"type":"number"},"startsAt":{"type":"number"},"priority":{"type":"number"},"type":{"type":"string","enum":["milestone"]}},"additionalProperties":false},"invoiceInfo":{"type":"object","properties":{"status":{"type":"string"},"receivedAt":{"type":"string","nullable":true},"fileKey":{"type":"string","nullable":true}},"required":["status","receivedAt","fileKey"],"additionalProperties":false,"nullable":true}},"required":["uid","chainID","title","description","currentStatus","verified"],"additionalProperties":false}},"updates":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string"},"chainID":{"type":"number"},"refUID":{"type":"string"},"type":{"type":"string","enum":["GrantUpdate"]},"title":{"type":"string"},"text":{"type":"string"},"proofOfWork":{"type":"string"},"completionPercentage":{"type":"string"},"currentStatus":{"type":"string"},"statusUpdatedAt":{"type":"string"},"verified":{"type":"array","items":{"$ref":"#/items/properties/milestones/items/properties/verified/items"}},"createdAt":{"type":"string"},"data":{"type":"object","properties":{"title":{"type":"string"},"text":{"type":"string"},"proofOfWork":{"type":"string"},"type":{"type":"string","enum":["grant-update"]}},"additionalProperties":false}},"required":["uid","chainID","refUID","verified"],"additionalProperties":false}},"completed":{"type":"object","properties":{"uid":{"type":"string"},"createdAt":{"type":"string","nullable":true},"data":{"type":"object","properties":{"title":{"type":"string"},"text":{"type":"string"},"proofOfWork":{"type":"string"},"pitchDeckLink":{"type":"string"},"demoVideoLink":{"type":"string"},"trackExplanations":{"type":"array","items":{"type":"object","properties":{"trackUID":{"type":"string"},"explanation":{"type":"string"}},"required":["trackUID","explanation"],"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false,"nullable":true},"community":{"type":"object","properties":{"uid":{"type":"string"},"chainID":{"type":"number"},"details":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"imageURL":{"type":"string"},"slug":{"type":"string"}},"additionalProperties":false}},"required":["uid","chainID"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["uid","chainID","projectUID","communityUID","milestones","updates","createdAt","updatedAt"],"additionalProperties":false}}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/projects/{identifier}/grants/{programId}/milestones":{"get":{"summary":"Get Grant with Application Milestones","description":"Get project, grant, funding application, and mapped milestones with completion data. Returns application milestones mapped to on-chain grant milestones (with UIDs for attestation). Supports both project UID and slug identifiers.","tags":["Projects"],"parameters":[{"type":"string","description":"Project UID or slug (auto-detected by 0x prefix)","required":true,"in":"path","name":"identifier"},{"type":"string","description":"Program ID to filter the grant","required":true,"in":"path","name":"programId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"project":{"type":"object","properties":{"uid":{"type":"string","description":"Project unique identifier"},"chainID":{"type":"number","description":"Blockchain chain ID"},"owner":{"type":"string","description":"Project owner address"},"payoutAddress":{"type":"string","description":"Payout wallet address"},"chainPayoutAddress":{"type":"object","additionalProperties":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"nullable":true,"description":"Chain-specific payout wallet addresses"},"details":{"type":"object","properties":{"title":{"type":"string","description":"Project title"},"description":{"type":"string","description":"Project description"},"problem":{"type":"string","description":"Problem statement"},"solution":{"type":"string","description":"Solution description"},"missionSummary":{"type":"string","description":"Mission summary"},"locationOfImpact":{"type":"string","nullable":true,"description":"Location of impact"},"slug":{"type":"string","description":"Project slug"},"logoUrl":{"type":"string","nullable":true,"description":"Logo URL"},"businessModel":{"type":"string","nullable":true,"description":"Business model"},"stageIn":{"type":"string","nullable":true,"description":"Current stage"},"raisedMoney":{"type":"string","nullable":true,"description":"Raised money information"},"pathToTake":{"type":"string","nullable":true,"description":"Path to take"},"tags":{"type":"array","items":{"type":"string"},"description":"Project tags"},"links":{"type":"array","description":"External links","items":{}},"lastDetailsUpdate":{"type":"string","nullable":true,"description":"Last details update timestamp"}},"required":["title","description","slug","tags","links","lastDetailsUpdate"],"additionalProperties":false,"description":"Project details"},"external":{"type":"object","properties":{"gitcoin":{"description":"Gitcoin data"},"oso":{"description":"OSO data"},"divvi_wallets":{"description":"Divvi wallets data"},"github":{"description":"GitHub data"},"network_addresses":{"description":"Network addresses data"},"network_addresses_verified":{"description":"Network addresses that were verified by deployer"}},"additionalProperties":false,"description":"External integrations"},"members":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"Member wallet address"},"role":{"type":"string","description":"Member role"},"joinedAt":{"type":"string","description":"Join timestamp"}},"required":["address","role","joinedAt"],"additionalProperties":false},"description":"Project members"},"endorsements":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Endorsement unique identifier"},"endorsedBy":{"type":"string","description":"Endorser address"},"comment":{"type":"string","description":"Endorsement comment"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","endorsedBy","comment","createdAt"],"additionalProperties":false},"description":"Project endorsements"},"milestones":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Milestone unique identifier"},"title":{"type":"string","description":"Milestone title"},"description":{"type":"string","description":"Milestone description"},"dueDate":{"type":"string","description":"Due date"},"currentStatus":{"type":"string","description":"Current status"},"statusUpdatedAt":{"type":"string","description":"Status update timestamp"},"completed":{"type":"object","properties":{"timestamp":{"type":"string","description":"Completion timestamp"},"attestationUID":{"type":"string","description":"Attestation unique identifier"},"proofOfWork":{"type":"string","description":"Proof of work"},"reason":{"type":"string","description":"Completion reason"},"attester":{"type":"string","description":"Attester address"}},"required":["timestamp","attestationUID","proofOfWork","attester"],"additionalProperties":false,"nullable":true,"description":"Completion details"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","title","description","dueDate","currentStatus","statusUpdatedAt","completed","createdAt"],"additionalProperties":false},"description":"Project milestones"},"impacts":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Impact unique identifier"},"work":{"type":"string","description":"Work description"},"proof":{"type":"string","description":"Proof of impact"},"impact":{"type":"string","description":"Impact description"},"verified":{"type":"boolean","description":"Verification status"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","work","proof","impact","verified","createdAt"],"additionalProperties":false},"description":"Project impacts"},"updates":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Update unique identifier"},"title":{"type":"string","description":"Update title"},"text":{"type":"string","description":"Update text"},"startDate":{"type":"string","description":"Start date"},"endDate":{"type":"string","description":"End date"},"grants":{"type":"array","description":"Related grants","items":{}},"indicators":{"type":"array","description":"Progress indicators","items":{}},"deliverables":{"type":"array","description":"Deliverables","items":{}},"verified":{"type":"boolean","description":"Verification status"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","title","text","startDate","endDate","grants","indicators","deliverables","verified","createdAt"],"additionalProperties":false},"description":"Project updates"},"communities":{"type":"array","description":"Associated communities","items":{}},"pointers":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Pointer unique identifier"},"originalProjectUID":{"type":"string","description":"Original project UID"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","originalProjectUID","createdAt"],"additionalProperties":false},"description":"Project pointers (merged projects)"},"createdAt":{"type":"string","description":"Project creation timestamp"},"updatedAt":{"type":"string","description":"Project last update timestamp"},"stats":{"type":"object","properties":{"grantsCount":{"type":"number","description":"Number of grants received"},"grantMilestonesCount":{"type":"number","description":"Total milestones across all grants"},"roadmapItemsCount":{"type":"number","description":"Number of project milestones (roadmap items)"}},"required":["grantsCount","grantMilestonesCount","roadmapItemsCount"],"additionalProperties":false,"description":"Project statistics (only included when includeStats=true)"}},"required":["uid","chainID","owner","chainPayoutAddress","details","external","members","endorsements","milestones","impacts","updates","communities","pointers"],"additionalProperties":false,"description":"Project details"},"grant":{"type":"object","properties":{"uid":{"type":"string","description":"Grant unique identifier"},"chainID":{"type":"number","description":"Blockchain chain ID"},"projectUID":{"type":"string","description":"Associated project UID"},"communityUID":{"type":"string","description":"Associated community UID"},"programId":{"type":"string","description":"Program identifier"},"originalProjectUID":{"type":"string","description":"Original project UID if forked"},"details":{"type":"object","properties":{"title":{"type":"string","description":"Grant title"},"description":{"type":"string","description":"Grant description"},"amount":{"type":"string","description":"Grant amount"},"payoutAddress":{"type":"string","description":"Payout address"},"startDate":{"type":"string","nullable":true,"description":"Start date"},"receivedDate":{"type":"string","nullable":true,"description":"Received date"},"endDate":{"type":"string","description":"End date"},"proposalURL":{"type":"string","description":"Proposal URL"},"lastDetailsUpdate":{"type":"string","description":"Last details update timestamp"}},"required":["lastDetailsUpdate"],"additionalProperties":false,"description":"Grant details"},"milestones":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Milestone unique identifier"},"title":{"type":"string","description":"Milestone title"},"description":{"type":"string","description":"Milestone description"},"dueDate":{"type":"string","description":"Milestone due date"},"currentStatus":{"type":"string","description":"Current status"},"statusUpdatedAt":{"type":"string","description":"Status update timestamp"},"statusHistory":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","description":"Status value"},"updatedAt":{"type":"string","description":"Update timestamp"}},"required":["status","updatedAt"],"additionalProperties":false},"description":"Status history"}},"required":["uid","title","description","dueDate","currentStatus","statusUpdatedAt","statusHistory"],"additionalProperties":false},"description":"Grant milestones"},"updates":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Update unique identifier"},"text":{"type":"string","description":"Update text"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","text","createdAt"],"additionalProperties":false},"description":"Grant updates"},"createdAt":{"type":"string","description":"Creation timestamp"},"updatedAt":{"type":"string","description":"Last update timestamp"}},"required":["uid","chainID","projectUID","communityUID","programId","details","milestones","updates","createdAt","updatedAt"],"additionalProperties":false,"description":"Grant for this project and program"},"fundingApplication":{"type":"object","properties":{"id":{"type":"string","description":"Unique application identifier"},"programId":{"type":"string","description":"ID of the funding program"},"chainID":{"type":"number","nullable":true,"description":"Blockchain chain ID (null for off-chain programs)"},"applicantEmail":{"type":"string","description":"Email address of the applicant"},"ownerAddress":{"type":"string","description":"Wallet address of the person who submitted the application"},"applicationData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"aiEvaluation":{"description":"AI evaluation data"},"internalAIEvaluation":{"type":"object","properties":{"evaluation":{"type":"string","description":"JSON string of evaluation result"},"promptId":{"type":"string","description":"Langfuse prompt ID used"},"evaluatedAt":{"type":"string","description":"When evaluation was performed"},"status":{"type":"string","enum":["pending","completed","failed"],"description":"Evaluation status"}},"required":["evaluation","promptId","evaluatedAt","status"],"additionalProperties":false,"description":"Internal AI evaluation (only visible to reviewers/admins, never shown to applicants)"},"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Current application status"},"statusHistory":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Application status"},"timestamp":{"type":"string","description":"Status update timestamp"},"reason":{"type":"string","description":"Reason for status change"}},"required":["status","timestamp"],"additionalProperties":false},"description":"History of status changes"},"submissionIP":{"type":"string","description":"IP address from which the application was submitted"},"referenceNumber":{"type":"string","description":"Unique reference number for the application"},"projectUID":{"type":"string","description":"Project UID when application is approved"},"postApprovalData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"postApprovalSubmittedAt":{"type":"string","description":"When post-approval form was first submitted"},"postApprovalUpdatedAt":{"type":"string","description":"Last update to post-approval responses"},"postApprovalCompleted":{"type":"boolean","description":"Tracking completion status of post-approval form"},"approvedAmount":{"type":"string","description":"Amount approved for this application"},"approvedCurrency":{"type":"string","description":"Currency of the approved amount (e.g., \"OP\", \"USD\")"},"appReviewers":{"type":"array","items":{"type":"string"},"description":"Array of program reviewer wallet addresses assigned to this application"},"milestoneReviewers":{"type":"array","items":{"type":"string"},"description":"Array of milestone reviewer wallet addresses assigned to this application"},"createdAt":{"type":"string","description":"Application creation date"},"updatedAt":{"type":"string","description":"Application last update date"},"programTitle":{"type":"string","description":"Title of the funding program"}},"required":["id","programId","chainID","applicantEmail","ownerAddress","applicationData","status","statusHistory","referenceNumber","postApprovalCompleted","createdAt","updatedAt"],"additionalProperties":false,"nullable":true,"description":"Funding application (if exists)"},"mappedMilestones":{"type":"array","items":{"type":"object","properties":{"milestoneFieldLabel":{"type":"string","description":"Field label in application form"},"milestoneTitle":{"type":"string","description":"Milestone title"},"applicationData":{"type":"object","properties":{"title":{"type":"string","description":"Milestone title from application"},"description":{"type":"string","description":"Milestone description"},"dueDate":{"type":"string","description":"Milestone due date"}},"required":["title","description","dueDate"],"additionalProperties":false,"description":"Milestone data from application submission"},"onChainMilestoneUID":{"type":"string","nullable":true,"description":"On-chain milestone UID from grant (for attestation)"},"completion":{"type":"object","properties":{"id":{"type":"string","description":"Completion record ID"},"completionText":{"type":"string","description":"Owner completion description"},"ownerAddress":{"type":"string","description":"Owner wallet address"},"isVerified":{"type":"boolean","description":"Verification status"},"verifiedBy":{"type":"string","description":"Verifier address"},"verifiedAt":{"type":"string","description":"Verification timestamp"},"verificationComment":{"type":"string","description":"Verifier comment"},"createdAt":{"type":"string","description":"Creation timestamp"},"updatedAt":{"type":"string","description":"Last update timestamp"}},"required":["id","completionText","ownerAddress","isVerified","createdAt","updatedAt"],"additionalProperties":false,"nullable":true,"description":"Milestone completion data (if submitted)"}},"required":["milestoneFieldLabel","milestoneTitle","applicationData","onChainMilestoneUID","completion"],"additionalProperties":false},"description":"Application milestones mapped to on-chain grant milestones with completion data"}},"required":["project","grant","fundingApplication","mappedMilestones"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/projects/contracts/address-availability":{"get":{"summary":"Check Contract Address Availability","description":"Check if a contract address is already associated with another project. Returns availability status and existing project information if the address is in use. Requires authentication.","tags":["Projects"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"query","name":"address"},{"type":"string","minLength":1,"required":true,"in":"query","name":"network"},{"type":"string","required":false,"in":"query","name":"excludeProjectId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"isAvailable":{"type":"boolean"},"existingProject":{"type":"object","properties":{"uid":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["uid","name"],"additionalProperties":false}},"required":["isAvailable"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/projects/download-csv":{"get":{"summary":"Download Projects CSV","description":"Download projects as CSV file filtered by date range. Returns a CSV file with project data for projects created between startDate and endDate.","tags":["Projects"],"parameters":[{"type":"string","required":true,"in":"query","name":"startDate"},{"type":"string","required":true,"in":"query","name":"endDate"}],"responses":{"200":{"description":"Default Response"}}}},"/v2/projects/contracts/deployer":{"get":{"summary":"Get Contract Deployer Address","description":"Lookup the deployer address of a smart contract. Returns the address that originally deployed the contract along with transaction details. Requires authentication.","tags":["Contract Verification"],"parameters":[{"type":"string","minLength":1,"description":"Blockchain network name","required":true,"in":"query","name":"network"},{"type":"string","description":"Smart contract address to lookup deployer for","required":true,"in":"query","name":"contractAddress"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"deployerAddress":{"type":"string","description":"Masked deployer wallet address (0xabcd...7890)"},"createdAt":{"type":"string","description":"ISO timestamp of contract creation"},"txHash":{"type":"string","description":"Transaction hash that deployed the contract"}},"required":["deployerAddress","createdAt","txHash"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/projects/contracts/verify-message":{"post":{"summary":"Generate Contract Verification Message","description":"Generate a verification message for contract ownership verification. Returns a message following EIP-4361 standards that the user must sign with their wallet. The nonce is stored for 5 minutes and must be used in the verification request. Requires authentication.","tags":["Contract Verification"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"network":{"type":"string","minLength":1,"description":"Blockchain network name"},"contractAddress":{"type":"string","description":"Smart contract address to verify ownership for"},"userAddress":{"type":"string","description":"Current user wallet address (for logging purposes)"},"chainId":{"type":"integer","minimum":1,"description":"Chain ID for EIP-4361 message (optional)"}},"required":["network","contractAddress","userAddress"],"additionalProperties":false}}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"message":{"type":"string","description":"EIP-4361 formatted message to sign"},"nonce":{"type":"string","description":"Unique nonce for replay protection (expires in 5 minutes)"},"expiresAt":{"type":"string","description":"ISO timestamp when the nonce expires"},"deployerAddress":{"type":"string","description":"Full deployer address (unmasked) for wallet comparison"}},"required":["message","nonce","expiresAt","deployerAddress"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/projects/contracts/verify-signature":{"post":{"summary":"Verify Contract Ownership Signature","description":"Verify a signed message and mark the contract as verified. Validates that the signature was created by the contract deployer address. Updates both the attestation and project tables with the verified contract information. Does not require authentication - the cryptographic signature proves ownership.","tags":["Contract Verification"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"network":{"type":"string","minLength":1,"description":"Blockchain network name"},"contractAddress":{"type":"string","description":"Smart contract address being verified"},"signature":{"type":"string","minLength":1,"description":"Signature from wallet signing the verification message"},"nonce":{"type":"string","minLength":1,"description":"Nonce from the verification message generation"},"projectUid":{"type":"string","minLength":1,"description":"Project UID to associate the verified contract with"}},"required":["network","contractAddress","signature","nonce","projectUid"],"additionalProperties":false}}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"verified":{"type":"boolean","description":"Whether the signature verification succeeded"},"contract":{"type":"object","properties":{"network":{"type":"string","description":"Blockchain network name"},"address":{"type":"string","description":"Verified contract address"},"verifiedAt":{"type":"string","description":"ISO timestamp of verification"},"verifiedBy":{"type":"string","description":"Address that verified the contract ownership"}},"required":["network","address","verifiedAt","verifiedBy"],"additionalProperties":false,"description":"Verified contract information"}},"required":["verified","contract"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/communities/":{"get":{"summary":"Get All Communities","description":"Get all communities with optional filtering and pagination","tags":["Community"],"parameters":[{"type":"number","minimum":1,"default":1,"required":false,"in":"query","name":"page"},{"type":"number","minimum":1,"default":12,"required":false,"in":"query","name":"limit"},{"type":"boolean","default":false,"required":false,"in":"query","name":"includeStats"},{"type":"boolean","default":true,"required":false,"in":"query","name":"groupSimilarCommunities"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"payload":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Unique community identifier"},"chainID":{"type":"number","description":"Blockchain chain ID"},"details":{"type":"object","properties":{"name":{"type":"string","description":"Community name"},"description":{"type":"string","description":"Community description"},"logoUrl":{"type":"string","description":"URL to community logo"},"slug":{"type":"string","description":"Community URL slug"}},"required":["name","description","slug"],"additionalProperties":false,"description":"Community details"},"stats":{"type":"object","properties":{"totalProjects":{"type":"number","description":"Total number of projects"},"totalGrants":{"type":"number","description":"Total number of grants"},"totalMembers":{"type":"number","description":"Total number of members"}},"required":["totalProjects","totalGrants","totalMembers"],"additionalProperties":false,"description":"Community statistics"},"categories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Category ID"},"name":{"type":"string","description":"Category name"}},"required":["id","name"],"additionalProperties":false},"description":"Community categories"},"createdAt":{"type":"string","format":"date-time","description":"Community creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Community last update timestamp"}},"required":["uid","chainID","details","categories","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"totalCount":{"type":"number","description":"Total number of items"},"page":{"type":"number","description":"Current page number"},"limit":{"type":"number","description":"Items per page"},"totalPages":{"type":"number","description":"Total number of pages"},"nextPage":{"type":"number","nullable":true,"description":"Next page number"},"prevPage":{"type":"number","nullable":true,"description":"Previous page number"},"hasNextPage":{"type":"boolean","description":"Whether there is a next page"},"hasPrevPage":{"type":"boolean","description":"Whether there is a previous page"}},"required":["totalCount","page","limit","totalPages","nextPage","prevPage","hasNextPage","hasPrevPage"],"additionalProperties":false}},"required":["payload","pagination"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"post":{"summary":"Create Community","description":"Create a new community via server-side EAS attestation. Requires authentication. Free tier: max 1 community per non-staff user.","tags":["Community"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":50},"description":{"type":"string","minLength":1,"maxLength":2000},"imageURL":{"type":"string","format":"uri","maxLength":500},"slug":{"type":"string","minLength":3,"maxLength":50,"pattern":"^[a-z0-9-]+$"},"chainID":{"type":"integer","minimum":1}},"required":["name","description","imageURL","slug","chainID"],"additionalProperties":false}}],"responses":{"200":{"description":"Default Response"}}}},"/v2/communities/stats":{"get":{"summary":"Get Global Community Stats","description":"Get global statistics across all communities including total grants, projects funded, and milestones completed","tags":["Community"],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"activeCommunities":{"type":"number","description":"Number of active communities"},"totalGrants":{"type":"number","description":"Total count of grants across all communities"},"totalProjects":{"type":"number","description":"Total number of projects"},"totalProjectUpdates":{"type":"number","description":"Total number of project updates including milestones and updates"},"activeBuilders":{"type":"number","description":"Number of unique members across all projects"}},"required":["activeCommunities","totalGrants","totalProjects","totalProjectUpdates","activeBuilders"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/communities/slug/check/{slug}":{"get":{"summary":"Check Community Slug Availability","description":"Check if a community slug is available for use. Returns 200 OK with availability status. If the slug is taken, includes information about the existing community.","tags":["Community"],"parameters":[{"type":"string","minLength":1,"pattern":"^[a-z0-9_-]+$","required":true,"in":"path","name":"slug"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"available":{"type":"boolean","description":"Whether the slug is available for use"},"existingCommunity":{"type":"object","properties":{"uid":{"type":"string","description":"Existing community UID"},"name":{"type":"string","description":"Existing community name"}},"required":["uid","name"],"additionalProperties":false,"description":"Information about existing community if slug is taken"}},"required":["available"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/communities/{uidOrSlug}":{"get":{"summary":"Get Community","description":"Get a community by its UID or slug identifier","tags":["Community"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"uidOrSlug"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"uid":{"type":"string","description":"Unique identifier for the community"},"chainID":{"type":"number","description":"Blockchain chain ID"},"details":{"type":"object","properties":{"name":{"type":"string","description":"Community name"},"description":{"type":"string","description":"Community description"},"logoUrl":{"type":"string","description":"URL to community logo"},"slug":{"type":"string","description":"Community URL slug"}},"required":["name","description","slug"],"additionalProperties":false},"createdAt":{"type":"string","description":"Community creation timestamp"},"updatedAt":{"type":"string","description":"Community last update timestamp"}},"required":["uid","chainID","details","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/communities/{slug}/stats":{"get":{"summary":"Get Community Stats","description":"Get community statistics by slug","tags":["Community"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"slug"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"totalProjects":{"type":"number","description":"Total number of projects in the community"},"totalGrants":{"type":"number","description":"Total number of grants in the community"},"totalMilestones":{"type":"number","description":"Total number of milestones in the community"},"projectUpdates":{"type":"number","description":"Project Updates: sum of project milestones, project milestone completions, project updates, grant milestones, grant milestone completions, and grant updates"},"projectUpdatesBreakdown":{"type":"object","properties":{"projectMilestones":{"type":"number","description":"Total number of project milestones"},"projectCompletedMilestones":{"type":"number","description":"Total number of completed project milestones"},"projectUpdates":{"type":"number","description":"Total number of project updates"},"grantMilestones":{"type":"number","description":"Total number of grant milestones"},"grantCompletedMilestones":{"type":"number","description":"Total number of completed grant milestones"},"grantUpdates":{"type":"number","description":"Total number of grant updates"}},"required":["projectMilestones","projectCompletedMilestones","projectUpdates","grantMilestones","grantCompletedMilestones","grantUpdates"],"additionalProperties":false,"description":"Detailed breakdown of project updates components"},"totalTransactions":{"type":"number","description":"Total number of transactions in the community"},"averageCompletion":{"type":"number","description":"Average completion percentage across projects"}},"required":["totalProjects","totalGrants","totalMilestones","projectUpdates","projectUpdatesBreakdown","totalTransactions","averageCompletion"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/communities/{slug}/impact":{"get":{"summary":"Get Community Impact","description":"Get impact data for a community with stats and categorized segments. Optionally filter stats by programId or projectId.","tags":["Community"],"parameters":[{"type":"string","description":"Filter stats by program ID","required":false,"in":"query","name":"programId"},{"type":"string","description":"Filter stats by project ID","required":false,"in":"query","name":"projectId"},{"type":"string","minLength":1,"required":true,"in":"path","name":"slug"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"stats":{"type":"object","properties":{"totalProjects":{"type":"number","description":"Total number of projects in the community"},"totalCategories":{"type":"number","description":"Total number of categories with impact data"},"totalFundingAllocated":{"type":"string","nullable":true,"description":"Total funding allocated (if available)"}},"required":["totalProjects","totalCategories","totalFundingAllocated"],"additionalProperties":false,"description":"Aggregated statistics"},"categories":{"type":"array","items":{"type":"object","properties":{"categoryName":{"type":"string","description":"Name of the category"},"impacts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the impact segment"},"id":{"type":"string","description":"UUID of the impact segment"},"description":{"type":"string","nullable":true,"description":"Description of the impact segment"},"type":{"type":"string","enum":["output","outcome"],"description":"Type of impact segment"},"indicatorIds":{"type":"array","items":{"type":"string"},"description":"Array of indicator UUIDs"}},"required":["name","id","description","type","indicatorIds"],"additionalProperties":false},"description":"Impact segments in this category"}},"required":["categoryName","impacts"],"additionalProperties":false},"description":"Impact data grouped by category"}},"required":["stats","categories"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/communities/{slug}/projects":{"get":{"summary":"Get Community Projects","description":"Get paginated projects by community slug","tags":["Community"],"parameters":[{"type":"number","minimum":1,"default":1,"required":false,"in":"query","name":"page"},{"type":"number","minimum":1,"default":12,"required":false,"in":"query","name":"limit"},{"type":"string","required":false,"in":"query","name":"sortBy"},{"type":"string","required":false,"in":"query","name":"categories"},{"type":"string","required":false,"in":"query","name":"programIds"},{"type":"string","required":false,"in":"query","name":"trackIds"},{"type":"string","required":true,"in":"path","name":"slug"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"payload":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Project unique identifier"},"details":{"type":"object","properties":{"title":{"type":"string","description":"Project title"},"description":{"type":"string","description":"Project description"},"logoUrl":{"type":"string","description":"Project logo URL"},"slug":{"type":"string","description":"Project slug"}},"required":["title","description","logoUrl","slug"],"additionalProperties":false},"grantNames":{"type":"array","items":{"type":"string"},"description":"List of grant names associated with the project"},"funding":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Grant name"},"completedAt":{"type":"string","nullable":true,"description":"Timestamp when the grant was completed"}},"required":["name","completedAt"],"additionalProperties":false},"description":"Funding history including grant name and completion timestamp"},"categories":{"type":"array","items":{"type":"string"},"description":"Project categories"},"regions":{"type":"array","items":{"type":"string"},"description":"Project regions"},"members":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"Member wallet address"},"role":{"type":"string","description":"Member role in the project"},"joinedAt":{"type":"string","description":"Date when member joined the project"}},"required":["address","role","joinedAt"],"additionalProperties":false}},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"Link URL"},"type":{"type":"string","description":"Link type (website, social, etc.)"}},"required":["url","type"],"additionalProperties":false}},"endorsements":{"type":"array","items":{"type":"object","properties":{"endorser":{"type":"string","description":"Endorser address"},"endorsement":{"type":"string","description":"Endorsement text"},"createdAt":{"type":"string","description":"Endorsement creation date"}},"required":["endorser","endorsement","createdAt"],"additionalProperties":false}},"contractAddresses":{"type":"array","items":{"type":"string"},"description":"Smart contract addresses"},"numMilestones":{"type":"number","description":"Number of milestones"},"numUpdates":{"type":"number","description":"Number of project updates"},"percentCompleted":{"type":"number","description":"Project completion percentage"},"numTransactions":{"type":"number","description":"Number of transactions"},"payoutBreakdown":{"type":"array","items":{"type":"object","properties":{"programId":{"type":"string","description":"Program identifier"},"value":{"type":"string","description":"Payout value"}},"required":["programId","value"],"additionalProperties":false}},"createdAt":{"type":"string","description":"Project creation date"},"demoVideoLastUpdatedAt":{"type":"string","nullable":true,"description":"Last demo video update date"},"chainPayoutAddress":{"type":"object","additionalProperties":{"type":"string"},"nullable":true,"description":"Chain-specific payout addresses keyed by chain ID"}},"required":["uid","details","grantNames","funding","categories","regions","members","links","endorsements","contractAddresses","numMilestones","numUpdates","percentCompleted","numTransactions","payoutBreakdown","createdAt","demoVideoLastUpdatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"totalCount":{"type":"number","description":"Total number of items"},"page":{"type":"number","description":"Current page number"},"limit":{"type":"number","description":"Items per page"},"totalPages":{"type":"number","description":"Total number of pages"},"nextPage":{"type":"number","nullable":true,"description":"Next page number"},"prevPage":{"type":"number","nullable":true,"description":"Previous page number"},"hasNextPage":{"type":"boolean","description":"Whether there is a next page"},"hasPrevPage":{"type":"boolean","description":"Whether there is a previous page"}},"required":["totalCount","page","limit","totalPages","nextPage","prevPage","hasNextPage","hasPrevPage"],"additionalProperties":false}},"required":["payload","pagination"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/communities/{uidOrSlug}/project-updates":{"get":{"summary":"Get Community Project Updates","description":"Get paginated project updates by community UID or slug","tags":["Community"],"parameters":[{"type":"string","enum":["pending","completed","in_progress","cancelled","past_due"],"required":false,"in":"query","name":"status"},{"type":"number","minimum":1,"maximum":100,"default":12,"required":false,"in":"query","name":"limit"},{"type":"number","minimum":1,"default":1,"required":false,"in":"query","name":"page"},{"type":"string","description":"Filter by program ID","required":false,"in":"query","name":"programId"},{"type":"string","description":"Filter by project UID or slug","required":false,"in":"query","name":"projectId"},{"type":"string","minLength":1,"required":true,"in":"path","name":"uidOrSlug"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"payload":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Milestone unique identifier"},"communityUID":{"type":"string","description":"Community unique identifier"},"status":{"type":"string","enum":["pending","completed"],"description":"Milestone status"},"details":{"type":"object","properties":{"title":{"type":"string","description":"Milestone title"},"description":{"type":"string","description":"Milestone description"},"dueDate":{"type":"string","description":"Milestone due date"},"completionDate":{"type":"string","description":"Milestone completion date"},"completionReason":{"type":"string","description":"Reason or comment for completion"},"completedBy":{"type":"string","description":"Address of the user who completed the milestone"}},"required":["title","description","dueDate"],"additionalProperties":false},"project":{"type":"object","properties":{"uid":{"type":"string","description":"Project unique identifier"},"details":{"type":"object","properties":{"data":{"type":"object","properties":{"title":{"type":"string","description":"Project title"},"slug":{"type":"string","description":"Project slug"}},"required":["title","slug"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}},"required":["uid","details"],"additionalProperties":false},"grant":{"type":"object","properties":{"uid":{"type":"string","description":"Grant unique identifier"},"programId":{"type":"string","nullable":true,"description":"Program ID"},"details":{"type":"object","properties":{"data":{"type":"object","properties":{"title":{"type":"string","description":"Grant title"}},"required":["title"],"additionalProperties":false},"currency":{"type":"string","nullable":true,"description":"Grant currency/token symbol"}},"required":["data","currency"],"additionalProperties":false}},"required":["uid","programId","details"],"additionalProperties":false,"description":"Associated grant (if any)"},"createdAt":{"type":"string","description":"Milestone creation date"},"updatedAt":{"type":"string","description":"Milestone last update date"}},"required":["uid","communityUID","status","details","project","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"totalCount":{"type":"number","description":"Total number of items"},"page":{"type":"number","description":"Current page number"},"limit":{"type":"number","description":"Items per page"},"totalPages":{"type":"number","description":"Total number of pages"},"nextPage":{"type":"number","nullable":true,"description":"Next page number"},"prevPage":{"type":"number","nullable":true,"description":"Previous page number"},"hasNextPage":{"type":"boolean","description":"Whether there is a next page"},"hasPrevPage":{"type":"boolean","description":"Whether there is a previous page"}},"required":["totalCount","page","limit","totalPages","nextPage","prevPage","hasNextPage","hasPrevPage"],"additionalProperties":false}},"required":["payload","pagination"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/communities/{slug}/grants":{"get":{"summary":"Get Community Grants","description":"Get all grants for a community with optional filtering, pagination, and export. Use download=true with format=csv|json to export.","tags":["Community"],"parameters":[{"type":"integer","minimum":0,"default":1,"required":false,"in":"query","name":"page"},{"type":"integer","minimum":1,"default":1000,"description":"Capped to 1000 items per request","required":false,"in":"query","name":"pageLimit"},{"type":"string","enum":["projectTitle","createdAt","updatedAt","status","totalMilestones"],"description":"Sort field","required":false,"in":"query","name":"sort"},{"type":"string","enum":["all","active","completed","pending"],"description":"Filter by grant status","required":false,"in":"query","name":"status"},{"type":"string","description":"Comma-separated category names","required":false,"in":"query","name":"categories"},{"type":"string","description":"Comma-separated program IDs (e.g., \"1013\" or \"1013_10\")","required":false,"in":"query","name":"selectedProgramIds"},{"type":"string","description":"Comma-separated track IDs","required":false,"in":"query","name":"selectedTrackIds"},{"type":"string","description":"Set to \"true\" to download as file","required":false,"in":"query","name":"download"},{"type":"string","enum":["csv","json"],"default":"csv","description":"Export format when download=true","required":false,"in":"query","name":"format"},{"type":"string","required":true,"in":"path","name":"slug"}],"responses":{"200":{"description":"Default Response","schema":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Grant unique identifier"},"programId":{"type":"string","description":"Program identifier"},"title":{"type":"string","description":"Grant title"},"description":{"type":"string","description":"Grant description"},"projectUID":{"type":"string","description":"Associated project unique identifier"},"projectTitle":{"type":"string","description":"Project title"},"projectSlug":{"type":"string","description":"Project slug for URL"},"categories":{"type":"array","items":{"type":"string"},"description":"Project categories for this community"}},"required":["uid","programId","title","description","projectUID","projectTitle","projectSlug","categories"],"additionalProperties":false}}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/communities/{communityId}/payouts/public":{"get":{"summary":"Get Community Payouts (Public)","description":"Get paginated payouts for a community with filtering and sorting. Public read-only endpoint. Sensitive treasury fields are stripped from disbursement history.","tags":["Community"],"parameters":[{"type":"integer","minimum":1,"default":1,"description":"Page number","required":false,"in":"query","name":"page"},{"type":"integer","minimum":1,"maximum":1000,"default":10,"description":"Items per page","required":false,"in":"query","name":"limit"},{"type":"string","pattern":"^[\\w-]+$","description":"Filter by program ID","required":false,"in":"query","name":"programId"},{"type":"string","enum":["NOT_STARTED","IN_PROGRESS","COMPLETED"],"description":"Filter by aggregated disbursement status","required":false,"in":"query","name":"status"},{"type":"string","enum":["signed","not_signed"],"description":"Filter by agreement status","required":false,"in":"query","name":"agreementStatus"},{"type":"string","enum":["all_received","needs_invoices","has_invoices"],"description":"Filter by invoice completion status","required":false,"in":"query","name":"invoiceStatus"},{"type":"string","maxLength":200,"description":"Search by project or grant name","required":false,"in":"query","name":"search"},{"type":"string","enum":["project_title","grant_title","payout_amount","disbursed_amount","status"],"description":"Field to sort by","required":false,"in":"query","name":"sortBy"},{"type":"string","enum":["asc","desc"],"default":"asc","description":"Sort order","required":false,"in":"query","name":"sortOrder"},{"type":"string","minLength":1,"description":"The community UID","required":true,"in":"path","name":"communityId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"payload":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"uid":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"},"chainID":{"type":"number"},"payoutAddress":{"type":"string","nullable":true},"chainPayoutAddress":{"type":"object","additionalProperties":{"type":"string"},"nullable":true},"adminPayoutAddress":{"type":"string","nullable":true}},"required":["uid","title","slug","chainID","payoutAddress","chainPayoutAddress","adminPayoutAddress"],"additionalProperties":false},"grant":{"type":"object","properties":{"uid":{"type":"string"},"title":{"type":"string"},"chainID":{"type":"number"},"payoutAmount":{"type":"string"},"currency":{"type":"string"},"payoutAddress":{"type":"string","nullable":true},"programId":{"type":"string","nullable":true},"adminPayoutAmount":{"type":"string","nullable":true},"invoiceRequired":{"type":"boolean"}},"required":["uid","title","chainID","payoutAmount","currency","payoutAddress","programId","adminPayoutAmount","invoiceRequired"],"additionalProperties":false},"disbursements":{"type":"object","properties":{"totalDisbursed":{"type":"string"},"totalsByToken":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"tokenDecimals":{"type":"number"},"tokenAddress":{"type":"string"},"chainID":{"type":"number"},"totalAmount":{"type":"string"}},"required":["token","tokenDecimals","tokenAddress","chainID","totalAmount"],"additionalProperties":false}},"status":{"type":"string","enum":["NOT_STARTED","IN_PROGRESS","COMPLETED"]},"history":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"disbursedAmount":{"type":"string"},"tokenDecimals":{"type":"number"},"token":{"type":"string"},"tokenAddress":{"type":"string"},"payoutAddress":{"type":"string"},"status":{"type":"string","enum":["CONFIGURED","PENDING","AWAITING_SIGNATURES","DISBURSED","CANCELLED","FAILED"]},"executedAt":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","disbursedAmount","tokenDecimals","token","tokenAddress","status","createdAt"],"additionalProperties":false}}},"required":["totalDisbursed","totalsByToken","status","history"],"additionalProperties":false},"agreement":{"type":"object","properties":{"signed":{"type":"boolean"},"signedAt":{"type":"string","nullable":true},"signedBy":{"type":"string","nullable":true}},"required":["signed","signedAt","signedBy"],"additionalProperties":false,"nullable":true},"milestoneInvoices":{"type":"array","items":{"type":"object","properties":{"milestoneLabel":{"type":"string"},"milestoneUID":{"type":"string","nullable":true},"milestoneStatus":{"type":"string","enum":["pending","approved","rejected","verified","completed"],"nullable":true},"milestoneDueDate":{"type":"string","nullable":true},"milestoneStatusUpdatedAt":{"type":"string","nullable":true},"invoiceStatus":{"type":"string","enum":["not_submitted","submitted","received","paid"]},"invoiceReceivedAt":{"type":"string","nullable":true},"invoiceFileKey":{"type":"string","nullable":true},"paymentStatus":{"type":"string","enum":["unpaid","pending","awaiting_signatures","disbursed"]},"paymentStatusDate":{"type":"string","nullable":true}},"required":["milestoneLabel","milestoneUID","milestoneStatus","milestoneDueDate","milestoneStatusUpdatedAt","invoiceStatus","invoiceReceivedAt","invoiceFileKey","paymentStatus","paymentStatusDate"],"additionalProperties":false}},"paidMilestoneCount":{"type":"number"}},"required":["project","grant","disbursements","agreement","milestoneInvoices","paidMilestoneCount"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"totalCount":{"type":"number","description":"Total number of items"},"page":{"type":"number","description":"Current page number"},"limit":{"type":"number","description":"Items per page"},"totalPages":{"type":"number","description":"Total number of pages"},"nextPage":{"type":"number","nullable":true,"description":"Next page number"},"prevPage":{"type":"number","nullable":true,"description":"Previous page number"},"hasNextPage":{"type":"boolean","description":"Whether there is a next page"},"hasPrevPage":{"type":"boolean","description":"Whether there is a previous page"}},"required":["totalCount","page","limit","totalPages","nextPage","prevPage","hasNextPage","hasPrevPage"],"additionalProperties":false}},"required":["payload","pagination"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/communities/{communityId}/payouts":{"get":{"summary":"Get Community Payouts","description":"Get paginated payouts for a community with filtering and sorting. Requires community admin or staff permissions.","tags":["Community"],"parameters":[{"type":"integer","minimum":1,"default":1,"description":"Page number","required":false,"in":"query","name":"page"},{"type":"integer","minimum":1,"maximum":1000,"default":10,"description":"Items per page","required":false,"in":"query","name":"limit"},{"type":"string","pattern":"^[\\w-]+$","description":"Filter by program ID","required":false,"in":"query","name":"programId"},{"type":"string","enum":["NOT_STARTED","IN_PROGRESS","COMPLETED"],"description":"Filter by aggregated disbursement status","required":false,"in":"query","name":"status"},{"type":"string","enum":["signed","not_signed"],"description":"Filter by agreement status","required":false,"in":"query","name":"agreementStatus"},{"type":"string","enum":["all_received","needs_invoices","has_invoices"],"description":"Filter by invoice completion status","required":false,"in":"query","name":"invoiceStatus"},{"type":"string","maxLength":200,"description":"Search by project or grant name","required":false,"in":"query","name":"search"},{"type":"string","enum":["project_title","grant_title","payout_amount","disbursed_amount","status"],"description":"Field to sort by","required":false,"in":"query","name":"sortBy"},{"type":"string","enum":["asc","desc"],"default":"asc","description":"Sort order","required":false,"in":"query","name":"sortOrder"},{"type":"string","minLength":1,"description":"The community UID","required":true,"in":"path","name":"communityId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"payload":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"uid":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"},"chainID":{"type":"number"},"payoutAddress":{"type":"string","nullable":true},"chainPayoutAddress":{"type":"object","additionalProperties":{"type":"string"},"nullable":true},"adminPayoutAddress":{"type":"string","nullable":true}},"required":["uid","title","slug","chainID","payoutAddress","chainPayoutAddress","adminPayoutAddress"],"additionalProperties":false},"grant":{"type":"object","properties":{"uid":{"type":"string"},"title":{"type":"string"},"chainID":{"type":"number"},"payoutAmount":{"type":"string"},"currency":{"type":"string"},"payoutAddress":{"type":"string","nullable":true},"programId":{"type":"string","nullable":true},"adminPayoutAmount":{"type":"string","nullable":true},"invoiceRequired":{"type":"boolean"}},"required":["uid","title","chainID","payoutAmount","currency","payoutAddress","programId","adminPayoutAmount","invoiceRequired"],"additionalProperties":false},"disbursements":{"type":"object","properties":{"totalDisbursed":{"type":"string"},"totalsByToken":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"tokenDecimals":{"type":"number"},"tokenAddress":{"type":"string"},"chainID":{"type":"number"},"totalAmount":{"type":"string"}},"required":["token","tokenDecimals","tokenAddress","chainID","totalAmount"],"additionalProperties":false}},"status":{"type":"string","enum":["NOT_STARTED","IN_PROGRESS","COMPLETED"]},"history":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"disbursedAmount":{"type":"string"},"tokenDecimals":{"type":"number"},"token":{"type":"string"},"tokenAddress":{"type":"string"},"payoutAddress":{"type":"string"},"status":{"type":"string","enum":["CONFIGURED","PENDING","AWAITING_SIGNATURES","DISBURSED","CANCELLED","FAILED"]},"safeAddress":{"type":"string"},"safeTransactionHash":{"type":"string","nullable":true},"safeTransactionNonce":{"type":"number","nullable":true},"executedAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"createdBy":{"type":"string"}},"required":["id","disbursedAmount","tokenDecimals","token","tokenAddress","status","safeAddress","createdAt","createdBy"],"additionalProperties":false}}},"required":["totalDisbursed","totalsByToken","status","history"],"additionalProperties":false},"agreement":{"type":"object","properties":{"signed":{"type":"boolean"},"signedAt":{"type":"string","nullable":true},"signedBy":{"type":"string","nullable":true}},"required":["signed","signedAt","signedBy"],"additionalProperties":false,"nullable":true},"milestoneInvoices":{"type":"array","items":{"type":"object","properties":{"milestoneLabel":{"type":"string"},"milestoneUID":{"type":"string","nullable":true},"milestoneStatus":{"type":"string","enum":["pending","approved","rejected","verified","completed"],"nullable":true},"milestoneDueDate":{"type":"string","nullable":true},"milestoneStatusUpdatedAt":{"type":"string","nullable":true},"invoiceStatus":{"type":"string","enum":["not_submitted","submitted","received","paid"]},"invoiceReceivedAt":{"type":"string","nullable":true},"invoiceFileKey":{"type":"string","nullable":true},"paymentStatus":{"type":"string","enum":["unpaid","pending","awaiting_signatures","disbursed"]},"paymentStatusDate":{"type":"string","nullable":true}},"required":["milestoneLabel","milestoneUID","milestoneStatus","milestoneDueDate","milestoneStatusUpdatedAt","invoiceStatus","invoiceReceivedAt","invoiceFileKey","paymentStatus","paymentStatusDate"],"additionalProperties":false}},"paidMilestoneCount":{"type":"number"}},"required":["project","grant","disbursements","agreement","milestoneInvoices","paidMilestoneCount"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"totalCount":{"type":"number","description":"Total number of items"},"page":{"type":"number","description":"Current page number"},"limit":{"type":"number","description":"Items per page"},"totalPages":{"type":"number","description":"Total number of pages"},"nextPage":{"type":"number","nullable":true,"description":"Next page number"},"prevPage":{"type":"number","nullable":true,"description":"Previous page number"},"hasNextPage":{"type":"boolean","description":"Whether there is a next page"},"hasPrevPage":{"type":"boolean","description":"Whether there is a previous page"}},"required":["totalCount","page","limit","totalPages","nextPage","prevPage","hasNextPage","hasPrevPage"],"additionalProperties":false}},"required":["payload","pagination"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/communities/{uidOrSlug}/community-metrics":{"get":{"summary":"Get Community Metrics","description":"Get community metrics for Filecoin community. Data is sourced from a remote Parquet file and cached with Stale-While-Revalidate pattern. Supports date range filtering.","tags":["Community"],"parameters":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Filter metrics from this date (inclusive, YYYY-MM-DD)","required":false,"in":"query","name":"startDate"},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Filter metrics until this date (inclusive, YYYY-MM-DD)","required":false,"in":"query","name":"endDate"},{"type":"string","minLength":1,"description":"The community UID (0x...) or slug identifier","required":true,"in":"path","name":"uidOrSlug"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"communityUID":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"sectorOnboardingRawPowerPibs":{"type":"number"},"clientsWithActiveDataGt1Tibs":{"type":"number"},"dealStorageCostFil":{"type":"string"},"totalValueFlow":{"type":"string"}},"required":["date","sectorOnboardingRawPowerPibs","clientsWithActiveDataGt1Tibs","dealStorageCostFil","totalValueFlow"],"additionalProperties":false}},"totalRecords":{"type":"number"},"dateRange":{"type":"object","properties":{"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true}},"required":["startDate","endDate"],"additionalProperties":false},"lastUpdatedAt":{"type":"string"}},"required":["communityUID","data","totalRecords","dateRange"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/community-configs/{slugOrUid}":{"get":{"summary":"Get Community Info with Config","description":"Get community information along with its configuration by slug or UID. Requires staff authentication.","tags":["Community Config"],"parameters":[{"type":"string","required":true,"in":"path","name":"slugOrUid"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"community":{"type":"object","properties":{"uid":{"type":"string","description":"Unique identifier"},"chainID":{"type":"number","description":"Blockchain chain ID"},"details":{"type":"object","properties":{"name":{"type":"string","description":"Community name"},"description":{"type":"string","description":"Community description"},"slug":{"type":"string","description":"Community slug identifier"}},"additionalProperties":false,"description":"Community details"},"createdAt":{"type":"string","description":"Creation timestamp"},"updatedAt":{"type":"string","description":"Last update timestamp"}},"required":["uid","chainID","details","createdAt","updatedAt"],"additionalProperties":false,"description":"Community information"},"config":{"type":"object","properties":{"communityUID":{"type":"string","description":"Community unique identifier"},"rank":{"type":"number","description":"Community ranking"},"public":{"type":"boolean","description":"Whether the community is public"},"createdAt":{"type":"string","description":"Config creation timestamp"},"updatedAt":{"type":"string","description":"Config last update timestamp"}},"required":["communityUID","rank","public","createdAt","updatedAt"],"additionalProperties":false,"nullable":true,"description":"Community configuration"}},"required":["community","config"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"put":{"summary":"Update Community Config","description":"Update community configuration settings including public visibility and rank by slug or UID. Requires staff authentication.","tags":["Community Config"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"public":{"type":"boolean"},"rank":{"type":"number"}},"additionalProperties":false}},{"type":"string","required":true,"in":"path","name":"slugOrUid"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"communityUID":{"type":"string","description":"Community unique identifier"},"rank":{"type":"number","description":"Updated community ranking"},"public":{"type":"boolean","description":"Updated public visibility status"},"createdAt":{"type":"string","description":"Config creation timestamp"},"updatedAt":{"type":"string","description":"Config last update timestamp"}},"required":["communityUID","rank","public","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/communities/{communityUID}/metrics":{"get":{"summary":"Get Community Metrics","description":"Get comprehensive metrics for a community including program and application statistics","tags":["Funding Programs"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"communityUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"communityUID":{"type":"string","description":"Community unique identifier"},"totalPrograms":{"type":"number","description":"Total number of programs in the community"},"enabledPrograms":{"type":"number","description":"Number of enabled programs"},"totalApplications":{"type":"number","description":"Total number of applications across all programs"},"approvedApplications":{"type":"number","description":"Number of approved applications"},"rejectedApplications":{"type":"number","description":"Number of rejected applications"},"pendingApplications":{"type":"number","description":"Number of pending applications"},"revisionRequestedApplications":{"type":"number","description":"Number of applications with revision requested"},"underReviewApplications":{"type":"number","description":"Number of applications under review"}},"required":["communityUID","totalPrograms","enabledPrograms","totalApplications","approvedApplications","rejectedApplications","pendingApplications","revisionRequestedApplications","underReviewApplications"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/{programId}":{"post":{"summary":"Create Funding Application (programId only)","description":"Create a new funding application for a specific program (offchain compatible)","tags":["Funding Applications"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"applicantEmail":{"type":"string","format":"email"},"applicationData":{"type":"object","additionalProperties":{}},"aiEvaluation":{},"accessCode":{"type":"string"}},"required":["applicantEmail","applicationData"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"}],"responses":{"201":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique application identifier"},"programId":{"type":"string","description":"ID of the funding program"},"chainID":{"type":"number","nullable":true,"description":"Blockchain chain ID (null for off-chain programs)"},"applicantEmail":{"type":"string","description":"Email address of the applicant"},"ownerAddress":{"type":"string","description":"Wallet address of the person who submitted the application"},"applicationData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"aiEvaluation":{"description":"AI evaluation data"},"internalAIEvaluation":{"type":"object","properties":{"evaluation":{"type":"string","description":"JSON string of evaluation result"},"promptId":{"type":"string","description":"Langfuse prompt ID used"},"evaluatedAt":{"type":"string","description":"When evaluation was performed"},"status":{"type":"string","enum":["pending","completed","failed"],"description":"Evaluation status"}},"required":["evaluation","promptId","evaluatedAt","status"],"additionalProperties":false,"description":"Internal AI evaluation (only visible to reviewers/admins, never shown to applicants)"},"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Current application status"},"statusHistory":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Application status"},"timestamp":{"type":"string","description":"Status update timestamp"},"reason":{"type":"string","description":"Reason for status change"}},"required":["status","timestamp"],"additionalProperties":false},"description":"History of status changes"},"submissionIP":{"type":"string","description":"IP address from which the application was submitted"},"referenceNumber":{"type":"string","description":"Unique reference number for the application"},"projectUID":{"type":"string","description":"Project UID when application is approved"},"postApprovalData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"postApprovalSubmittedAt":{"type":"string","description":"When post-approval form was first submitted"},"postApprovalUpdatedAt":{"type":"string","description":"Last update to post-approval responses"},"postApprovalCompleted":{"type":"boolean","description":"Tracking completion status of post-approval form"},"approvedAmount":{"type":"string","description":"Amount approved for this application"},"approvedCurrency":{"type":"string","description":"Currency of the approved amount (e.g., \"OP\", \"USD\")"},"appReviewers":{"type":"array","items":{"type":"string"},"description":"Array of program reviewer wallet addresses assigned to this application"},"milestoneReviewers":{"type":"array","items":{"type":"string"},"description":"Array of milestone reviewer wallet addresses assigned to this application"},"createdAt":{"type":"string","description":"Application creation date"},"updatedAt":{"type":"string","description":"Application last update date"},"programTitle":{"type":"string","description":"Title of the funding program"}},"required":["id","programId","chainID","applicantEmail","ownerAddress","applicationData","status","statusHistory","referenceNumber","postApprovalCompleted","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/{programId}/{chainId}":{"post":{"summary":"Create Funding Application","description":"Create a new funding application for a specific program","tags":["Funding Applications"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"applicantEmail":{"type":"string","format":"email"},"applicationData":{"type":"object","additionalProperties":{}},"aiEvaluation":{},"accessCode":{"type":"string"}},"required":["applicantEmail","applicationData"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"},{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}],"required":true,"in":"path","name":"chainId"}],"responses":{"201":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique application identifier"},"programId":{"type":"string","description":"ID of the funding program"},"chainID":{"type":"number","nullable":true,"description":"Blockchain chain ID (null for off-chain programs)"},"applicantEmail":{"type":"string","description":"Email address of the applicant"},"ownerAddress":{"type":"string","description":"Wallet address of the person who submitted the application"},"applicationData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"aiEvaluation":{"description":"AI evaluation data"},"internalAIEvaluation":{"type":"object","properties":{"evaluation":{"type":"string","description":"JSON string of evaluation result"},"promptId":{"type":"string","description":"Langfuse prompt ID used"},"evaluatedAt":{"type":"string","description":"When evaluation was performed"},"status":{"type":"string","enum":["pending","completed","failed"],"description":"Evaluation status"}},"required":["evaluation","promptId","evaluatedAt","status"],"additionalProperties":false,"description":"Internal AI evaluation (only visible to reviewers/admins, never shown to applicants)"},"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Current application status"},"statusHistory":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Application status"},"timestamp":{"type":"string","description":"Status update timestamp"},"reason":{"type":"string","description":"Reason for status change"}},"required":["status","timestamp"],"additionalProperties":false},"description":"History of status changes"},"submissionIP":{"type":"string","description":"IP address from which the application was submitted"},"referenceNumber":{"type":"string","description":"Unique reference number for the application"},"projectUID":{"type":"string","description":"Project UID when application is approved"},"postApprovalData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"postApprovalSubmittedAt":{"type":"string","description":"When post-approval form was first submitted"},"postApprovalUpdatedAt":{"type":"string","description":"Last update to post-approval responses"},"postApprovalCompleted":{"type":"boolean","description":"Tracking completion status of post-approval form"},"approvedAmount":{"type":"string","description":"Amount approved for this application"},"approvedCurrency":{"type":"string","description":"Currency of the approved amount (e.g., \"OP\", \"USD\")"},"appReviewers":{"type":"array","items":{"type":"string"},"description":"Array of program reviewer wallet addresses assigned to this application"},"milestoneReviewers":{"type":"array","items":{"type":"string"},"description":"Array of milestone reviewer wallet addresses assigned to this application"},"createdAt":{"type":"string","description":"Application creation date"},"updatedAt":{"type":"string","description":"Application last update date"},"programTitle":{"type":"string","description":"Title of the funding program"}},"required":["id","programId","chainID","applicantEmail","ownerAddress","applicationData","status","statusHistory","referenceNumber","postApprovalCompleted","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/{programId}/validate-access-code":{"post":{"summary":"Validate Access Code","description":"Validate an access code for a gated application form. Returns whether the code is valid.","tags":["Funding Applications"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"accessCode":{"type":"string","minLength":1}},"required":["accessCode"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"valid":{"type":"boolean"}},"required":["valid"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/program/{programId}":{"get":{"summary":"Get Applications by Program (programId only)","description":"Get funding applications by program with pagination and filtering options (programId only)","tags":["Funding Applications"],"parameters":[{"type":"string","pattern":"^\\d+$","default":"1","required":false,"in":"query","name":"page"},{"type":"string","pattern":"^\\d+$","default":"10","required":false,"in":"query","name":"limit"},{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"required":false,"in":"query","name":"status"},{"type":"string","required":false,"in":"query","name":"search"},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","required":false,"in":"query","name":"dateFrom"},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","required":false,"in":"query","name":"dateTo"},{"type":"string","enum":["createdAt","updatedAt","status","applicantEmail","referenceNumber","projectTitle","aiEvaluationScore","internalAIEvaluationScore"],"required":false,"in":"query","name":"sortBy"},{"type":"string","enum":["asc","desc"],"required":false,"in":"query","name":"sortOrder"},{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"applications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique application identifier"},"programId":{"type":"string","description":"ID of the funding program"},"chainID":{"type":"number","nullable":true,"description":"Blockchain chain ID (null for off-chain programs)"},"applicantEmail":{"type":"string","description":"Email address of the applicant"},"ownerAddress":{"type":"string","description":"Wallet address of the person who submitted the application"},"applicationData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"aiEvaluation":{"description":"AI evaluation data"},"internalAIEvaluation":{"type":"object","properties":{"evaluation":{"type":"string","description":"JSON string of evaluation result"},"promptId":{"type":"string","description":"Langfuse prompt ID used"},"evaluatedAt":{"type":"string","description":"When evaluation was performed"},"status":{"type":"string","enum":["pending","completed","failed"],"description":"Evaluation status"}},"required":["evaluation","promptId","evaluatedAt","status"],"additionalProperties":false,"description":"Internal AI evaluation (only visible to reviewers/admins, never shown to applicants)"},"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Current application status"},"statusHistory":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Application status"},"timestamp":{"type":"string","description":"Status update timestamp"},"reason":{"type":"string","description":"Reason for status change"}},"required":["status","timestamp"],"additionalProperties":false},"description":"History of status changes"},"submissionIP":{"type":"string","description":"IP address from which the application was submitted"},"referenceNumber":{"type":"string","description":"Unique reference number for the application"},"projectUID":{"type":"string","description":"Project UID when application is approved"},"postApprovalData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"postApprovalSubmittedAt":{"type":"string","description":"When post-approval form was first submitted"},"postApprovalUpdatedAt":{"type":"string","description":"Last update to post-approval responses"},"postApprovalCompleted":{"type":"boolean","description":"Tracking completion status of post-approval form"},"approvedAmount":{"type":"string","description":"Amount approved for this application"},"approvedCurrency":{"type":"string","description":"Currency of the approved amount (e.g., \"OP\", \"USD\")"},"appReviewers":{"type":"array","items":{"type":"string"},"description":"Array of program reviewer wallet addresses assigned to this application"},"milestoneReviewers":{"type":"array","items":{"type":"string"},"description":"Array of milestone reviewer wallet addresses assigned to this application"},"createdAt":{"type":"string","description":"Application creation date"},"updatedAt":{"type":"string","description":"Application last update date"},"programTitle":{"type":"string","description":"Title of the funding program"}},"additionalProperties":false},"description":"List of funding applications"},"message":{"type":"string","description":"Optional message"},"pagination":{"type":"object","properties":{"page":{"type":"number","description":"Current page number"},"limit":{"type":"number","description":"Items per page"},"total":{"type":"number","description":"Total number of items"},"totalPages":{"type":"number","description":"Total number of pages"}},"required":["page","limit","total","totalPages"],"additionalProperties":false,"description":"Pagination information"}},"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/program/{programId}/{chainId}":{"get":{"summary":"Get Applications by Program","description":"Get funding applications by program with pagination and filtering options","tags":["Funding Applications"],"parameters":[{"type":"string","pattern":"^\\d+$","default":"1","required":false,"in":"query","name":"page"},{"type":"string","pattern":"^\\d+$","default":"10","required":false,"in":"query","name":"limit"},{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"required":false,"in":"query","name":"status"},{"type":"string","required":false,"in":"query","name":"search"},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","required":false,"in":"query","name":"dateFrom"},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","required":false,"in":"query","name":"dateTo"},{"type":"string","enum":["createdAt","updatedAt","status","applicantEmail","referenceNumber","projectTitle","aiEvaluationScore","internalAIEvaluationScore"],"required":false,"in":"query","name":"sortBy"},{"type":"string","enum":["asc","desc"],"required":false,"in":"query","name":"sortOrder"},{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"},{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}],"required":true,"in":"path","name":"chainId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"applications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique application identifier"},"programId":{"type":"string","description":"ID of the funding program"},"chainID":{"type":"number","nullable":true,"description":"Blockchain chain ID (null for off-chain programs)"},"applicantEmail":{"type":"string","description":"Email address of the applicant"},"ownerAddress":{"type":"string","description":"Wallet address of the person who submitted the application"},"applicationData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"aiEvaluation":{"description":"AI evaluation data"},"internalAIEvaluation":{"type":"object","properties":{"evaluation":{"type":"string","description":"JSON string of evaluation result"},"promptId":{"type":"string","description":"Langfuse prompt ID used"},"evaluatedAt":{"type":"string","description":"When evaluation was performed"},"status":{"type":"string","enum":["pending","completed","failed"],"description":"Evaluation status"}},"required":["evaluation","promptId","evaluatedAt","status"],"additionalProperties":false,"description":"Internal AI evaluation (only visible to reviewers/admins, never shown to applicants)"},"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Current application status"},"statusHistory":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Application status"},"timestamp":{"type":"string","description":"Status update timestamp"},"reason":{"type":"string","description":"Reason for status change"}},"required":["status","timestamp"],"additionalProperties":false},"description":"History of status changes"},"submissionIP":{"type":"string","description":"IP address from which the application was submitted"},"referenceNumber":{"type":"string","description":"Unique reference number for the application"},"projectUID":{"type":"string","description":"Project UID when application is approved"},"postApprovalData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"postApprovalSubmittedAt":{"type":"string","description":"When post-approval form was first submitted"},"postApprovalUpdatedAt":{"type":"string","description":"Last update to post-approval responses"},"postApprovalCompleted":{"type":"boolean","description":"Tracking completion status of post-approval form"},"approvedAmount":{"type":"string","description":"Amount approved for this application"},"approvedCurrency":{"type":"string","description":"Currency of the approved amount (e.g., \"OP\", \"USD\")"},"appReviewers":{"type":"array","items":{"type":"string"},"description":"Array of program reviewer wallet addresses assigned to this application"},"milestoneReviewers":{"type":"array","items":{"type":"string"},"description":"Array of milestone reviewer wallet addresses assigned to this application"},"createdAt":{"type":"string","description":"Application creation date"},"updatedAt":{"type":"string","description":"Application last update date"},"programTitle":{"type":"string","description":"Title of the funding program"}},"additionalProperties":false},"description":"List of funding applications"},"message":{"type":"string","description":"Optional message"},"pagination":{"type":"object","properties":{"page":{"type":"number","description":"Current page number"},"limit":{"type":"number","description":"Items per page"},"total":{"type":"number","description":"Total number of items"},"totalPages":{"type":"number","description":"Total number of pages"}},"required":["page","limit","total","totalPages"],"additionalProperties":false,"description":"Pagination information"}},"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/public/program/{programId}/{chainId}":{"get":{"summary":"Get Public Applications by Program","description":"Get public funding applications by program with pagination and filtering options","tags":["Funding Applications"],"parameters":[{"type":"string","pattern":"^\\d+$","default":"1","required":false,"in":"query","name":"page"},{"type":"string","pattern":"^\\d+$","default":"10","required":false,"in":"query","name":"limit"},{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"required":false,"in":"query","name":"status"},{"type":"string","required":false,"in":"query","name":"search"},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","required":false,"in":"query","name":"dateFrom"},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","required":false,"in":"query","name":"dateTo"},{"type":"string","enum":["createdAt","updatedAt","status","applicantEmail","referenceNumber","projectTitle","aiEvaluationScore","internalAIEvaluationScore"],"required":false,"in":"query","name":"sortBy"},{"type":"string","enum":["asc","desc"],"required":false,"in":"query","name":"sortOrder"},{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"},{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}],"required":true,"in":"path","name":"chainId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"payload":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique application identifier"},"programId":{"type":"string","description":"ID of the funding program"},"chainID":{"type":"number","nullable":true,"description":"Blockchain chain ID (null for off-chain programs)"},"applicantEmail":{"type":"string","description":"Email address of the applicant"},"ownerAddress":{"type":"string","description":"Wallet address of the person who submitted the application"},"applicationData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"aiEvaluation":{"description":"AI evaluation data"},"internalAIEvaluation":{"type":"object","properties":{"evaluation":{"type":"string","description":"JSON string of evaluation result"},"promptId":{"type":"string","description":"Langfuse prompt ID used"},"evaluatedAt":{"type":"string","description":"When evaluation was performed"},"status":{"type":"string","enum":["pending","completed","failed"],"description":"Evaluation status"}},"required":["evaluation","promptId","evaluatedAt","status"],"additionalProperties":false,"description":"Internal AI evaluation (only visible to reviewers/admins, never shown to applicants)"},"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Current application status"},"statusHistory":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Application status"},"timestamp":{"type":"string","description":"Status update timestamp"},"reason":{"type":"string","description":"Reason for status change"}},"required":["status","timestamp"],"additionalProperties":false},"description":"History of status changes"},"submissionIP":{"type":"string","description":"IP address from which the application was submitted"},"referenceNumber":{"type":"string","description":"Unique reference number for the application"},"projectUID":{"type":"string","description":"Project UID when application is approved"},"postApprovalData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"postApprovalSubmittedAt":{"type":"string","description":"When post-approval form was first submitted"},"postApprovalUpdatedAt":{"type":"string","description":"Last update to post-approval responses"},"postApprovalCompleted":{"type":"boolean","description":"Tracking completion status of post-approval form"},"approvedAmount":{"type":"string","description":"Amount approved for this application"},"approvedCurrency":{"type":"string","description":"Currency of the approved amount (e.g., \"OP\", \"USD\")"},"appReviewers":{"type":"array","items":{"type":"string"},"description":"Array of program reviewer wallet addresses assigned to this application"},"milestoneReviewers":{"type":"array","items":{"type":"string"},"description":"Array of milestone reviewer wallet addresses assigned to this application"},"createdAt":{"type":"string","description":"Application creation date"},"updatedAt":{"type":"string","description":"Application last update date"},"programTitle":{"type":"string","description":"Title of the funding program"}},"required":["id","programId","chainID","applicantEmail","ownerAddress","applicationData","status","statusHistory","referenceNumber","postApprovalCompleted","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"totalCount":{"type":"number","description":"Total number of items"},"page":{"type":"number","description":"Current page number"},"limit":{"type":"number","description":"Items per page"},"totalPages":{"type":"number","description":"Total number of pages"},"nextPage":{"type":"number","nullable":true,"description":"Next page number"},"prevPage":{"type":"number","nullable":true,"description":"Previous page number"},"hasNextPage":{"type":"boolean","description":"Whether there is a next page"},"hasPrevPage":{"type":"boolean","description":"Whether there is a previous page"}},"required":["totalCount","page","limit","totalPages","nextPage","prevPage","hasNextPage","hasPrevPage"],"additionalProperties":false}},"required":["payload","pagination"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/lookup-credential/{referenceNumber}":{"get":{"summary":"Lookup Application Credential (Masked)","description":"Lookup which credential (masked email or wallet) was used to create an application. Returns ONLY masked credentials for security. Requires authentication.","tags":["Funding Applications"],"parameters":[{"type":"string","description":"The application reference number (e.g., APP-XXXXXXXX-XXXXXX)","required":true,"in":"path","name":"referenceNumber"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"maskedEmail":{"type":"string","description":"The masked email address if available"},"maskedWallet":{"type":"string","description":"The masked wallet address if available"},"referenceNumber":{"type":"string","description":"The application reference number"},"communityName":{"type":"string","description":"Name of the community/tenant this application belongs to"},"communitySlug":{"type":"string","description":"Slug of the community/tenant this application belongs to"}},"required":["referenceNumber"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/{referenceNumber}/access":{"get":{"summary":"Check Application Access","description":"Check user access level and permissions for a specific funding application. Returns role and boolean permission flags.","tags":["Funding Applications"],"parameters":[{"type":"string","description":"The application reference number (e.g., APP-XXXXXXXX-XXXXXX)","required":true,"in":"path","name":"referenceNumber"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"referenceNumber":{"type":"string","description":"The application reference number"},"accessRole":{"type":"string","enum":["SUPER_ADMIN","COMMUNITY_ADMIN","PROGRAM_REVIEWER","MILESTONE_REVIEWER","APPLICANT","GUEST","NONE"],"description":"The user access role for this application"},"canView":{"type":"boolean","description":"Whether the user can view the application"},"canEdit":{"type":"boolean","description":"Whether the user can edit the application"},"canReview":{"type":"boolean","description":"Whether the user can review the application"},"canAdminister":{"type":"boolean","description":"Whether the user can administer the application"},"isOwner":{"type":"boolean","description":"Whether the user is the application owner"}},"required":["referenceNumber","accessRole","canView","canEdit","canReview","canAdminister","isOwner"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/{referenceNumber}":{"get":{"summary":"Get Application by Reference","description":"Get a specific funding application by its reference number","tags":["Funding Applications"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"referenceNumber"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique application identifier"},"programId":{"type":"string","description":"ID of the funding program"},"chainID":{"type":"number","nullable":true,"description":"Blockchain chain ID (null for off-chain programs)"},"applicantEmail":{"type":"string","description":"Email address of the applicant"},"ownerAddress":{"type":"string","description":"Wallet address of the person who submitted the application"},"applicationData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"aiEvaluation":{"description":"AI evaluation data"},"internalAIEvaluation":{"type":"object","properties":{"evaluation":{"type":"string","description":"JSON string of evaluation result"},"promptId":{"type":"string","description":"Langfuse prompt ID used"},"evaluatedAt":{"type":"string","description":"When evaluation was performed"},"status":{"type":"string","enum":["pending","completed","failed"],"description":"Evaluation status"}},"required":["evaluation","promptId","evaluatedAt","status"],"additionalProperties":false,"description":"Internal AI evaluation (only visible to reviewers/admins, never shown to applicants)"},"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Current application status"},"statusHistory":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Application status"},"timestamp":{"type":"string","description":"Status update timestamp"},"reason":{"type":"string","description":"Reason for status change"}},"required":["status","timestamp"],"additionalProperties":false},"description":"History of status changes"},"submissionIP":{"type":"string","description":"IP address from which the application was submitted"},"referenceNumber":{"type":"string","description":"Unique reference number for the application"},"projectUID":{"type":"string","description":"Project UID when application is approved"},"postApprovalData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"postApprovalSubmittedAt":{"type":"string","description":"When post-approval form was first submitted"},"postApprovalUpdatedAt":{"type":"string","description":"Last update to post-approval responses"},"postApprovalCompleted":{"type":"boolean","description":"Tracking completion status of post-approval form"},"approvedAmount":{"type":"string","description":"Amount approved for this application"},"approvedCurrency":{"type":"string","description":"Currency of the approved amount (e.g., \"OP\", \"USD\")"},"appReviewers":{"type":"array","items":{"type":"string"},"description":"Array of program reviewer wallet addresses assigned to this application"},"milestoneReviewers":{"type":"array","items":{"type":"string"},"description":"Array of milestone reviewer wallet addresses assigned to this application"},"createdAt":{"type":"string","description":"Application creation date"},"updatedAt":{"type":"string","description":"Application last update date"},"programTitle":{"type":"string","description":"Title of the funding program"}},"required":["id","programId","chainID","applicantEmail","ownerAddress","applicationData","status","statusHistory","referenceNumber","postApprovalCompleted","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"put":{"summary":"Update Funding Application","description":"Update a funding application. Application owners can update their own applications. Community admins and staff can also update applications and can bypass status restrictions.","tags":["Funding Applications"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"applicationData":{"type":"object","additionalProperties":{}},"aiEvaluation":{}},"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"referenceNumber"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique application identifier"},"programId":{"type":"string","description":"ID of the funding program"},"chainID":{"type":"number","nullable":true,"description":"Blockchain chain ID (null for off-chain programs)"},"applicantEmail":{"type":"string","description":"Email address of the applicant"},"ownerAddress":{"type":"string","description":"Wallet address of the person who submitted the application"},"applicationData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"aiEvaluation":{"description":"AI evaluation data"},"internalAIEvaluation":{"type":"object","properties":{"evaluation":{"type":"string","description":"JSON string of evaluation result"},"promptId":{"type":"string","description":"Langfuse prompt ID used"},"evaluatedAt":{"type":"string","description":"When evaluation was performed"},"status":{"type":"string","enum":["pending","completed","failed"],"description":"Evaluation status"}},"required":["evaluation","promptId","evaluatedAt","status"],"additionalProperties":false,"description":"Internal AI evaluation (only visible to reviewers/admins, never shown to applicants)"},"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Current application status"},"statusHistory":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Application status"},"timestamp":{"type":"string","description":"Status update timestamp"},"reason":{"type":"string","description":"Reason for status change"}},"required":["status","timestamp"],"additionalProperties":false},"description":"History of status changes"},"submissionIP":{"type":"string","description":"IP address from which the application was submitted"},"referenceNumber":{"type":"string","description":"Unique reference number for the application"},"projectUID":{"type":"string","description":"Project UID when application is approved"},"postApprovalData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"postApprovalSubmittedAt":{"type":"string","description":"When post-approval form was first submitted"},"postApprovalUpdatedAt":{"type":"string","description":"Last update to post-approval responses"},"postApprovalCompleted":{"type":"boolean","description":"Tracking completion status of post-approval form"},"approvedAmount":{"type":"string","description":"Amount approved for this application"},"approvedCurrency":{"type":"string","description":"Currency of the approved amount (e.g., \"OP\", \"USD\")"},"appReviewers":{"type":"array","items":{"type":"string"},"description":"Array of program reviewer wallet addresses assigned to this application"},"milestoneReviewers":{"type":"array","items":{"type":"string"},"description":"Array of milestone reviewer wallet addresses assigned to this application"},"createdAt":{"type":"string","description":"Application creation date"},"updatedAt":{"type":"string","description":"Application last update date"},"programTitle":{"type":"string","description":"Title of the funding program"}},"required":["id","programId","chainID","applicantEmail","ownerAddress","applicationData","status","statusHistory","referenceNumber","postApprovalCompleted","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"delete":{"summary":"Delete Application (Admin Only)","description":"Permanently delete a funding application. Requires APPLICATION_CHANGE_STATUS permission.","tags":["Funding Applications"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"referenceNumber"}],"responses":{"204":{"description":"Application deleted successfully"},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/project/{projectUID}":{"get":{"summary":"Get Application by Project UID","description":"Get a funding application by project UID with optional authentication for access control","tags":["Funding Applications"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"projectUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique application identifier"},"programId":{"type":"string","description":"ID of the funding program"},"chainID":{"type":"number","nullable":true,"description":"Blockchain chain ID (null for off-chain programs)"},"applicantEmail":{"type":"string","description":"Email address of the applicant"},"ownerAddress":{"type":"string","description":"Wallet address of the person who submitted the application"},"applicationData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"aiEvaluation":{"description":"AI evaluation data"},"internalAIEvaluation":{"type":"object","properties":{"evaluation":{"type":"string","description":"JSON string of evaluation result"},"promptId":{"type":"string","description":"Langfuse prompt ID used"},"evaluatedAt":{"type":"string","description":"When evaluation was performed"},"status":{"type":"string","enum":["pending","completed","failed"],"description":"Evaluation status"}},"required":["evaluation","promptId","evaluatedAt","status"],"additionalProperties":false,"description":"Internal AI evaluation (only visible to reviewers/admins, never shown to applicants)"},"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Current application status"},"statusHistory":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Application status"},"timestamp":{"type":"string","description":"Status update timestamp"},"reason":{"type":"string","description":"Reason for status change"}},"required":["status","timestamp"],"additionalProperties":false},"description":"History of status changes"},"submissionIP":{"type":"string","description":"IP address from which the application was submitted"},"referenceNumber":{"type":"string","description":"Unique reference number for the application"},"projectUID":{"type":"string","description":"Project UID when application is approved"},"postApprovalData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"postApprovalSubmittedAt":{"type":"string","description":"When post-approval form was first submitted"},"postApprovalUpdatedAt":{"type":"string","description":"Last update to post-approval responses"},"postApprovalCompleted":{"type":"boolean","description":"Tracking completion status of post-approval form"},"approvedAmount":{"type":"string","description":"Amount approved for this application"},"approvedCurrency":{"type":"string","description":"Currency of the approved amount (e.g., \"OP\", \"USD\")"},"appReviewers":{"type":"array","items":{"type":"string"},"description":"Array of program reviewer wallet addresses assigned to this application"},"milestoneReviewers":{"type":"array","items":{"type":"string"},"description":"Array of milestone reviewer wallet addresses assigned to this application"},"createdAt":{"type":"string","description":"Application creation date"},"updatedAt":{"type":"string","description":"Application last update date"},"programTitle":{"type":"string","description":"Title of the funding program"}},"required":["id","programId","chainID","applicantEmail","ownerAddress","applicationData","status","statusHistory","referenceNumber","postApprovalCompleted","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/{referenceNumber}/status":{"put":{"summary":"Update Application Status","description":"Update the status of a funding application. Requires APPLICATION_CHANGE_STATUS permission","tags":["Funding Applications"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"]},"reason":{"type":"string"},"approvedAmount":{"type":"string"},"approvedCurrency":{"type":"string"}},"required":["status"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"referenceNumber"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique application identifier"},"programId":{"type":"string","description":"ID of the funding program"},"chainID":{"type":"number","nullable":true,"description":"Blockchain chain ID (null for off-chain programs)"},"applicantEmail":{"type":"string","description":"Email address of the applicant"},"ownerAddress":{"type":"string","description":"Wallet address of the person who submitted the application"},"applicationData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"aiEvaluation":{"description":"AI evaluation data"},"internalAIEvaluation":{"type":"object","properties":{"evaluation":{"type":"string","description":"JSON string of evaluation result"},"promptId":{"type":"string","description":"Langfuse prompt ID used"},"evaluatedAt":{"type":"string","description":"When evaluation was performed"},"status":{"type":"string","enum":["pending","completed","failed"],"description":"Evaluation status"}},"required":["evaluation","promptId","evaluatedAt","status"],"additionalProperties":false,"description":"Internal AI evaluation (only visible to reviewers/admins, never shown to applicants)"},"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Current application status"},"statusHistory":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Application status"},"timestamp":{"type":"string","description":"Status update timestamp"},"reason":{"type":"string","description":"Reason for status change"}},"required":["status","timestamp"],"additionalProperties":false},"description":"History of status changes"},"submissionIP":{"type":"string","description":"IP address from which the application was submitted"},"referenceNumber":{"type":"string","description":"Unique reference number for the application"},"projectUID":{"type":"string","description":"Project UID when application is approved"},"postApprovalData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"postApprovalSubmittedAt":{"type":"string","description":"When post-approval form was first submitted"},"postApprovalUpdatedAt":{"type":"string","description":"Last update to post-approval responses"},"postApprovalCompleted":{"type":"boolean","description":"Tracking completion status of post-approval form"},"approvedAmount":{"type":"string","description":"Amount approved for this application"},"approvedCurrency":{"type":"string","description":"Currency of the approved amount (e.g., \"OP\", \"USD\")"},"appReviewers":{"type":"array","items":{"type":"string"},"description":"Array of program reviewer wallet addresses assigned to this application"},"milestoneReviewers":{"type":"array","items":{"type":"string"},"description":"Array of milestone reviewer wallet addresses assigned to this application"},"createdAt":{"type":"string","description":"Application creation date"},"updatedAt":{"type":"string","description":"Application last update date"},"programTitle":{"type":"string","description":"Title of the funding program"}},"required":["id","programId","chainID","applicantEmail","ownerAddress","applicationData","status","statusHistory","referenceNumber","postApprovalCompleted","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/program/{programId}/{chainId}/by-email":{"get":{"summary":"Get Application by Email","description":"Get a funding application by email and program","tags":["Funding Applications"],"parameters":[{"type":"string","format":"email","required":true,"in":"query","name":"email"},{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"},{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}],"required":true,"in":"path","name":"chainId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique application identifier"},"programId":{"type":"string","description":"ID of the funding program"},"chainID":{"type":"number","nullable":true,"description":"Blockchain chain ID (null for off-chain programs)"},"applicantEmail":{"type":"string","description":"Email address of the applicant"},"ownerAddress":{"type":"string","description":"Wallet address of the person who submitted the application"},"applicationData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"aiEvaluation":{"description":"AI evaluation data"},"internalAIEvaluation":{"type":"object","properties":{"evaluation":{"type":"string","description":"JSON string of evaluation result"},"promptId":{"type":"string","description":"Langfuse prompt ID used"},"evaluatedAt":{"type":"string","description":"When evaluation was performed"},"status":{"type":"string","enum":["pending","completed","failed"],"description":"Evaluation status"}},"required":["evaluation","promptId","evaluatedAt","status"],"additionalProperties":false,"description":"Internal AI evaluation (only visible to reviewers/admins, never shown to applicants)"},"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Current application status"},"statusHistory":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Application status"},"timestamp":{"type":"string","description":"Status update timestamp"},"reason":{"type":"string","description":"Reason for status change"}},"required":["status","timestamp"],"additionalProperties":false},"description":"History of status changes"},"submissionIP":{"type":"string","description":"IP address from which the application was submitted"},"referenceNumber":{"type":"string","description":"Unique reference number for the application"},"projectUID":{"type":"string","description":"Project UID when application is approved"},"postApprovalData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"postApprovalSubmittedAt":{"type":"string","description":"When post-approval form was first submitted"},"postApprovalUpdatedAt":{"type":"string","description":"Last update to post-approval responses"},"postApprovalCompleted":{"type":"boolean","description":"Tracking completion status of post-approval form"},"approvedAmount":{"type":"string","description":"Amount approved for this application"},"approvedCurrency":{"type":"string","description":"Currency of the approved amount (e.g., \"OP\", \"USD\")"},"appReviewers":{"type":"array","items":{"type":"string"},"description":"Array of program reviewer wallet addresses assigned to this application"},"milestoneReviewers":{"type":"array","items":{"type":"string"},"description":"Array of milestone reviewer wallet addresses assigned to this application"},"createdAt":{"type":"string","description":"Application creation date"},"updatedAt":{"type":"string","description":"Application last update date"},"programTitle":{"type":"string","description":"Title of the funding program"}},"required":["id","programId","chainID","applicantEmail","ownerAddress","applicationData","status","statusHistory","referenceNumber","postApprovalCompleted","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/program/{programId}/statistics":{"get":{"summary":"Get Application Statistics (programId only)","description":"Get application statistics for a specific program including counts by status (programId only)","tags":["Funding Applications"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"totalApplications":{"type":"number","description":"Total number of applications"},"pendingApplications":{"type":"number","description":"Number of pending applications"},"approvedApplications":{"type":"number","description":"Number of approved applications"},"rejectedApplications":{"type":"number","description":"Number of rejected applications"},"revisionRequestedApplications":{"type":"number","description":"Number of applications with revision requested"},"underReviewApplications":{"type":"number","description":"Number of applications under review"}},"required":["totalApplications","pendingApplications","approvedApplications","rejectedApplications","revisionRequestedApplications","underReviewApplications"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/program/{programId}/{chainId}/statistics":{"get":{"summary":"Get Application Statistics","description":"Get application statistics for a specific program including counts by status","tags":["Funding Applications"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"},{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}],"required":true,"in":"path","name":"chainId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"totalApplications":{"type":"number","description":"Total number of applications"},"pendingApplications":{"type":"number","description":"Number of pending applications"},"approvedApplications":{"type":"number","description":"Number of approved applications"},"rejectedApplications":{"type":"number","description":"Number of rejected applications"},"revisionRequestedApplications":{"type":"number","description":"Number of applications with revision requested"},"underReviewApplications":{"type":"number","description":"Number of applications under review"}},"required":["totalApplications","pendingApplications","approvedApplications","rejectedApplications","revisionRequestedApplications","underReviewApplications"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/{programId}/evaluate-realtime":{"post":{"summary":"AI Evaluate Application (programId only)","description":"Perform real-time AI evaluation of application data using configured AI models (offchain compatible)","tags":["Funding Applications"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"applicationData":{"type":"object","additionalProperties":{}}},"required":["applicationData"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the evaluation was successful"},"data":{"description":"AI evaluation result data"},"promptId":{"type":"string","description":"ID of the prompt used for evaluation"}},"required":["success","promptId"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/{programId}/{chainId}/evaluate-realtime":{"post":{"summary":"AI Evaluate Application","description":"Perform real-time AI evaluation of application data using configured AI models","tags":["Funding Applications"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"applicationData":{"type":"object","additionalProperties":{}}},"required":["applicationData"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"},{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}],"required":true,"in":"path","name":"chainId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the evaluation was successful"},"data":{"description":"AI evaluation result data"},"promptId":{"type":"string","description":"ID of the prompt used for evaluation"}},"required":["success","promptId"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/{referenceNumber}/evaluate":{"post":{"summary":"Evaluate Application by Reference Number","description":"Run AI evaluation on an existing funding application and update the aiEvaluation field. Requires APPLICATION_REVIEW permission.","tags":["Funding Applications"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"referenceNumber"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"success":{"type":"boolean"},"referenceNumber":{"type":"string"},"evaluation":{"type":"string"},"promptId":{"type":"string"},"updatedAt":{"type":"string"}},"required":["success","referenceNumber","evaluation","promptId","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/{referenceNumber}/evaluate-internal":{"post":{"summary":"Trigger Internal AI Evaluation","description":"Manually trigger internal AI evaluation on an existing funding application. Requires APPLICATION_REVIEW permission.","tags":["Funding Applications"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"referenceNumber"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"success":{"type":"boolean"},"referenceNumber":{"type":"string"},"evaluation":{"type":"string","description":"JSON string of evaluation result"},"promptId":{"type":"string","description":"Langfuse prompt ID used"},"updatedAt":{"type":"string","description":"Timestamp when evaluation was completed"}},"required":["success","referenceNumber","evaluation","promptId","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/program/{programId}/{chainId}/export":{"get":{"summary":"Export Public Applications CSV","description":"Export public applications data as CSV file with optional filtering by status and date range","tags":["Funding Applications"],"parameters":[{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"required":false,"in":"query","name":"status"},{"type":"string","required":false,"in":"query","name":"dateFrom"},{"type":"string","required":false,"in":"query","name":"dateTo"},{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"},{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}],"required":true,"in":"path","name":"chainId"}],"responses":{"200":{"description":"CSV file content with application data","schema":{"type":"string","description":"CSV file content with application data"}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/admin/{programId}/export":{"get":{"summary":"Export Admin Applications CSV (programId only)","description":"Export complete applications data as CSV file with all fields. Requires APPLICATION_VIEW_ALL permission.","tags":["Funding Applications"],"parameters":[{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"required":false,"in":"query","name":"status"},{"type":"string","required":false,"in":"query","name":"search"},{"type":"string","required":false,"in":"query","name":"dateFrom"},{"type":"string","required":false,"in":"query","name":"dateTo"},{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"}],"responses":{"200":{"description":"CSV file content with complete application data including private fields","schema":{"type":"string","description":"CSV file content with complete application data including private fields"}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/admin/{programId}/{chainId}/export":{"get":{"summary":"Export Admin Applications CSV","description":"Export complete applications data as CSV file with all fields. Requires APPLICATION_VIEW_ALL permission.","tags":["Funding Applications"],"parameters":[{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"required":false,"in":"query","name":"status"},{"type":"string","required":false,"in":"query","name":"search"},{"type":"string","required":false,"in":"query","name":"dateFrom"},{"type":"string","required":false,"in":"query","name":"dateTo"},{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"},{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}],"required":true,"in":"path","name":"chainId"}],"responses":{"200":{"description":"CSV file content with complete application data including private fields","schema":{"type":"string","description":"CSV file content with complete application data including private fields"}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/user/my-applications":{"get":{"summary":"Get My Applications","description":"Get applications submitted by the authenticated user with pagination and filtering options","tags":["Funding Applications"],"parameters":[{"type":"string","required":false,"in":"query","name":"communitySlug"},{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}],"default":1,"required":false,"in":"query","name":"page"},{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}],"default":10,"required":false,"in":"query","name":"limit"},{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"required":false,"in":"query","name":"status"},{"type":"string","required":false,"in":"query","name":"search"},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","required":false,"in":"query","name":"dateFrom"},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","required":false,"in":"query","name":"dateTo"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"applications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique application identifier"},"programId":{"type":"string","description":"ID of the funding program"},"chainID":{"type":"number","nullable":true,"description":"Blockchain chain ID (null for off-chain programs)"},"applicantEmail":{"type":"string","description":"Email address of the applicant"},"ownerAddress":{"type":"string","description":"Wallet address of the person who submitted the application"},"applicationData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"aiEvaluation":{"description":"AI evaluation data"},"internalAIEvaluation":{"type":"object","properties":{"evaluation":{"type":"string","description":"JSON string of evaluation result"},"promptId":{"type":"string","description":"Langfuse prompt ID used"},"evaluatedAt":{"type":"string","description":"When evaluation was performed"},"status":{"type":"string","enum":["pending","completed","failed"],"description":"Evaluation status"}},"required":["evaluation","promptId","evaluatedAt","status"],"additionalProperties":false,"description":"Internal AI evaluation (only visible to reviewers/admins, never shown to applicants)"},"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Current application status"},"statusHistory":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Application status"},"timestamp":{"type":"string","description":"Status update timestamp"},"reason":{"type":"string","description":"Reason for status change"}},"required":["status","timestamp"],"additionalProperties":false},"description":"History of status changes"},"submissionIP":{"type":"string","description":"IP address from which the application was submitted"},"referenceNumber":{"type":"string","description":"Unique reference number for the application"},"projectUID":{"type":"string","description":"Project UID when application is approved"},"postApprovalData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"postApprovalSubmittedAt":{"type":"string","description":"When post-approval form was first submitted"},"postApprovalUpdatedAt":{"type":"string","description":"Last update to post-approval responses"},"postApprovalCompleted":{"type":"boolean","description":"Tracking completion status of post-approval form"},"approvedAmount":{"type":"string","description":"Amount approved for this application"},"approvedCurrency":{"type":"string","description":"Currency of the approved amount (e.g., \"OP\", \"USD\")"},"appReviewers":{"type":"array","items":{"type":"string"},"description":"Array of program reviewer wallet addresses assigned to this application"},"milestoneReviewers":{"type":"array","items":{"type":"string"},"description":"Array of milestone reviewer wallet addresses assigned to this application"},"createdAt":{"type":"string","description":"Application creation date"},"updatedAt":{"type":"string","description":"Application last update date"},"programTitle":{"type":"string","description":"Title of the funding program"}},"additionalProperties":false},"description":"List of user funding applications"},"pagination":{"type":"object","properties":{"totalCount":{"type":"number","description":"Total number of items"},"page":{"type":"number","description":"Current page number"},"limit":{"type":"number","description":"Items per page"},"totalPages":{"type":"number","description":"Total number of pages"},"nextPage":{"type":"number","nullable":true,"description":"Next page number or null"},"prevPage":{"type":"number","nullable":true,"description":"Previous page number or null"},"hasNextPage":{"type":"boolean","description":"Whether there is a next page"},"hasPrevPage":{"type":"boolean","description":"Whether there is a previous page"}},"required":["totalCount","page","limit","totalPages","nextPage","prevPage","hasNextPage","hasPrevPage"],"additionalProperties":false,"description":"Pagination information"},"statusCounts":{"type":"object","additionalProperties":{"type":"number"},"description":"Application counts grouped by status, independent of the current status filter"}},"required":["applications","pagination","statusCounts"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/{referenceNumber}/post-approval":{"put":{"summary":"Update Post-Approval Form","description":"Update post-approval form responses. Only available for approved applications and only the application owner can update","tags":["Funding Applications"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"postApprovalData":{"type":"object","additionalProperties":{}}},"required":["postApprovalData"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"referenceNumber"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique application identifier"},"programId":{"type":"string","description":"ID of the funding program"},"chainID":{"type":"number","nullable":true,"description":"Blockchain chain ID (null for off-chain programs)"},"applicantEmail":{"type":"string","description":"Email address of the applicant"},"ownerAddress":{"type":"string","description":"Wallet address of the person who submitted the application"},"applicationData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"aiEvaluation":{"description":"AI evaluation data"},"internalAIEvaluation":{"type":"object","properties":{"evaluation":{"type":"string","description":"JSON string of evaluation result"},"promptId":{"type":"string","description":"Langfuse prompt ID used"},"evaluatedAt":{"type":"string","description":"When evaluation was performed"},"status":{"type":"string","enum":["pending","completed","failed"],"description":"Evaluation status"}},"required":["evaluation","promptId","evaluatedAt","status"],"additionalProperties":false,"description":"Internal AI evaluation (only visible to reviewers/admins, never shown to applicants)"},"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Current application status"},"statusHistory":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"],"description":"Application status"},"timestamp":{"type":"string","description":"Status update timestamp"},"reason":{"type":"string","description":"Reason for status change"}},"required":["status","timestamp"],"additionalProperties":false},"description":"History of status changes"},"submissionIP":{"type":"string","description":"IP address from which the application was submitted"},"referenceNumber":{"type":"string","description":"Unique reference number for the application"},"projectUID":{"type":"string","description":"Project UID when application is approved"},"postApprovalData":{"type":"object","additionalProperties":{},"description":"Dynamic form data"},"postApprovalSubmittedAt":{"type":"string","description":"When post-approval form was first submitted"},"postApprovalUpdatedAt":{"type":"string","description":"Last update to post-approval responses"},"postApprovalCompleted":{"type":"boolean","description":"Tracking completion status of post-approval form"},"approvedAmount":{"type":"string","description":"Amount approved for this application"},"approvedCurrency":{"type":"string","description":"Currency of the approved amount (e.g., \"OP\", \"USD\")"},"appReviewers":{"type":"array","items":{"type":"string"},"description":"Array of program reviewer wallet addresses assigned to this application"},"milestoneReviewers":{"type":"array","items":{"type":"string"},"description":"Array of milestone reviewer wallet addresses assigned to this application"},"createdAt":{"type":"string","description":"Application creation date"},"updatedAt":{"type":"string","description":"Application last update date"},"programTitle":{"type":"string","description":"Title of the funding program"}},"required":["id","programId","chainID","applicantEmail","ownerAddress","applicationData","status","statusHistory","referenceNumber","postApprovalCompleted","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/{referenceNumber}/reviewers":{"put":{"summary":"Assign Reviewers to Application","description":"Assign or update reviewers for a specific funding application. Requires PROGRAM_MANAGE_REVIEWERS permission.","tags":["Funding Applications"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"appReviewerAddresses":{"type":"array","items":{"type":"string"}},"milestoneReviewerAddresses":{"type":"array","items":{"$ref":"#/properties/appReviewerAddresses/items"}}},"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"referenceNumber"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"get":{"summary":"Get Assigned Reviewers","description":"Get all reviewers currently assigned to a specific funding application. Requires APPLICATION_VIEW_ALL, APPLICATION_VIEW_ASSIGNED, or APPLICATION_READ permission.","tags":["Funding Applications"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"referenceNumber"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"appReviewers":{"type":"array","items":{"type":"string"}},"milestoneReviewers":{"type":"array","items":{"type":"string"}}},"required":["appReviewers","milestoneReviewers"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/{referenceNumber}/versions/timeline":{"get":{"summary":"Get Application Version Timeline","description":"Get the version history timeline for a funding application, including all changes made across versions","tags":["Funding Application Versions"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"referenceNumber"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"timeline":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique version identifier"},"versionNumber":{"type":"number","description":"Sequential version number"},"submittedBy":{"type":"string","description":"Address of the user who submitted this version"},"currentStatus":{"type":"string","description":"Status of the application at this version"},"createdAt":{"type":"string","description":"Timestamp when this version was created"},"hasChanges":{"type":"boolean","description":"Whether this version has changes from previous"},"changeCount":{"type":"number","description":"Number of fields changed in this version"},"diffFromPrevious":{"type":"object","properties":{"computedAt":{"type":"string","description":"Timestamp when diff was computed"},"changedFields":{"type":"array","items":{"type":"object","properties":{"fieldLabel":{"type":"string","description":"Label of the changed field"},"changeType":{"type":"string","description":"Type of change (added, modified, removed)"},"oldValue":{"type":"string","description":"Previous value of the field"},"newValue":{"type":"string","description":"New value of the field"}},"required":["fieldLabel","changeType"],"additionalProperties":false},"description":"List of changed fields"}},"required":["computedAt","changedFields"],"additionalProperties":false,"description":"Diff information from previous version if applicable"}},"required":["id","versionNumber","submittedBy","currentStatus","createdAt","hasChanges","changeCount"],"additionalProperties":false},"description":"List of application versions with change history"}},"required":["timeline"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/contributors/profiles":{"get":{"summary":"Get Contributor Profiles","description":"Get contributor profiles by wallet addresses","tags":["Contributors"],"parameters":[{"type":"string","required":true,"in":"query","name":"addresses"}],"responses":{"200":{"description":"Default Response","schema":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"Wallet address of the contributor"},"profileData":{"type":"object","properties":{"name":{"type":"string","nullable":true,"description":"Contributor display name"},"aboutMe":{"type":"string","nullable":true,"description":"About me description"},"twitter":{"type":"string","nullable":true,"description":"Twitter username"},"farcaster":{"type":"string","nullable":true,"description":"Farcaster username"},"github":{"type":"string","nullable":true,"description":"GitHub username"},"linkedin":{"type":"string","nullable":true,"description":"LinkedIn profile URL"}},"required":["name","aboutMe","twitter","farcaster","github","linkedin"],"additionalProperties":false}},"required":["address","profileData"],"additionalProperties":false}}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/programs/{programId}/milestone-reviewers":{"post":{"summary":"Add Milestone Reviewer","description":"Add a milestone reviewer to a program. Requires PROGRAM_MANAGE_REVIEWERS permission","tags":["Milestone Reviewers"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"name":{"allOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"string","minLength":1}]},"email":{"type":"string","format":"email"},"telegram":{"type":"string","maxLength":200}},"required":["name","email"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"publicAddress":{"type":"string","description":"Wallet address of the milestone reviewer"},"programId":{"type":"string","description":"Program ID"},"chainID":{"type":"number","nullable":true,"description":"Chain ID (null for off-chain programs)"}},"required":["publicAddress","programId","chainID"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"get":{"summary":"Get Milestone Reviewers","description":"Get all milestone reviewers for a program. Requires PROGRAM_VIEW permission","tags":["Milestone Reviewers"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"array","items":{"type":"object","properties":{"publicAddress":{"type":"string","description":"Wallet address of the milestone reviewer"},"programId":{"type":"string","description":"Program ID"},"chainID":{"type":"number","nullable":true,"description":"Chain ID (null for off-chain programs)"},"userProfile":{"type":"object","properties":{"publicAddress":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"telegram":{"type":"string"}},"required":["publicAddress"],"additionalProperties":false,"nullable":true,"description":"User profile information (null if profile not set)"}},"required":["publicAddress","programId","chainID","userProfile"],"additionalProperties":false}}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/programs/{programId}/milestone-reviewers/{walletAddress}":{"delete":{"summary":"Remove Milestone Reviewer (Deprecated)","description":"DEPRECATED: Use DELETE /programs/:programId/milestone-reviewers/by-email instead. Remove a milestone reviewer by wallet address.","tags":["Milestone Reviewers"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"},{"type":"string","minLength":1,"required":true,"in":"path","name":"walletAddress"}],"responses":{"204":{"description":"Milestone reviewer removed successfully"},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/programs/{programId}/milestone-reviewers/by-email":{"delete":{"summary":"Remove Milestone Reviewer by Email","description":"Remove a milestone reviewer by email. Resolves email to wallet address server-side. Requires PROGRAM_MANAGE_REVIEWERS permission","tags":["Milestone Reviewers"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","format":"email"}},"required":["email"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"}],"responses":{"204":{"description":"Milestone reviewer removed successfully"},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/communities/{communityId}/regions":{"get":{"summary":"Get Community Regions","description":"Get all regions for a community","tags":["Regions"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"communityId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Region unique identifier"},"name":{"type":"string","description":"Region name"},"communityId":{"type":"string","description":"Community identifier"},"createdAt":{"type":"string","format":"date-time","description":"Region creation date"},"updatedAt":{"type":"string","format":"date-time","description":"Region update date"}},"required":["id","name","communityId","createdAt","updatedAt"],"additionalProperties":false}}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"post":{"summary":"Create Region","description":"Create a new region for a community. Requires community admin access","tags":["Regions"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"communityId"}],"responses":{"201":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string","description":"Region unique identifier"},"name":{"type":"string","description":"Region name"},"communityId":{"type":"string","description":"Community identifier"},"createdAt":{"type":"string","format":"date-time","description":"Region creation date"},"updatedAt":{"type":"string","format":"date-time","description":"Region update date"}},"required":["id","name","communityId","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/regions/{regionId}":{"get":{"summary":"Get Region by ID","description":"Get a specific region by ID","tags":["Regions"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"regionId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string","description":"Region unique identifier"},"name":{"type":"string","description":"Region name"},"communityId":{"type":"string","description":"Community identifier"},"createdAt":{"type":"string","format":"date-time","description":"Region creation date"},"updatedAt":{"type":"string","format":"date-time","description":"Region update date"}},"required":["id","name","communityId","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/communities/{communityId}/regions/{regionId}":{"put":{"summary":"Update Region","description":"Update an existing region. Requires community admin access","tags":["Regions"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"communityId"},{"type":"string","minLength":1,"required":true,"in":"path","name":"regionId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string","description":"Region unique identifier"},"name":{"type":"string","description":"Region name"},"communityId":{"type":"string","description":"Community identifier"},"createdAt":{"type":"string","format":"date-time","description":"Region creation date"},"updatedAt":{"type":"string","format":"date-time","description":"Region update date"}},"required":["id","name","communityId","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"delete":{"summary":"Delete Region","description":"Soft delete a region. Requires community admin access","tags":["Regions"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"communityId"},{"type":"string","minLength":1,"required":true,"in":"path","name":"regionId"}],"responses":{"204":{"description":"Region successfully deleted"},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/applications/{referenceNumber}/comments/public":{"get":{"summary":"Get Application Comments (Public)","description":"Get all comments for a specific funding application (public endpoint). Only works if showCommentsOnPublicPage flag is enabled for the program.","tags":["Application Comments"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"referenceNumber"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique comment identifier"},"applicationId":{"type":"string","description":"ID of the application this comment belongs to"},"content":{"type":"string","description":"Current content of the comment"},"authorAddress":{"type":"string","description":"Wallet address of the comment author"},"authorRole":{"type":"string","description":"Role of the author (admin, reviewer, etc.)"},"authorName":{"type":"string","nullable":true,"description":"Display name of the author"},"isDeleted":{"type":"boolean","description":"Whether the comment has been deleted"},"deletedAt":{"type":"string","nullable":true,"description":"Date when the comment was deleted"},"deletedBy":{"type":"string","nullable":true,"description":"Address of the user who deleted the comment"},"editHistory":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string","description":"Content of the comment at the time of edit"},"editedAt":{"type":"string","description":"Date when the comment was edited"},"editedBy":{"type":"string","description":"Address of the user who made the edit"}},"required":["content","editedAt","editedBy"],"additionalProperties":false},"description":"History of comment edits"},"createdAt":{"type":"string","description":"Comment creation date"},"updatedAt":{"type":"string","description":"Comment last update date"}},"required":["id","applicationId","content","authorAddress","authorRole","authorName","isDeleted","deletedAt","deletedBy","editHistory","createdAt","updatedAt"],"additionalProperties":false},"description":"List of application comments"}},"required":["comments"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"post":{"summary":"Create Public Comment","description":"Create a new public comment on a funding application. Any authenticated user can comment if the program has showCommentsOnPublicPage enabled. Comments created through this endpoint will have authorRole set to \"community\".","tags":["Application Comments"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":10000},"authorName":{"type":"string","maxLength":100}},"required":["content"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"referenceNumber"}],"responses":{"201":{"description":"Default Response","schema":{"type":"object","properties":{"comment":{"type":"object","properties":{"id":{"type":"string","description":"Unique comment identifier"},"applicationId":{"type":"string","description":"ID of the application this comment belongs to"},"content":{"type":"string","description":"Current content of the comment"},"authorAddress":{"type":"string","description":"Wallet address of the comment author"},"authorRole":{"type":"string","description":"Role of the author (admin, reviewer, etc.)"},"authorName":{"type":"string","nullable":true,"description":"Display name of the author"},"isDeleted":{"type":"boolean","description":"Whether the comment has been deleted"},"deletedAt":{"type":"string","nullable":true,"description":"Date when the comment was deleted"},"deletedBy":{"type":"string","nullable":true,"description":"Address of the user who deleted the comment"},"editHistory":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string","description":"Content of the comment at the time of edit"},"editedAt":{"type":"string","description":"Date when the comment was edited"},"editedBy":{"type":"string","description":"Address of the user who made the edit"}},"required":["content","editedAt","editedBy"],"additionalProperties":false},"description":"History of comment edits"},"createdAt":{"type":"string","description":"Comment creation date"},"updatedAt":{"type":"string","description":"Comment last update date"}},"required":["id","applicationId","content","authorAddress","authorRole","authorName","isDeleted","deletedAt","deletedBy","editHistory","createdAt","updatedAt"],"additionalProperties":false,"description":"The created comment"}},"required":["comment"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/applications/{referenceNumber}/comments":{"get":{"summary":"Get Application Comments","description":"Get all comments for a specific funding application. Requires APPLICATION_VIEW_ALL, APPLICATION_VIEW_ASSIGNED, or APPLICATION_READ permission","tags":["Application Comments"],"parameters":[{"type":"string","enum":["true","false"],"required":false,"in":"query","name":"admin"},{"type":"string","minLength":1,"required":true,"in":"path","name":"referenceNumber"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique comment identifier"},"applicationId":{"type":"string","description":"ID of the application this comment belongs to"},"content":{"type":"string","description":"Current content of the comment"},"authorAddress":{"type":"string","description":"Wallet address of the comment author"},"authorRole":{"type":"string","description":"Role of the author (admin, reviewer, etc.)"},"authorName":{"type":"string","nullable":true,"description":"Display name of the author"},"isDeleted":{"type":"boolean","description":"Whether the comment has been deleted"},"deletedAt":{"type":"string","nullable":true,"description":"Date when the comment was deleted"},"deletedBy":{"type":"string","nullable":true,"description":"Address of the user who deleted the comment"},"editHistory":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string","description":"Content of the comment at the time of edit"},"editedAt":{"type":"string","description":"Date when the comment was edited"},"editedBy":{"type":"string","description":"Address of the user who made the edit"}},"required":["content","editedAt","editedBy"],"additionalProperties":false},"description":"History of comment edits"},"createdAt":{"type":"string","description":"Comment creation date"},"updatedAt":{"type":"string","description":"Comment last update date"}},"required":["id","applicationId","content","authorAddress","authorRole","authorName","isDeleted","deletedAt","deletedBy","editHistory","createdAt","updatedAt"],"additionalProperties":false},"description":"List of application comments"}},"required":["comments"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"post":{"summary":"Create Application Comment","description":"Create a new comment on a funding application. Requires APPLICATION_COMMENT permission","tags":["Application Comments"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":10000},"authorName":{"type":"string","maxLength":100}},"required":["content"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"referenceNumber"}],"responses":{"201":{"description":"Default Response","schema":{"type":"object","properties":{"comment":{"type":"object","properties":{"id":{"type":"string","description":"Unique comment identifier"},"applicationId":{"type":"string","description":"ID of the application this comment belongs to"},"content":{"type":"string","description":"Current content of the comment"},"authorAddress":{"type":"string","description":"Wallet address of the comment author"},"authorRole":{"type":"string","description":"Role of the author (admin, reviewer, etc.)"},"authorName":{"type":"string","nullable":true,"description":"Display name of the author"},"isDeleted":{"type":"boolean","description":"Whether the comment has been deleted"},"deletedAt":{"type":"string","nullable":true,"description":"Date when the comment was deleted"},"deletedBy":{"type":"string","nullable":true,"description":"Address of the user who deleted the comment"},"editHistory":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string","description":"Content of the comment at the time of edit"},"editedAt":{"type":"string","description":"Date when the comment was edited"},"editedBy":{"type":"string","description":"Address of the user who made the edit"}},"required":["content","editedAt","editedBy"],"additionalProperties":false},"description":"History of comment edits"},"createdAt":{"type":"string","description":"Comment creation date"},"updatedAt":{"type":"string","description":"Comment last update date"}},"required":["id","applicationId","content","authorAddress","authorRole","authorName","isDeleted","deletedAt","deletedBy","editHistory","createdAt","updatedAt"],"additionalProperties":false,"description":"The created comment"}},"required":["comment"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/comments/{commentId}":{"put":{"summary":"Update Application Comment","description":"Update an existing comment. Requires COMMENT_EDIT_OWN permission. Only the comment author can edit their own comment.","tags":["Application Comments"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"content":{"type":"string","minLength":1}},"required":["content"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"commentId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"comment":{"type":"object","properties":{"id":{"type":"string","description":"Unique comment identifier"},"applicationId":{"type":"string","description":"ID of the application this comment belongs to"},"content":{"type":"string","description":"Current content of the comment"},"authorAddress":{"type":"string","description":"Wallet address of the comment author"},"authorRole":{"type":"string","description":"Role of the author (admin, reviewer, etc.)"},"authorName":{"type":"string","nullable":true,"description":"Display name of the author"},"isDeleted":{"type":"boolean","description":"Whether the comment has been deleted"},"deletedAt":{"type":"string","nullable":true,"description":"Date when the comment was deleted"},"deletedBy":{"type":"string","nullable":true,"description":"Address of the user who deleted the comment"},"editHistory":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string","description":"Content of the comment at the time of edit"},"editedAt":{"type":"string","description":"Date when the comment was edited"},"editedBy":{"type":"string","description":"Address of the user who made the edit"}},"required":["content","editedAt","editedBy"],"additionalProperties":false},"description":"History of comment edits"},"createdAt":{"type":"string","description":"Comment creation date"},"updatedAt":{"type":"string","description":"Comment last update date"}},"required":["id","applicationId","content","authorAddress","authorRole","authorName","isDeleted","deletedAt","deletedBy","editHistory","createdAt","updatedAt"],"additionalProperties":false,"description":"The updated comment"}},"required":["comment"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"delete":{"summary":"Delete Application Comment","description":"Delete an existing comment. Requires COMMENT_DELETE_OWN permission. Comment authors can delete their own comments. Admins and reviewers can soft-delete any comment for moderation.","tags":["Application Comments"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"commentId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"message":{"type":"string","description":"Success message confirming comment deletion"}},"required":["message"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/grants/{projectUID}/{programId}/comments":{"get":{"summary":"Get Grant Comments","description":"Get all comments for a specific grant. Only accessible by admins and reviewers.","tags":["Grant Comments"],"parameters":[{"type":"string","minLength":1,"maxLength":200,"required":true,"in":"path","name":"projectUID"},{"type":"string","minLength":1,"maxLength":200,"required":true,"in":"path","name":"programId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique comment identifier"},"projectUID":{"type":"string","description":"UID of the project this comment belongs to"},"programId":{"type":"string","description":"ID of the program this comment belongs to"},"content":{"type":"string","description":"Current content of the comment"},"authorAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Wallet address of the comment author"},"authorRole":{"type":"string","enum":["admin","reviewer","unknown"],"description":"Role of the author"},"authorName":{"type":"string","nullable":true,"description":"Display name of the author"},"isDeleted":{"type":"boolean","description":"Whether the comment has been deleted"},"deletedAt":{"type":"string","nullable":true,"description":"Date when the comment was deleted"},"deletedBy":{"type":"string","nullable":true,"description":"Address of the user who deleted the comment"},"editHistory":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string","description":"Content of the comment at the time of edit"},"editedAt":{"type":"string","description":"Date when the comment was edited"},"editedBy":{"type":"string","description":"Address of the user who made the edit"}},"required":["content","editedAt","editedBy"],"additionalProperties":false},"maxItems":100,"description":"History of comment edits"},"createdAt":{"type":"string","description":"Comment creation date"},"updatedAt":{"type":"string","description":"Comment last update date"}},"required":["id","projectUID","programId","content","authorAddress","authorRole","authorName","isDeleted","deletedAt","deletedBy","editHistory","createdAt","updatedAt"],"additionalProperties":false},"maxItems":1000,"description":"List of grant comments"}},"required":["comments"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"post":{"summary":"Create Grant Comment","description":"Create a new comment on a grant. Only accessible by admins and reviewers.","tags":["Grant Comments"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":10000}},"required":["content"],"additionalProperties":false}},{"type":"string","minLength":1,"maxLength":200,"required":true,"in":"path","name":"projectUID"},{"type":"string","minLength":1,"maxLength":200,"required":true,"in":"path","name":"programId"}],"responses":{"201":{"description":"Default Response","schema":{"type":"object","properties":{"comment":{"type":"object","properties":{"id":{"type":"string","description":"Unique comment identifier"},"projectUID":{"type":"string","description":"UID of the project this comment belongs to"},"programId":{"type":"string","description":"ID of the program this comment belongs to"},"content":{"type":"string","description":"Current content of the comment"},"authorAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Wallet address of the comment author"},"authorRole":{"type":"string","enum":["admin","reviewer","unknown"],"description":"Role of the author"},"authorName":{"type":"string","nullable":true,"description":"Display name of the author"},"isDeleted":{"type":"boolean","description":"Whether the comment has been deleted"},"deletedAt":{"type":"string","nullable":true,"description":"Date when the comment was deleted"},"deletedBy":{"type":"string","nullable":true,"description":"Address of the user who deleted the comment"},"editHistory":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string","description":"Content of the comment at the time of edit"},"editedAt":{"type":"string","description":"Date when the comment was edited"},"editedBy":{"type":"string","description":"Address of the user who made the edit"}},"required":["content","editedAt","editedBy"],"additionalProperties":false},"maxItems":100,"description":"History of comment edits"},"createdAt":{"type":"string","description":"Comment creation date"},"updatedAt":{"type":"string","description":"Comment last update date"}},"required":["id","projectUID","programId","content","authorAddress","authorRole","authorName","isDeleted","deletedAt","deletedBy","editHistory","createdAt","updatedAt"],"additionalProperties":false,"description":"The created comment"}},"required":["comment"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/grant-comments/{commentId}":{"put":{"summary":"Update Grant Comment","description":"Update an existing grant comment. Only the comment author or admins/reviewers can edit.","tags":["Grant Comments"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":10000}},"required":["content"],"additionalProperties":false}},{"type":"string","minLength":1,"maxLength":200,"required":true,"in":"path","name":"commentId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"comment":{"type":"object","properties":{"id":{"type":"string","description":"Unique comment identifier"},"projectUID":{"type":"string","description":"UID of the project this comment belongs to"},"programId":{"type":"string","description":"ID of the program this comment belongs to"},"content":{"type":"string","description":"Current content of the comment"},"authorAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Wallet address of the comment author"},"authorRole":{"type":"string","enum":["admin","reviewer","unknown"],"description":"Role of the author"},"authorName":{"type":"string","nullable":true,"description":"Display name of the author"},"isDeleted":{"type":"boolean","description":"Whether the comment has been deleted"},"deletedAt":{"type":"string","nullable":true,"description":"Date when the comment was deleted"},"deletedBy":{"type":"string","nullable":true,"description":"Address of the user who deleted the comment"},"editHistory":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string","description":"Content of the comment at the time of edit"},"editedAt":{"type":"string","description":"Date when the comment was edited"},"editedBy":{"type":"string","description":"Address of the user who made the edit"}},"required":["content","editedAt","editedBy"],"additionalProperties":false},"maxItems":100,"description":"History of comment edits"},"createdAt":{"type":"string","description":"Comment creation date"},"updatedAt":{"type":"string","description":"Comment last update date"}},"required":["id","projectUID","programId","content","authorAddress","authorRole","authorName","isDeleted","deletedAt","deletedBy","editHistory","createdAt","updatedAt"],"additionalProperties":false,"description":"The updated comment"}},"required":["comment"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"delete":{"summary":"Delete Grant Comment","description":"Delete a grant comment. Authors can delete their own comments. Admins can soft-delete any comment.","tags":["Grant Comments"],"parameters":[{"type":"string","minLength":1,"maxLength":200,"required":true,"in":"path","name":"commentId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"message":{"type":"string","description":"Success message confirming comment deletion"}},"required":["message"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/program-scores/{programId}":{"get":{"summary":"Get Program Scores","description":"Get program scores by program ID","tags":["Program Scores"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"array","items":{"type":"object","properties":{"projectUID":{"type":"string","description":"Unique identifier of the project"},"programId":{"type":"string","description":"Identifier of the program"},"scores":{"description":"Score data for the program"}},"required":["projectUID","programId"],"additionalProperties":false}}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/program-scores/bulk-create-from-csv":{"post":{"summary":"Bulk Create Program Scores from CSV","description":"Bulk create program scores from CSV data","tags":["Program Scores"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"communityUID":{"type":"string","minLength":1},"programId":{"type":"string","minLength":1},"chainId":{"type":"number"},"csvData":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["communityUID","programId","chainId","csvData"],"additionalProperties":false}}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"successful":{"type":"number","description":"Number of successfully created program scores"},"failed":{"type":"array","items":{"type":"string"},"description":"List of project UIDs that failed to create"},"message":{"type":"string","description":"Summary message of the bulk operation"}},"required":["successful","failed","message"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/impact-segments/{communityUIDOrSlug}":{"get":{"summary":"Get Impact Segments for Community","description":"Get impact segments by community UID or slug","tags":["ImpactSegment"],"parameters":[{"type":"string","minLength":1,"description":"Community UID or slug identifier","required":true,"in":"path","name":"communityUIDOrSlug"}],"responses":{"200":{"description":"Default Response","schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Impact segment unique identifier"},"name":{"type":"string","description":"Impact segment name"},"description":{"type":"string","description":"Impact segment description"},"type":{"type":"string","enum":["output","outcome"],"description":"Impact segment type"},"categoryName":{"type":"string","description":"Associated category name"},"impactIndicatorIds":{"type":"array","items":{"type":"string"},"description":"List of impact indicator identifiers"}},"required":["id","name","description","type","categoryName","impactIndicatorIds"],"additionalProperties":false}}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/indicators/aggregate":{"get":{"summary":"Get Aggregated Indicator Data","description":"Get aggregated indicator data filtered by community, program, and/or project","tags":["Indicators"],"parameters":[{"type":"string","minLength":1,"description":"Comma-separated list of indicator IDs","required":true,"in":"query","name":"indicatorIds"},{"type":"string","minLength":1,"description":"Community UID to filter by","required":true,"in":"query","name":"communityUID"},{"type":"string","description":"Optional program ID to filter projects by program","required":false,"in":"query","name":"programId"},{"type":"string","description":"Optional project UID to filter by","required":false,"in":"query","name":"projectUID"},{"type":"string","description":"Optional start date to filter datapoints (ISO string)","required":false,"in":"query","name":"startDate"},{"type":"string","description":"Optional end date to filter datapoints (ISO string)","required":false,"in":"query","name":"endDate"}],"responses":{"200":{"description":"Default Response","schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Indicator ID"},"name":{"type":"string","description":"Indicator name"},"description":{"type":"string","description":"Indicator description"},"unitOfMeasure":{"type":"string","description":"Unit of measure for the indicator"},"totalProjects":{"type":"number","description":"Total number of projects contributing to this indicator"},"aggregatedData":{"type":"array","items":{"type":"object","properties":{"value":{"type":"number","description":"The value of the datapoint"},"timestamp":{"type":"string","description":"ISO timestamp of the datapoint"}},"required":["value","timestamp"],"additionalProperties":false},"description":"Cumulative datapoints over time"}},"required":["id","name","description","unitOfMeasure","totalProjects","aggregatedData"],"additionalProperties":false}}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/indicators/":{"get":{"summary":"List Indicators","description":"List indicators with pagination and filtering","tags":["Indicators V2"],"parameters":[{"type":"string","description":"Filter indicators by community UID","required":false,"in":"query","name":"communityUID"},{"type":"string","pattern":"^\\d+$","description":"Filter indicators by program ID","required":false,"in":"query","name":"programId"},{"type":"string","pattern":"^\\d+$","description":"Filter indicators by chain ID (required with programId)","required":false,"in":"query","name":"chainId"},{"type":"string","enum":["auto","manual"],"description":"Filter by sync type","required":false,"in":"query","name":"syncType"},{"type":"string","pattern":"^\\d+$","default":"1","description":"Page number (1-indexed)","required":false,"in":"query","name":"page"},{"type":"string","pattern":"^\\d+$","default":"20","description":"Items per page (max 100)","required":false,"in":"query","name":"limit"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"payload":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Indicator UUID"},"name":{"type":"string","description":"Indicator name"},"description":{"type":"string","description":"Indicator description"},"unitOfMeasure":{"type":"string","description":"Unit of measure"},"programs":{"type":"array","items":{"type":"object","properties":{"programId":{"type":"number","description":"Program ID"},"chainID":{"type":"number","description":"Chain ID"}},"required":["programId","chainID"],"additionalProperties":false},"nullable":true,"description":"Programs associated with this indicator"},"communityUID":{"type":"string","nullable":true,"description":"Community UID if indicator is community-specific"},"syncType":{"type":"string","enum":["auto","manual"],"description":"Sync type"},"createdAt":{"type":"string","description":"Creation timestamp (ISO 8601)"},"updatedAt":{"type":"string","description":"Last update timestamp (ISO 8601)"}},"required":["id","name","description","unitOfMeasure","programs","communityUID","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"totalCount":{"type":"number","description":"Total number of items"},"page":{"type":"number","description":"Current page"},"limit":{"type":"number","description":"Items per page"},"totalPages":{"type":"number","description":"Total pages"},"nextPage":{"type":"number","nullable":true,"description":"Next page number or null"},"prevPage":{"type":"number","nullable":true,"description":"Previous page number or null"},"hasNextPage":{"type":"boolean","description":"Whether there is a next page"},"hasPrevPage":{"type":"boolean","description":"Whether there is a previous page"}},"required":["totalCount","page","limit","totalPages","nextPage","prevPage","hasNextPage","hasPrevPage"],"additionalProperties":false}},"required":["payload","pagination"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"post":{"summary":"Create or Update Indicator","description":"Create or update an indicator. Community indicators require community admin permissions.","tags":["Indicators V2"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"indicatorId":{"type":"string","description":"Existing indicator ID for updates"},"name":{"type":"string","minLength":1,"description":"Indicator name"},"description":{"type":"string","minLength":1,"description":"Indicator description"},"unitOfMeasure":{"type":"string","minLength":1,"description":"Unit of measure"},"communityUID":{"type":"string","description":"Community UID for community-specific indicators"},"programs":{"type":"array","items":{"type":"object","properties":{"programId":{"type":"string","description":"Program ID"},"chainID":{"type":"number","description":"Chain ID"}},"required":["programId","chainID"],"additionalProperties":false},"description":"Programs to associate with this indicator"}},"required":["name","description","unitOfMeasure"],"additionalProperties":false}}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string","description":"Indicator UUID"},"name":{"type":"string","description":"Indicator name"},"description":{"type":"string","description":"Indicator description"},"unitOfMeasure":{"type":"string","description":"Unit of measure"},"programs":{"type":"array","items":{"type":"object","properties":{"programId":{"type":"number","description":"Program ID"},"chainID":{"type":"number","description":"Chain ID"}},"required":["programId","chainID"],"additionalProperties":false},"nullable":true,"description":"Programs associated with this indicator"},"communityUID":{"type":"string","nullable":true,"description":"Community UID if indicator is community-specific"},"syncType":{"type":"string","enum":["auto","manual"],"description":"Sync type"},"createdAt":{"type":"string","description":"Creation timestamp (ISO 8601)"},"updatedAt":{"type":"string","description":"Last update timestamp (ISO 8601)"}},"required":["id","name","description","unitOfMeasure","programs","communityUID","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/indicators/unlinked":{"get":{"summary":"List Unlinked Indicators","description":"List indicators without a communityUID (global/unlinked) with optional name search","tags":["Indicators V2"],"parameters":[{"type":"string","description":"Filter indicators by name (case-insensitive)","required":false,"in":"query","name":"search"}],"responses":{"200":{"description":"Default Response","schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Indicator UUID"},"name":{"type":"string","description":"Indicator name"},"description":{"type":"string","description":"Indicator description"},"unitOfMeasure":{"type":"string","description":"Unit of measure"},"programs":{"type":"array","items":{"type":"object","properties":{"programId":{"type":"number","description":"Program ID"},"chainID":{"type":"number","description":"Chain ID"}},"required":["programId","chainID"],"additionalProperties":false},"nullable":true,"description":"Programs associated with this indicator"},"communityUID":{"type":"string","nullable":true,"description":"Community UID if indicator is community-specific"},"syncType":{"type":"string","enum":["auto","manual"],"description":"Sync type"},"createdAt":{"type":"string","description":"Creation timestamp (ISO 8601)"},"updatedAt":{"type":"string","description":"Last update timestamp (ISO 8601)"}},"required":["id","name","description","unitOfMeasure","programs","communityUID","createdAt","updatedAt"],"additionalProperties":false}}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/indicators/{indicatorId}":{"get":{"summary":"Get Indicator","description":"Get a specific indicator by ID","tags":["Indicators V2"],"parameters":[{"type":"string","description":"Indicator ID (UUID)","required":true,"in":"path","name":"indicatorId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string","description":"Indicator UUID"},"name":{"type":"string","description":"Indicator name"},"description":{"type":"string","description":"Indicator description"},"unitOfMeasure":{"type":"string","description":"Unit of measure"},"programs":{"type":"array","items":{"type":"object","properties":{"programId":{"type":"number","description":"Program ID"},"chainID":{"type":"number","description":"Chain ID"}},"required":["programId","chainID"],"additionalProperties":false},"nullable":true,"description":"Programs associated with this indicator"},"communityUID":{"type":"string","nullable":true,"description":"Community UID if indicator is community-specific"},"syncType":{"type":"string","enum":["auto","manual"],"description":"Sync type"},"createdAt":{"type":"string","description":"Creation timestamp (ISO 8601)"},"updatedAt":{"type":"string","description":"Last update timestamp (ISO 8601)"}},"required":["id","name","description","unitOfMeasure","programs","communityUID","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"delete":{"summary":"Delete Indicator","description":"Delete an indicator. Cannot delete indicators with associated datapoints. Community indicators require community admin permissions.","tags":["Indicators V2"],"parameters":[{"type":"string","minLength":1,"description":"Indicator ID to delete","required":true,"in":"path","name":"indicatorId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"message":{"type":"string","description":"Deletion confirmation message"}},"required":["message"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/indicators/{indicatorId}/datapoints":{"get":{"summary":"List Indicator Datapoints","description":"List datapoints for a specific indicator with pagination","tags":["Indicators V2"],"parameters":[{"type":"string","description":"Filter by project UID","required":false,"in":"query","name":"projectUID"},{"type":"string","description":"Filter datapoints from this date (ISO 8601)","required":false,"in":"query","name":"startDate"},{"type":"string","description":"Filter datapoints to this date (ISO 8601)","required":false,"in":"query","name":"endDate"},{"type":"string","enum":["30d","90d","180d","1y","monthly"],"description":"Filter by period","required":false,"in":"query","name":"period"},{"type":"string","enum":["manual","auto","silvi_api"],"description":"Filter by data source","required":false,"in":"query","name":"source"},{"type":"string","pattern":"^\\d+$","default":"1","description":"Page number (1-indexed)","required":false,"in":"query","name":"page"},{"type":"string","pattern":"^\\d+$","default":"20","description":"Items per page (max 100)","required":false,"in":"query","name":"limit"},{"type":"string","description":"Indicator ID (UUID)","required":true,"in":"path","name":"indicatorId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"payload":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Datapoint UUID"},"value":{"type":"string","description":"Datapoint value"},"breakdown":{"type":"string","nullable":true,"description":"JSON breakdown of the value"},"startDate":{"type":"string","description":"Period start date (ISO 8601)"},"endDate":{"type":"string","description":"Period end date (ISO 8601)"},"period":{"type":"string","nullable":true,"description":"Period type (30d, 90d, 180d, 1y, monthly)"},"proof":{"type":"string","nullable":true,"description":"Proof/source URL"},"source":{"type":"string","description":"Data source (manual, auto, silvi_api)"},"createdAt":{"type":"string","description":"Creation timestamp (ISO 8601)"},"updatedAt":{"type":"string","description":"Last update timestamp (ISO 8601)"}},"required":["id","value","breakdown","startDate","endDate","period","proof","source","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"totalCount":{"type":"number","description":"Total number of items"},"page":{"type":"number","description":"Current page"},"limit":{"type":"number","description":"Items per page"},"totalPages":{"type":"number","description":"Total pages"},"nextPage":{"type":"number","nullable":true,"description":"Next page number or null"},"prevPage":{"type":"number","nullable":true,"description":"Previous page number or null"},"hasNextPage":{"type":"boolean","description":"Whether there is a next page"},"hasPrevPage":{"type":"boolean","description":"Whether there is a previous page"}},"required":["totalCount","page","limit","totalPages","nextPage","prevPage","hasNextPage","hasPrevPage"],"additionalProperties":false}},"required":["payload","pagination"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/indicators/projects/{projectUID}":{"get":{"summary":"Get Project Indicators","description":"Get all indicators with their datapoints for a specific project","tags":["Indicators V2"],"parameters":[{"type":"string","description":"Comma-separated list of indicator IDs to filter by","required":false,"in":"query","name":"indicatorIds"},{"type":"string","description":"Filter datapoints from this date (ISO 8601)","required":false,"in":"query","name":"startDate"},{"type":"string","description":"Filter datapoints to this date (ISO 8601)","required":false,"in":"query","name":"endDate"},{"type":"string","enum":["30d","90d","180d","1y","monthly"],"description":"Filter by datapoint period","required":false,"in":"query","name":"period"},{"type":"string","description":"Project UID","required":true,"in":"path","name":"projectUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"projectUID":{"type":"string","description":"Project UID"},"indicators":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Indicator UUID"},"name":{"type":"string","description":"Indicator name"},"description":{"type":"string","description":"Indicator description"},"unitOfMeasure":{"type":"string","description":"Unit of measure"},"hasData":{"type":"boolean","description":"Whether this indicator has datapoints"},"lastUpdatedAt":{"type":"string","nullable":true,"description":"Last datapoint update timestamp"},"datapoints":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Datapoint UUID"},"value":{"type":"string","description":"Datapoint value"},"breakdown":{"type":"string","nullable":true,"description":"JSON breakdown of the value"},"startDate":{"type":"string","description":"Period start date (ISO 8601)"},"endDate":{"type":"string","description":"Period end date (ISO 8601)"},"period":{"type":"string","nullable":true,"description":"Period type (30d, 90d, 180d, 1y, monthly)"},"proof":{"type":"string","nullable":true,"description":"Proof/source URL"},"source":{"type":"string","description":"Data source (manual, auto, silvi_api)"},"createdAt":{"type":"string","description":"Creation timestamp (ISO 8601)"},"updatedAt":{"type":"string","description":"Last update timestamp (ISO 8601)"}},"required":["id","value","breakdown","startDate","endDate","period","proof","source","createdAt","updatedAt"],"additionalProperties":false},"description":"Raw datapoints for this indicator"},"aggregatedData":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"indicatorId":{"type":"string","description":"Indicator UUID"},"indicatorName":{"type":"string","description":"Indicator name"},"startDate":{"type":"string","description":"Period start (ISO 8601)"},"endDate":{"type":"string","description":"Period end (ISO 8601)"},"totalValue":{"type":"number","description":"Aggregated total value"},"projectCount":{"type":"number","description":"Number of projects contributing"}},"required":["indicatorId","indicatorName","startDate","endDate","totalValue","projectCount"],"additionalProperties":false}},"description":"Aggregated data by period. Keys are period names (e.g., monthly, weekly). Use Object.keys() to get available periods"}},"required":["id","name","description","unitOfMeasure","hasData","lastUpdatedAt","datapoints"],"additionalProperties":false},"description":"Indicators with datapoints"}},"required":["projectUID","indicators"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/indicators/projects/{projectUID}/dashboard-metrics":{"get":{"summary":"Get Project Dashboard Metrics","description":"Get dashboard metrics (transactions, commits, PRs, users) for a project","tags":["Indicators V2"],"parameters":[{"type":"string","enum":["30d","90d","180d","1y"],"default":"30d","description":"Time period for metrics aggregation","required":false,"in":"query","name":"period"},{"type":"string","description":"Project UID","required":true,"in":"path","name":"projectUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"projectUID":{"type":"string","description":"Project UID"},"period":{"type":"string","enum":["30d","90d","180d","1y"],"description":"Time period"},"timeRange":{"type":"object","properties":{"startDate":{"type":"string","description":"Start date (ISO 8601)"},"endDate":{"type":"string","description":"End date (ISO 8601)"}},"required":["startDate","endDate"],"additionalProperties":false},"metrics":{"type":"object","properties":{"transactions":{"type":"object","properties":{"value":{"type":"number","description":"Metric value"},"lastUpdated":{"type":"string","description":"Last updated timestamp (ISO 8601)"},"source":{"type":"string","description":"Data source"},"unit":{"type":"string","description":"Unit of measure"},"breakdown":{"type":"object","additionalProperties":{"type":"number"},"description":"Value breakdown by chain/category"}},"required":["value","lastUpdated","source","unit"],"additionalProperties":false,"nullable":true},"gitCommits":{"type":"object","properties":{"value":{"type":"number","description":"Metric value"},"lastUpdated":{"type":"string","description":"Last updated timestamp (ISO 8601)"},"source":{"type":"string","description":"Data source"},"unit":{"type":"string","description":"Unit of measure"},"breakdown":{"type":"object","additionalProperties":{"type":"number"},"description":"Value breakdown by chain/category"}},"required":["value","lastUpdated","source","unit"],"additionalProperties":false,"nullable":true},"mergedPRs":{"type":"object","properties":{"value":{"type":"number","description":"Metric value"},"lastUpdated":{"type":"string","description":"Last updated timestamp (ISO 8601)"},"source":{"type":"string","description":"Data source"},"unit":{"type":"string","description":"Unit of measure"},"breakdown":{"type":"object","additionalProperties":{"type":"number"},"description":"Value breakdown by chain/category"}},"required":["value","lastUpdated","source","unit"],"additionalProperties":false,"nullable":true},"uniqueUsers":{"type":"object","properties":{"value":{"type":"number","description":"Metric value"},"lastUpdated":{"type":"string","description":"Last updated timestamp (ISO 8601)"},"source":{"type":"string","description":"Data source"},"unit":{"type":"string","description":"Unit of measure"},"breakdown":{"type":"object","additionalProperties":{"type":"number"},"description":"Value breakdown by chain/category"}},"required":["value","lastUpdated","source","unit"],"additionalProperties":false,"nullable":true}},"required":["transactions","gitCommits","mergedPRs","uniqueUsers"],"additionalProperties":false}},"required":["projectUID","period","timeRange","metrics"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/indicators/milestones/{milestoneUID}":{"get":{"summary":"Get Milestone Indicators","description":"Get all indicators with their datapoints for a specific milestone","tags":["Indicators V2"],"parameters":[{"type":"string","description":"Milestone UID","required":true,"in":"path","name":"milestoneUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"milestoneUID":{"type":"string","description":"Milestone UID"},"indicators":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Indicator UUID"},"name":{"type":"string","description":"Indicator name"},"description":{"type":"string","description":"Indicator description"},"unitOfMeasure":{"type":"string","description":"Unit of measure"},"hasData":{"type":"boolean","description":"Whether this indicator has datapoints"},"lastUpdatedAt":{"type":"string","nullable":true,"description":"Last datapoint update timestamp"},"datapoints":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Datapoint UUID"},"value":{"type":"string","description":"Datapoint value"},"breakdown":{"type":"string","nullable":true,"description":"JSON breakdown of the value"},"startDate":{"type":"string","description":"Period start date (ISO 8601)"},"endDate":{"type":"string","description":"Period end date (ISO 8601)"},"period":{"type":"string","nullable":true,"description":"Period type (30d, 90d, 180d, 1y, monthly)"},"proof":{"type":"string","nullable":true,"description":"Proof/source URL"},"source":{"type":"string","description":"Data source (manual, auto, silvi_api)"},"createdAt":{"type":"string","description":"Creation timestamp (ISO 8601)"},"updatedAt":{"type":"string","description":"Last update timestamp (ISO 8601)"}},"required":["id","value","breakdown","startDate","endDate","period","proof","source","createdAt","updatedAt"],"additionalProperties":false},"description":"Raw datapoints for this indicator"},"aggregatedData":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"indicatorId":{"type":"string","description":"Indicator UUID"},"indicatorName":{"type":"string","description":"Indicator name"},"startDate":{"type":"string","description":"Period start (ISO 8601)"},"endDate":{"type":"string","description":"Period end (ISO 8601)"},"totalValue":{"type":"number","description":"Aggregated total value"},"projectCount":{"type":"number","description":"Number of projects contributing"}},"required":["indicatorId","indicatorName","startDate","endDate","totalValue","projectCount"],"additionalProperties":false}},"description":"Aggregated data by period. Keys are period names (e.g., monthly, weekly). Use Object.keys() to get available periods"}},"required":["id","name","description","unitOfMeasure","hasData","lastUpdatedAt","datapoints"],"additionalProperties":false},"description":"Indicators with datapoints for this milestone"}},"required":["milestoneUID","indicators"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/indicators/communities/{communityUID}/aggregate":{"get":{"summary":"Get Community Aggregated Indicators","description":"Get aggregated indicator data for a community with weekly/monthly granularity","tags":["Indicators V2"],"parameters":[{"type":"string","description":"Comma-separated list of indicator IDs to filter by","required":false,"in":"query","name":"indicatorIds"},{"type":"string","pattern":"^\\d+$","description":"Filter by program ID","required":false,"in":"query","name":"programId"},{"type":"string","description":"Filter by project UID","required":false,"in":"query","name":"projectUID"},{"type":"string","description":"Start date for aggregation (ISO 8601)","required":false,"in":"query","name":"startDate"},{"type":"string","description":"End date for aggregation (ISO 8601)","required":false,"in":"query","name":"endDate"},{"type":"string","enum":["weekly","monthly"],"default":"monthly","description":"Aggregation granularity","required":false,"in":"query","name":"granularity"},{"type":"string","description":"Community UID","required":true,"in":"path","name":"communityUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"communityUID":{"type":"string","description":"Community UID"},"timeRange":{"type":"object","properties":{"startDate":{"type":"string","description":"Start date (ISO 8601)"},"endDate":{"type":"string","description":"End date (ISO 8601)"}},"required":["startDate","endDate"],"additionalProperties":false,"description":"Actual time range of data"},"indicators":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Indicator UUID"},"name":{"type":"string","description":"Indicator name"},"description":{"type":"string","description":"Indicator description"},"unitOfMeasure":{"type":"string","description":"Unit of measure"},"totalProjects":{"type":"number","description":"Total number of projects"},"aggregatedData":{"type":"array","items":{"type":"object","properties":{"indicatorId":{"type":"string","description":"Indicator UUID"},"indicatorName":{"type":"string","description":"Indicator name"},"startDate":{"type":"string","description":"Period start date (ISO 8601)"},"endDate":{"type":"string","description":"Period end date (ISO 8601)"},"totalValue":{"type":"number","description":"Total aggregated value"},"projectCount":{"type":"number","description":"Number of projects contributing"}},"required":["indicatorId","indicatorName","startDate","endDate","totalValue","projectCount"],"additionalProperties":false},"description":"Aggregated datapoints"}},"required":["id","name","description","unitOfMeasure","totalProjects","aggregatedData"],"additionalProperties":false},"description":"Aggregated indicators"}},"required":["communityUID","timeRange","indicators"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/{referenceNumber}/milestone-completions":{"get":{"summary":"Get Milestone Completions by Application","description":"Get all milestone completions for a funding application","tags":["Milestone Completions"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"referenceNumber"}],"responses":{"200":{"description":"Default Response","schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the milestone completion"},"referenceNumber":{"type":"string","description":"Reference number of the funding application"},"milestoneFieldLabel":{"type":"string","description":"Field label of the milestone from application form"},"milestoneTitle":{"type":"string","description":"Title of the specific milestone"},"completionText":{"type":"string","description":"User completion description for the milestone"},"ownerAddress":{"type":"string","description":"Wallet address of the completion owner"},"isVerified":{"type":"boolean","description":"Whether the completion has been verified"},"verifiedBy":{"type":"string","description":"Wallet address of the reviewer who verified"},"verifiedAt":{"type":"string","description":"Verification timestamp"},"verificationComment":{"type":"string","description":"Optional comment from the reviewer"},"createdAt":{"type":"string","description":"Creation timestamp"},"updatedAt":{"type":"string","description":"Last update timestamp"}},"required":["id","referenceNumber","milestoneFieldLabel","milestoneTitle","completionText","ownerAddress","isVerified","createdAt","updatedAt"],"additionalProperties":false}}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"post":{"summary":"Create Milestone Completion","description":"Create or update milestone completion text. Only application owner can create completions. Cannot update verified milestone completions.","tags":["Milestone Completions"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"milestoneFieldLabel":{"type":"string","minLength":1},"milestoneTitle":{"type":"string","minLength":1},"completionText":{"type":"string","minLength":1}},"required":["milestoneFieldLabel","milestoneTitle","completionText"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"referenceNumber"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string"},"referenceNumber":{"type":"string"},"milestoneFieldLabel":{"type":"string"},"milestoneTitle":{"type":"string"},"completionText":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","referenceNumber","milestoneFieldLabel","milestoneTitle","completionText","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"put":{"summary":"Update Milestone Completion","description":"Update milestone completion text. Milestone identification in request body. Only application owner can update their completions. Cannot update verified milestone completions.","tags":["Milestone Completions"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"milestoneFieldLabel":{"type":"string","minLength":1},"milestoneTitle":{"type":"string","minLength":1},"completionText":{"type":"string","minLength":1,"maxLength":5000}},"required":["milestoneFieldLabel","milestoneTitle","completionText"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"referenceNumber"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the milestone completion"},"referenceNumber":{"type":"string","description":"Reference number of the funding application"},"milestoneFieldLabel":{"type":"string","description":"Field label of the milestone from application form"},"milestoneTitle":{"type":"string","description":"Title of the specific milestone"},"completionText":{"type":"string","description":"User completion description for the milestone"},"createdAt":{"type":"string","description":"Creation timestamp"},"updatedAt":{"type":"string","description":"Last update timestamp"}},"required":["id","referenceNumber","milestoneFieldLabel","milestoneTitle","completionText","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/{referenceNumber}/milestone-completions/{milestoneFieldLabel}/{milestoneTitle}":{"get":{"summary":"Get Milestone Completion by Field and Title","description":"Get specific milestone completion by reference number, field label, and milestone title","tags":["Milestone Completions"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"referenceNumber"},{"type":"string","minLength":1,"required":true,"in":"path","name":"milestoneFieldLabel"},{"type":"string","minLength":1,"required":true,"in":"path","name":"milestoneTitle"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the milestone completion"},"referenceNumber":{"type":"string","description":"Reference number of the funding application"},"milestoneFieldLabel":{"type":"string","description":"Field label of the milestone from application form"},"milestoneTitle":{"type":"string","description":"Title of the specific milestone"},"completionText":{"type":"string","description":"User completion description for the milestone"},"createdAt":{"type":"string","description":"Creation timestamp"},"updatedAt":{"type":"string","description":"Last update timestamp"}},"required":["id","referenceNumber","milestoneFieldLabel","milestoneTitle","completionText","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/milestones/{milestoneUID}/attest-completion":{"post":{"summary":"Attest Milestone Completion as Reviewer","description":"Create on-chain attestation for milestone completion as a program reviewer. This endpoint creates a \"completed\" attestation using the backend admin wallet. Only program reviewers can use this endpoint. If the milestone is already completed or user is not a program reviewer, the request will be rejected. After completion, the frontend should dispatch the verification attestation signed by the current logged-in user.","tags":["Milestone Attestations"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"completionComment":{"type":"string"},"programId":{"type":"string","minLength":1},"chainID":{"type":"integer","minimum":1}},"required":["completionComment","programId","chainID"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"milestoneUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"txHash":{"type":"string"},"attestationUID":{"type":"string"}},"required":["txHash","attestationUID"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/{referenceNumber}/milestones":{"delete":{"summary":"Delete Milestone","description":"Delete a milestone from a funding application. Only milestone reviewers can delete milestones. Removes milestone from application, deletes off-chain completions, and revokes on-chain attestation if exists.","tags":["Milestone Deletion"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"milestoneFieldLabel":{"type":"string","minLength":1},"milestoneTitle":{"type":"string","minLength":1}},"required":["milestoneFieldLabel","milestoneTitle"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"referenceNumber"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"milestoneRemoved":{"type":"boolean","description":"Whether milestone was removed from application"},"completionDeleted":{"type":"boolean","description":"Whether completion record was deleted"},"onChainRevoked":{"type":"boolean","description":"Whether on-chain milestone was revoked"},"onChainTxHash":{"type":"string","description":"Transaction hash of on-chain revocation"}},"required":["milestoneRemoved","completionDeleted","onChainRevoked"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/{referenceNumber}/milestones/{milestoneIndex}":{"put":{"summary":"Edit Milestone Definition","description":"Edit a milestone definition in a funding application. Only the application owner or team members can edit milestones. Verified milestones cannot be edited.","tags":["Milestone Edit"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000},"dueDate":{"type":"string"},"fundingRequested":{"type":"string"},"completionCriteria":{"type":"string","maxLength":5000}},"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"referenceNumber"},{"type":"integer","minimum":0,"required":true,"in":"path","name":"milestoneIndex"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"milestoneIndex":{"type":"number","description":"Index of the updated milestone"},"milestoneFieldLabel":{"type":"string","description":"Field label of the milestone array in application data"},"referenceNumber":{"type":"string","description":"Reference number of the funding application"},"milestone":{"type":"object","additionalProperties":{},"description":"Updated milestone data"},"hasExistingCompletion":{"type":"boolean","description":"Whether the milestone has an existing completion submission"}},"required":["milestoneIndex","milestoneFieldLabel","referenceNumber","milestone","hasExistingCompletion"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/milestones/{milestoneUID}/evaluation":{"get":{"summary":"Get Milestone Evaluation","description":"Get AI evaluations for a milestone","tags":["Milestone Evaluations"],"parameters":[{"type":"string","minLength":1,"pattern":"^0x[a-fA-F0-9]+$","required":true,"in":"path","name":"milestoneUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"evaluations":{"type":"array","items":{"type":"object","properties":{"milestoneUID":{"type":"string"},"rating":{"type":"number"},"reasoning":{"type":"string"},"model":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["milestoneUID","rating","reasoning","model","createdAt"],"additionalProperties":false},"maxItems":100}},"required":["evaluations"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/indicator-datapoints/partner/{source}":{"post":{"summary":"Create Partner Datapoints","description":"Submit indicator datapoints from external partners. Rate limits: 100 requests per minute per API key. Bulk submissions are recommended (up to 1000 datapoints per request).","tags":["Indicator Datapoints"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"submissions":{"type":"array","items":{"type":"object","properties":{"indicatorId":{"type":"string","minLength":1},"projectUID":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"proof":{"type":"string"}},"required":["indicatorId","projectUID","value","startDate","endDate"],"additionalProperties":false},"minItems":1}},"required":["submissions"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"source"}],"responses":{"200":{"description":"Default Response","schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the created datapoint"},"indicatorId":{"type":"string","description":"ID of the indicator"},"projectUID":{"type":"string","description":"UID of the project"},"value":{"type":"string","description":"Value of the datapoint"},"startDate":{"type":"string","description":"Start date in ISO format"},"endDate":{"type":"string","description":"End date in ISO format"},"source":{"type":"string","description":"Source of the datapoint"},"createdAt":{"type":"string","description":"Creation timestamp in ISO format"}},"required":["id","indicatorId","projectUID","value","startDate","endDate","source","createdAt"],"additionalProperties":false}}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/roles/{name}":{"get":{"summary":"Get Role by Name","description":"Get role by name","tags":["Roles"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"name"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string","description":"Role ID"},"name":{"type":"string","description":"Role name"},"description":{"type":"string","description":"Role description"},"permissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Permission ID"},"name":{"type":"string","description":"Permission name"},"description":{"type":"string","description":"Permission description"},"action":{"type":"string","enum":["READ","WRITE","ANY"],"description":"Permission action"},"resourceType":{"type":"string","enum":["PROGRAM","PROJECT","COMMUNITY","GRANT","MILESTONE","APPLICATION","WILDCARD"],"description":"Resource type"}},"required":["id","name","action","resourceType"],"additionalProperties":false},"description":"Role permissions"}},"required":["id","name","permissions"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/roles/":{"get":{"summary":"Get All Roles","description":"Get all roles","tags":["Roles"],"responses":{"200":{"description":"Default Response","schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Role ID"},"name":{"type":"string","description":"Role name"},"description":{"type":"string","description":"Role description"},"permissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Permission ID"},"name":{"type":"string","description":"Permission name"},"description":{"type":"string","description":"Permission description"},"action":{"type":"string","enum":["READ","WRITE","ANY"],"description":"Permission action"},"resourceType":{"type":"string","enum":["PROGRAM","PROJECT","COMMUNITY","GRANT","MILESTONE","APPLICATION","WILDCARD"],"description":"Resource type"}},"required":["id","name","action","resourceType"],"additionalProperties":false},"description":"Role permissions"}},"required":["id","name","permissions"],"additionalProperties":false}}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"post":{"summary":"Create Role","description":"Create a new role","tags":["Roles"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Role name"},"description":{"type":"string","description":"Role description"}},"required":["name"],"additionalProperties":false}}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string","description":"Role ID"},"name":{"type":"string","description":"Role name"},"description":{"type":"string","description":"Role description"}},"required":["id","name"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/roles/{id}":{"put":{"summary":"Update Role","description":"Update role by ID","tags":["Roles"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Role name"},"description":{"type":"string","description":"Role description"}},"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"id"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string","description":"Role ID"},"name":{"type":"string","description":"Role name"},"description":{"type":"string","description":"Role description"}},"required":["id","name"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"delete":{"summary":"Delete Role","description":"Delete role by ID","tags":["Roles"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"id"}],"responses":{"204":{"description":"Role deleted successfully"},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/permissions/{name}":{"get":{"summary":"Get Permission by Name","description":"Get permission by name","tags":["Permissions"],"parameters":[{"type":"string","minLength":1,"description":"Permission name","required":true,"in":"path","name":"name"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string","description":"Permission ID"},"name":{"type":"string","description":"Permission name"},"description":{"type":"string","description":"Permission description"},"action":{"type":"string","enum":["READ","WRITE","ANY"],"description":"Permission action"},"resourceType":{"type":"string","enum":["PROGRAM","PROJECT","COMMUNITY","GRANT","MILESTONE","APPLICATION","WILDCARD"],"description":"Resource type"}},"required":["id","name","action","resourceType"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/permissions/":{"get":{"summary":"Get All Permissions","description":"Get all permissions","tags":["Permissions"],"responses":{"200":{"description":"Default Response","schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Permission ID"},"name":{"type":"string","description":"Permission name"},"description":{"type":"string","description":"Permission description"},"action":{"type":"string","enum":["READ","WRITE","ANY"],"description":"Permission action"},"resourceType":{"type":"string","enum":["PROGRAM","PROJECT","COMMUNITY","GRANT","MILESTONE","APPLICATION","WILDCARD"],"description":"Resource type"}},"required":["id","name","action","resourceType"],"additionalProperties":false}}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"post":{"summary":"Create Permission","description":"Create a new permission","tags":["Permissions"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Permission name"},"description":{"type":"string","description":"Permission description"},"action":{"type":"string","enum":["READ","WRITE","ANY"],"description":"Permission action"},"resourceType":{"type":"string","enum":["PROGRAM","PROJECT","COMMUNITY","GRANT","MILESTONE","APPLICATION","WILDCARD"],"description":"Resource type"},"roleId":{"type":"string","description":"Role ID to attach permission to"}},"required":["name","action","resourceType","roleId"],"additionalProperties":false}}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string","description":"Permission ID"},"name":{"type":"string","description":"Permission name"},"description":{"type":"string","description":"Permission description"},"action":{"type":"string","enum":["READ","WRITE","ANY"],"description":"Permission action"},"resourceType":{"type":"string","enum":["PROGRAM","PROJECT","COMMUNITY","GRANT","MILESTONE","APPLICATION","WILDCARD"],"description":"Resource type"}},"required":["id","name","action","resourceType"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/permissions/{id}":{"put":{"summary":"Update Permission","description":"Update permission by ID","tags":["Permissions"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Permission name"},"description":{"type":"string","description":"Permission description"},"action":{"type":"string","enum":["READ","WRITE","ANY"],"description":"Permission action"},"resourceType":{"type":"string","enum":["PROGRAM","PROJECT","COMMUNITY","GRANT","MILESTONE","APPLICATION","WILDCARD"],"description":"Resource type"}},"additionalProperties":false}},{"type":"string","minLength":1,"description":"Permission ID","required":true,"in":"path","name":"id"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string","description":"Permission ID"},"name":{"type":"string","description":"Permission name"},"description":{"type":"string","description":"Permission description"},"action":{"type":"string","enum":["READ","WRITE","ANY"],"description":"Permission action"},"resourceType":{"type":"string","enum":["PROGRAM","PROJECT","COMMUNITY","GRANT","MILESTONE","APPLICATION","WILDCARD"],"description":"Resource type"}},"required":["id","name","action","resourceType"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"delete":{"summary":"Delete Permission","description":"Delete permission by ID","tags":["Permissions"],"parameters":[{"type":"string","minLength":1,"description":"Permission ID","required":true,"in":"path","name":"id"}],"responses":{"204":{"description":"Permission deleted successfully"},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/permissions/attach":{"post":{"summary":"Attach Permission to Role","description":"Attach permission to role","tags":["Permissions"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"permissionId":{"type":"string","description":"Permission ID"},"roleId":{"type":"string","description":"Role ID"}},"required":["permissionId","roleId"],"additionalProperties":false}}],"responses":{"204":{"description":"Permission attached to role successfully"},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/permissions/detach":{"post":{"summary":"Detach Permission from Role","description":"Detach permission from role","tags":["Permissions"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"permissionId":{"type":"string","description":"Permission ID"},"roleId":{"type":"string","description":"Role ID"}},"required":["permissionId","roleId"],"additionalProperties":false}}],"responses":{"204":{"description":"Permission detached from role successfully"},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/users/{userId}/permissions":{"get":{"summary":"Get User Permissions","description":"Get user permissions for resources","tags":["User Resource Permissions"],"parameters":[{"type":"string","description":"Resource ID","required":false,"in":"query","name":"resourceId"},{"type":"string","enum":["PROGRAM","PROJECT","COMMUNITY","GRANT","MILESTONE","APPLICATION","WILDCARD"],"description":"Resource type","required":false,"in":"query","name":"resourceType"},{"type":"string","minLength":1,"description":"User ID","required":true,"in":"path","name":"userId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"User resource permission ID"},"userId":{"type":"string","description":"User ID"},"resourceId":{"type":"string","description":"Resource ID"},"resourceType":{"type":"string","enum":["PROGRAM","PROJECT","COMMUNITY","GRANT","MILESTONE","APPLICATION","WILDCARD"],"description":"Resource type"},"roles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Role ID"},"name":{"type":"string","description":"Role name"},"description":{"type":"string","description":"Role description"}},"required":["id","name"],"additionalProperties":false},"description":"Assigned roles"}},"required":["id","userId","resourceId","resourceType","roles"],"additionalProperties":false}}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/grant":{"post":{"summary":"Grant Role","description":"Grant role to user for a specific resource","tags":["User Resource Permissions"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID"},"resourceId":{"type":"string","description":"Resource ID"},"resourceType":{"type":"string","enum":["PROGRAM","PROJECT","COMMUNITY","GRANT","MILESTONE","APPLICATION","WILDCARD"],"description":"Resource type"},"roleId":{"type":"string","description":"Role ID"}},"required":["userId","resourceId","resourceType","roleId"],"additionalProperties":false}}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string","description":"User resource permission ID"},"userId":{"type":"string","description":"User ID"},"resourceId":{"type":"string","description":"Resource ID"},"resourceType":{"type":"string","enum":["PROGRAM","PROJECT","COMMUNITY","GRANT","MILESTONE","APPLICATION","WILDCARD"],"description":"Resource type"},"roles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Role ID"},"name":{"type":"string","description":"Role name"},"description":{"type":"string","description":"Role description"}},"required":["id","name"],"additionalProperties":false},"description":"Assigned roles"}},"required":["id","userId","resourceId","resourceType","roles"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/revoke":{"post":{"summary":"Revoke Role","description":"Revoke role from user for a specific resource","tags":["User Resource Permissions"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID"},"resourceId":{"type":"string","description":"Resource ID"},"resourceType":{"type":"string","enum":["PROGRAM","PROJECT","COMMUNITY","GRANT","MILESTONE","APPLICATION","WILDCARD"],"description":"Resource type"},"roleId":{"type":"string","description":"Role ID"}},"required":["userId","resourceId","resourceType","roleId"],"additionalProperties":false}}],"responses":{"204":{"description":"Role revoked successfully"},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/auth/permissions":{"get":{"summary":"Get User Permissions","description":"Get the current user permissions based on their roles and the resource context. Returns roles, permissions, and reviewer types if applicable. If no user is authenticated, returns guest permissions.","tags":["Authorization"],"parameters":[{"type":"string","required":false,"in":"query","name":"communityId"},{"type":"string","required":false,"in":"query","name":"programId"},{"type":"string","required":false,"in":"query","name":"applicationId"},{"type":"string","required":false,"in":"query","name":"milestoneId"},{"type":"number","required":false,"in":"query","name":"chainId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"roles":{"type":"object","properties":{"primaryRole":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"reviewerTypes":{"type":"array","items":{"type":"string"}}},"required":["primaryRole","roles"],"additionalProperties":false},"permissions":{"type":"array","items":{"type":"string"}},"resourceContext":{"type":"object","properties":{"communityId":{"type":"string"},"communityIds":{"type":"array","items":{"type":"string"}},"programId":{"type":"string"},"applicationId":{"type":"string"},"milestoneId":{"type":"string"}},"additionalProperties":false},"isCommunityAdmin":{"type":"boolean"},"isProgramAdmin":{"type":"boolean"},"isReviewer":{"type":"boolean"},"isRegistryAdmin":{"type":"boolean"},"isProgramCreator":{"type":"boolean"}},"required":["roles","permissions","resourceContext","isCommunityAdmin","isProgramAdmin","isReviewer","isRegistryAdmin","isProgramCreator"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/donations/me":{"get":{"summary":"Get My Donations","description":"Get all donations for the authenticated user. Resolves donations by both wallet address and email.","tags":["Donations"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","schema":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Unique donation identifier"},"chainID":{"type":"number","description":"Blockchain network ID"},"donorAddress":{"type":"string","description":"Donor wallet address"},"projectUID":{"type":"string","description":"Project unique identifier"},"projectName":{"type":"string","description":"Project title"},"projectSlug":{"type":"string","description":"Project URL slug"},"payoutAddress":{"type":"string","description":"Payout destination address"},"amount":{"type":"string","description":"Donation amount"},"tokenSymbol":{"type":"string","description":"Token symbol (ETH, USDC, etc)"},"tokenAddress":{"type":"string","description":"Token contract address"},"transactionHash":{"type":"string","description":"Blockchain transaction hash"},"donationType":{"type":"string","enum":["crypto","fiat"],"description":"Payment method type"},"fiatAmount":{"type":"number","description":"Original fiat amount"},"fiatCurrency":{"type":"string","description":"Fiat currency code"},"status":{"type":"string","enum":["pending","completed","failed"],"description":"Transaction status"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","chainID","projectUID","payoutAddress","amount","tokenSymbol","transactionHash","donationType","status","createdAt"],"additionalProperties":false}}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/donations/{uid}/{chainId}/status":{"get":{"summary":"Get Donation Status (Public)","description":"Get donation status by UID and chain ID using a polling token (X-Polling-Token header). Public endpoint for anonymous donation polling.","tags":["Donations"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"uid"},{"type":"integer","minimum":1,"required":true,"in":"path","name":"chainId"},{"in":"header","name":"x-polling-token","required":true,"type":"string"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"status":{"type":"string","enum":["pending","completed","failed"]},"amount":{"type":"string"},"tokenSymbol":{"type":"string"},"transactionHash":{"type":"string"},"fiatAmount":{"type":"number"},"fiatCurrency":{"type":"string"}},"required":["status"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/donations/{uid}/{chainId}":{"get":{"summary":"Get Donation by UID","description":"Get a single donation by UID and chain ID. Only the donor can access their own donation.","tags":["Donations"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"uid"},{"type":"integer","minimum":1,"required":true,"in":"path","name":"chainId"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"uid":{"type":"string","description":"Unique donation identifier"},"chainID":{"type":"number","description":"Blockchain network ID"},"donorAddress":{"type":"string","description":"Donor wallet address"},"projectUID":{"type":"string","description":"Project unique identifier"},"projectName":{"type":"string","description":"Project title"},"projectSlug":{"type":"string","description":"Project URL slug"},"payoutAddress":{"type":"string","description":"Payout destination address"},"amount":{"type":"string","description":"Donation amount"},"tokenSymbol":{"type":"string","description":"Token symbol (ETH, USDC, etc)"},"tokenAddress":{"type":"string","description":"Token contract address"},"transactionHash":{"type":"string","description":"Blockchain transaction hash"},"donationType":{"type":"string","enum":["crypto","fiat"],"description":"Payment method type"},"fiatAmount":{"type":"number","description":"Original fiat amount"},"fiatCurrency":{"type":"string","description":"Fiat currency code"},"status":{"type":"string","enum":["pending","completed","failed"],"description":"Transaction status"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","chainID","projectUID","payoutAddress","amount","tokenSymbol","transactionHash","donationType","status","createdAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/donations/user/{address}":{"get":{"summary":"Get User Donations","description":"Get all donations by user wallet address","tags":["Donations"],"parameters":[{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","required":true,"in":"path","name":"address"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","schema":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Unique donation identifier"},"chainID":{"type":"number","description":"Blockchain network ID"},"donorAddress":{"type":"string","description":"Donor wallet address"},"projectUID":{"type":"string","description":"Project unique identifier"},"projectName":{"type":"string","description":"Project title"},"projectSlug":{"type":"string","description":"Project URL slug"},"payoutAddress":{"type":"string","description":"Payout destination address"},"amount":{"type":"string","description":"Donation amount"},"tokenSymbol":{"type":"string","description":"Token symbol (ETH, USDC, etc)"},"tokenAddress":{"type":"string","description":"Token contract address"},"transactionHash":{"type":"string","description":"Blockchain transaction hash"},"donationType":{"type":"string","enum":["crypto","fiat"],"description":"Payment method type"},"fiatAmount":{"type":"number","description":"Original fiat amount"},"fiatCurrency":{"type":"string","description":"Fiat currency code"},"status":{"type":"string","enum":["pending","completed","failed"],"description":"Transaction status"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","chainID","projectUID","payoutAddress","amount","tokenSymbol","transactionHash","donationType","status","createdAt"],"additionalProperties":false}}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/donations/project/{projectUID}":{"get":{"summary":"Get Project Donations","description":"Get all donations received by a project","tags":["Donations"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"projectUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Unique donation identifier"},"chainID":{"type":"number","description":"Blockchain network ID"},"donorAddress":{"type":"string","description":"Donor wallet address"},"projectUID":{"type":"string","description":"Project unique identifier"},"projectName":{"type":"string","description":"Project title"},"projectSlug":{"type":"string","description":"Project URL slug"},"payoutAddress":{"type":"string","description":"Payout destination address"},"amount":{"type":"string","description":"Donation amount"},"tokenSymbol":{"type":"string","description":"Token symbol (ETH, USDC, etc)"},"tokenAddress":{"type":"string","description":"Token contract address"},"transactionHash":{"type":"string","description":"Blockchain transaction hash"},"donationType":{"type":"string","enum":["crypto","fiat"],"description":"Payment method type"},"fiatAmount":{"type":"number","description":"Original fiat amount"},"fiatCurrency":{"type":"string","description":"Fiat currency code"},"status":{"type":"string","enum":["pending","completed","failed"],"description":"Transaction status"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","chainID","projectUID","payoutAddress","amount","tokenSymbol","transactionHash","donationType","status","createdAt"],"additionalProperties":false}}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/donations/":{"post":{"summary":"Create Donation from Transaction","description":"Create a new donation record from a blockchain transaction. Verifies the transaction on-chain and extracts donation details.","tags":["Donations"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"transactionHash":{"type":"string","minLength":1,"pattern":"^0x[a-fA-F0-9]{64}$"},"chainID":{"type":"number"},"projectUID":{"type":"string","minLength":1}},"required":["transactionHash","chainID","projectUID"],"additionalProperties":false}}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"uid":{"type":"string","description":"Unique donation identifier"},"chainID":{"type":"number","description":"Blockchain network ID"},"donorAddress":{"type":"string","description":"Donor wallet address"},"projectUID":{"type":"string","description":"Project unique identifier"},"projectName":{"type":"string","description":"Project title"},"projectSlug":{"type":"string","description":"Project URL slug"},"payoutAddress":{"type":"string","description":"Payout destination address"},"amount":{"type":"string","description":"Donation amount"},"tokenSymbol":{"type":"string","description":"Token symbol (ETH, USDC, etc)"},"tokenAddress":{"type":"string","description":"Token contract address"},"transactionHash":{"type":"string","description":"Blockchain transaction hash"},"donationType":{"type":"string","enum":["crypto","fiat"],"description":"Payment method type"},"fiatAmount":{"type":"number","description":"Original fiat amount"},"fiatCurrency":{"type":"string","description":"Fiat currency code"},"status":{"type":"string","enum":["pending","completed","failed"],"description":"Transaction status"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","chainID","projectUID","payoutAddress","amount","tokenSymbol","transactionHash","donationType","status","createdAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/settings/available-ai-models":{"get":{"summary":"Get Available AI Models","description":"Get list of available AI models for funding program configuration. This is a public endpoint.","tags":["Settings"],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"models":{"type":"array","items":{"type":"string","minLength":1}}},"required":["models"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/program-registry/search":{"get":{"summary":"Search Programs","description":"Search programs with advanced filters (categories, ecosystems, networks, grant types, etc.)","tags":["Program Registry"],"parameters":[{"allOf":[{"anyOf":[{"not":{}},{"anyOf":[{"type":"string"},{"type":"number"}]}]},{"anyOf":[{"not":{}},{"type":"integer","minimum":1}],"default":1}],"required":false,"in":"query","name":"page"},{"allOf":[{"anyOf":[{"not":{}},{"anyOf":[{"type":"string"},{"type":"number"}]}]},{"anyOf":[{"not":{}},{"type":"integer","minimum":1,"maximum":100}],"default":12}],"required":false,"in":"query","name":"limit"},{"type":"string","required":false,"in":"query","name":"name"},{"type":"string","enum":["accepted","rejected","pending","all"],"default":"accepted","required":false,"in":"query","name":"isValid"},{"type":"string","enum":["active","inactive"],"required":false,"in":"query","name":"status"},{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"required":false,"in":"query","name":"categories"},{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"required":false,"in":"query","name":"ecosystems"},{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"required":false,"in":"query","name":"networks"},{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"required":false,"in":"query","name":"grantTypes"},{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"required":false,"in":"query","name":"communities"},{"anyOf":[{"type":"string"},{"type":"number"}],"required":false,"in":"query","name":"minGrantSize"},{"anyOf":[{"type":"string"},{"type":"number"}],"required":false,"in":"query","name":"maxGrantSize"},{"type":"string","enum":["createdAt","updatedAt","startsAt","endsAt","name"],"default":"updatedAt","required":false,"in":"query","name":"sortField"},{"type":"string","enum":["asc","desc"],"default":"desc","required":false,"in":"query","name":"sortOrder"},{"anyOf":[{"type":"string"},{"type":"boolean"}],"required":false,"in":"query","name":"onlyOnKarma"},{"type":"string","required":false,"in":"query","name":"communityUid"},{"type":"string","required":false,"in":"query","name":"organization"},{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"required":false,"in":"query","name":"type"},{"anyOf":[{"type":"string"},{"type":"boolean"}],"required":false,"in":"query","name":"isActiveFilter"},{"type":"string","required":false,"in":"query","name":"deadlineBefore"},{"type":"string","required":false,"in":"query","name":"deadlineAfter"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"programs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"programId":{"type":"string"},"type":{"type":"string"},"chainID":{"type":"number","nullable":true},"name":{"type":"string","nullable":true},"isValid":{"type":"boolean","nullable":true},"isActive":{"type":"boolean"},"isOnKarma":{"type":"boolean"},"deadline":{"type":"string","nullable":true},"submissionUrl":{"type":"string","nullable":true},"communities":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"imageUrl":{"type":"string"}},"required":["uid"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"metadata":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"shortDescription":{"type":"string"},"logoImg":{"type":"string"},"bannerImg":{"type":"string"},"status":{"type":"string"},"startsAt":{"anyOf":[{"type":"string"},{"type":"number"}]},"endsAt":{"anyOf":[{"type":"string"},{"type":"number"}]},"categories":{"type":"array","items":{"type":"string"}},"ecosystems":{"type":"array","items":{"type":"string"}},"networks":{"type":"array","items":{"type":"string"}},"grantTypes":{"type":"array","items":{"type":"string"}},"organizations":{"type":"array","items":{"type":"string"}},"minGrantSize":{"type":"number"},"maxGrantSize":{"type":"number"},"programBudget":{"anyOf":[{"type":"string"},{"type":"number"}]},"amountDistributedToDate":{"type":"string"},"grantsToDate":{"type":"number"},"currency":{"type":"string"},"communityRef":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"website":{"type":"string"},"projectTwitter":{"type":"string"},"type":{"type":"string"},"platformsUsed":{"type":"array","items":{"type":"string"}},"bugBounty":{"type":"string"},"anyoneCanJoin":{"type":"boolean"},"socialLinks":{"type":"object","properties":{"twitter":{"type":"string"},"discord":{"type":"string"},"github":{"type":"string"},"website":{"type":"string"},"orgWebsite":{"type":"string"},"blog":{"type":"string"},"forum":{"type":"string"},"grantsSite":{"type":"string"},"telegram":{"type":"string"}},"additionalProperties":false},"adminEmails":{"type":"array","items":{"type":"string","format":"email"}},"financeEmails":{"type":"array","items":{"type":"string","format":"email"}},"ingestionSource":{"type":"string","description":"Ingestion source pipeline (staff only)"},"ingestionRunId":{"type":"string","description":"Ingestion run ID for tracing (staff only)"},"rawData":{"type":"object","additionalProperties":{},"description":"Raw data from ingestion source (staff only)"}},"additionalProperties":false},"hackathonMetadata":{"type":"object","additionalProperties":{},"nullable":true},"bountyMetadata":{"type":"object","additionalProperties":{},"nullable":true},"acceleratorMetadata":{"type":"object","additionalProperties":{},"nullable":true},"vcFundMetadata":{"type":"object","additionalProperties":{},"nullable":true},"rfpMetadata":{"type":"object","additionalProperties":{},"nullable":true}},"required":["id","isValid"],"additionalProperties":false}},"count":{"type":"number"},"totalPages":{"type":"number"},"currentPage":{"type":"number"},"hasNext":{"type":"boolean"},"hasPrevious":{"type":"boolean"}},"required":["programs","count","totalPages","currentPage","hasNext","hasPrevious"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/program-registry/types":{"get":{"summary":"Get Program Type Counts","description":"Get count of programs per opportunity type with active counts","tags":["Program Registry"],"parameters":[{"type":"string","enum":["true","false"],"required":false,"in":"query","name":"onlyOnKarma"}],"responses":{"200":{"description":"Default Response","schema":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"count":{"type":"number"},"activeCount":{"type":"number"}},"required":["type","count","activeCount"],"additionalProperties":false}}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/program-registry/filters":{"get":{"summary":"Get Filter Options","description":"Get organization/community filter options for dropdowns","tags":["Program Registry"],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["community","organization"]},"imageUrl":{"type":"string"},"programCount":{"type":"number"}},"required":["id","name","type","programCount"],"additionalProperties":false}}},"required":["options"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/search":{"get":{"summary":"Unified Search","description":"Search across projects and communities. Returns matching projects and communities based on the query string. Searches by title/name, slug, and description.","tags":["Search"],"parameters":[{"type":"string","minLength":3,"description":"Search query string (minimum 3 characters). Searches projects by title, slug, or description and communities by name, slug, or description.","required":true,"in":"query","name":"q"},{"allOf":[{"anyOf":[{"not":{}},{"anyOf":[{"type":"string"},{"type":"number"}]}]},{"type":"integer","minimum":1,"maximum":50}],"description":"Maximum number of results to return per type (1-50, default: 10)","required":false,"in":"query","name":"limit"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"projects":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string"},"chainID":{"type":"number"},"title":{"type":"string","nullable":true},"slug":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"logoUrl":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":true}},"required":["uid","chainID","title","slug","description","logoUrl","createdAt"],"additionalProperties":false}},"communities":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string"},"chainID":{"type":"number"},"name":{"type":"string","nullable":true},"slug":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"imageUrl":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":true}},"required":["uid","chainID","name","slug","description","imageUrl","createdAt"],"additionalProperties":false}}},"required":["projects","communities"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/user/communities/admin":{"get":{"summary":"Get Admin Communities","description":"Get communities where the authenticated user is an admin. Requires authentication.","tags":["User"],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"communities":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string"},"chainID":{"type":"number"},"details":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string","nullable":true},"imageURL":{"type":"string","nullable":true}},"required":["name","slug","description","imageURL"],"additionalProperties":false}},"required":["uid","chainID","details"],"additionalProperties":false}}},"required":["communities"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/user/projects":{"get":{"summary":"Get User Projects","description":"Get projects owned by or where the authenticated user is a member. Requires authentication.","tags":["User"],"parameters":[{"type":"integer","minimum":1,"default":1,"required":false,"in":"query","name":"page"},{"type":"integer","minimum":1,"maximum":100,"default":20,"required":false,"in":"query","name":"limit"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"projects":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Project unique identifier"},"chainID":{"type":"number","description":"Blockchain chain ID"},"owner":{"type":"string","description":"Project owner address"},"payoutAddress":{"type":"string","description":"Payout wallet address"},"chainPayoutAddress":{"type":"object","additionalProperties":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"nullable":true,"description":"Chain-specific payout wallet addresses"},"details":{"type":"object","properties":{"title":{"type":"string","description":"Project title"},"description":{"type":"string","description":"Project description"},"problem":{"type":"string","description":"Problem statement"},"solution":{"type":"string","description":"Solution description"},"missionSummary":{"type":"string","description":"Mission summary"},"locationOfImpact":{"type":"string","nullable":true,"description":"Location of impact"},"slug":{"type":"string","description":"Project slug"},"logoUrl":{"type":"string","nullable":true,"description":"Logo URL"},"businessModel":{"type":"string","nullable":true,"description":"Business model"},"stageIn":{"type":"string","nullable":true,"description":"Current stage"},"raisedMoney":{"type":"string","nullable":true,"description":"Raised money information"},"pathToTake":{"type":"string","nullable":true,"description":"Path to take"},"tags":{"type":"array","items":{"type":"string"},"description":"Project tags"},"links":{"type":"array","description":"External links","items":{}},"lastDetailsUpdate":{"type":"string","nullable":true,"description":"Last details update timestamp"}},"required":["title","description","slug","tags","links","lastDetailsUpdate"],"additionalProperties":false,"description":"Project details"},"external":{"type":"object","properties":{"gitcoin":{"description":"Gitcoin data"},"oso":{"description":"OSO data"},"divvi_wallets":{"description":"Divvi wallets data"},"github":{"description":"GitHub data"},"network_addresses":{"description":"Network addresses data"},"network_addresses_verified":{"description":"Network addresses that were verified by deployer"}},"additionalProperties":false,"description":"External integrations"},"members":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"Member wallet address"},"role":{"type":"string","description":"Member role"},"joinedAt":{"type":"string","description":"Join timestamp"}},"required":["address","role","joinedAt"],"additionalProperties":false},"description":"Project members"},"endorsements":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Endorsement unique identifier"},"endorsedBy":{"type":"string","description":"Endorser address"},"comment":{"type":"string","description":"Endorsement comment"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","endorsedBy","comment","createdAt"],"additionalProperties":false},"description":"Project endorsements"},"milestones":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Milestone unique identifier"},"title":{"type":"string","description":"Milestone title"},"description":{"type":"string","description":"Milestone description"},"dueDate":{"type":"string","description":"Due date"},"currentStatus":{"type":"string","description":"Current status"},"statusUpdatedAt":{"type":"string","description":"Status update timestamp"},"completed":{"type":"object","properties":{"timestamp":{"type":"string","description":"Completion timestamp"},"attestationUID":{"type":"string","description":"Attestation unique identifier"},"proofOfWork":{"type":"string","description":"Proof of work"},"reason":{"type":"string","description":"Completion reason"},"attester":{"type":"string","description":"Attester address"}},"required":["timestamp","attestationUID","proofOfWork","attester"],"additionalProperties":false,"nullable":true,"description":"Completion details"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","title","description","dueDate","currentStatus","statusUpdatedAt","completed","createdAt"],"additionalProperties":false},"description":"Project milestones"},"impacts":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Impact unique identifier"},"work":{"type":"string","description":"Work description"},"proof":{"type":"string","description":"Proof of impact"},"impact":{"type":"string","description":"Impact description"},"verified":{"type":"boolean","description":"Verification status"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","work","proof","impact","verified","createdAt"],"additionalProperties":false},"description":"Project impacts"},"updates":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Update unique identifier"},"title":{"type":"string","description":"Update title"},"text":{"type":"string","description":"Update text"},"startDate":{"type":"string","description":"Start date"},"endDate":{"type":"string","description":"End date"},"grants":{"type":"array","description":"Related grants","items":{}},"indicators":{"type":"array","description":"Progress indicators","items":{}},"deliverables":{"type":"array","description":"Deliverables","items":{}},"verified":{"type":"boolean","description":"Verification status"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","title","text","startDate","endDate","grants","indicators","deliverables","verified","createdAt"],"additionalProperties":false},"description":"Project updates"},"communities":{"type":"array","description":"Associated communities","items":{}},"pointers":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"Pointer unique identifier"},"originalProjectUID":{"type":"string","description":"Original project UID"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["uid","originalProjectUID","createdAt"],"additionalProperties":false},"description":"Project pointers (merged projects)"},"createdAt":{"type":"string","description":"Project creation timestamp"},"updatedAt":{"type":"string","description":"Project last update timestamp"},"stats":{"type":"object","properties":{"grantsCount":{"type":"number","description":"Number of grants received"},"grantMilestonesCount":{"type":"number","description":"Total milestones across all grants"},"roadmapItemsCount":{"type":"number","description":"Number of project milestones (roadmap items)"}},"required":["grantsCount","grantMilestonesCount","roadmapItemsCount"],"additionalProperties":false,"description":"Project statistics (only included when includeStats=true)"},"grants":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string"},"chainID":{"type":"number"},"type":{"type":"string","enum":["Grant"]},"refUID":{"type":"string"},"projectUID":{"type":"string"},"communityUID":{"type":"string"},"programId":{"type":"string","nullable":true},"programType":{"type":"string","enum":["grant","hackathon","bounty","accelerator","vc_fund","rfp"]},"originalProjectUID":{"type":"string","nullable":true},"data":{"type":"object","properties":{"communityUID":{"type":"string"}},"additionalProperties":false},"details":{"type":"object","properties":{"title":{"type":"string"},"amount":{"type":"string"},"currency":{"type":"string"},"description":{"type":"string"},"proposalURL":{"type":"string"},"startDate":{"type":"string","nullable":true},"receivedDate":{"type":"string","nullable":true},"payoutAddress":{"type":"string"},"questions":{"type":"array","items":{}},"selectedTrackIds":{"type":"array","items":{"type":"string"}},"isCompleted":{"type":"boolean"},"completedAt":{"type":"string","nullable":true},"lastDetailsUpdate":{"type":"string"},"programId":{"type":"string"},"data":{"type":"object","properties":{"title":{"type":"string"},"amount":{"type":"string"},"description":{"type":"string"},"proposalURL":{"type":"string"},"startDate":{"type":"number"},"receivedDate":{"type":"number"},"payoutAddress":{"type":"string"},"questions":{"type":"array","items":{}},"programId":{"type":"string"},"type":{"type":"string","enum":["grant-details"]},"selectedTrackIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}},"required":["title"],"additionalProperties":false,"nullable":true},"milestones":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string"},"chainID":{"type":"number"},"refUID":{"type":"string"},"type":{"type":"string","enum":["Milestone"]},"title":{"type":"string"},"description":{"type":"string"},"endsAt":{"type":"number"},"startsAt":{"type":"number"},"priority":{"type":"number"},"currentStatus":{"type":"string"},"statusUpdatedAt":{"type":"string"},"statusHistory":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"statusReason":{"type":"string"}},"required":["status","updatedAt"],"additionalProperties":false}},"completed":{"type":"object","properties":{"uid":{"type":"string"},"chainID":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"data":{"type":"object","properties":{"reason":{"type":"string"},"proofOfWork":{"type":"string"},"completionPercentage":{"type":"number"},"deliverables":{"type":"array","items":{}}},"additionalProperties":false}},"additionalProperties":false,"nullable":true},"verified":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string"},"attester":{"type":"string"},"reason":{"type":"string"},"createdAt":{"type":"string"}},"required":["uid","attester","createdAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"data":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"endsAt":{"type":"number"},"startsAt":{"type":"number"},"priority":{"type":"number"},"type":{"type":"string","enum":["milestone"]}},"additionalProperties":false},"invoiceInfo":{"type":"object","properties":{"status":{"type":"string"},"receivedAt":{"type":"string","nullable":true},"fileKey":{"type":"string","nullable":true}},"required":["status","receivedAt","fileKey"],"additionalProperties":false,"nullable":true}},"required":["uid","chainID","title","description","currentStatus","verified"],"additionalProperties":false}},"updates":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string"},"chainID":{"type":"number"},"refUID":{"type":"string"},"type":{"type":"string","enum":["GrantUpdate"]},"title":{"type":"string"},"text":{"type":"string"},"proofOfWork":{"type":"string"},"completionPercentage":{"type":"string"},"currentStatus":{"type":"string"},"statusUpdatedAt":{"type":"string"},"verified":{"type":"array","items":{"$ref":"#/properties/projects/items/properties/grants/items/properties/milestones/items/properties/verified/items"}},"createdAt":{"type":"string"},"data":{"type":"object","properties":{"title":{"type":"string"},"text":{"type":"string"},"proofOfWork":{"type":"string"},"type":{"type":"string","enum":["grant-update"]}},"additionalProperties":false}},"required":["uid","chainID","refUID","verified"],"additionalProperties":false}},"completed":{"type":"object","properties":{"uid":{"type":"string"},"createdAt":{"type":"string","nullable":true},"data":{"type":"object","properties":{"title":{"type":"string"},"text":{"type":"string"},"proofOfWork":{"type":"string"},"pitchDeckLink":{"type":"string"},"demoVideoLink":{"type":"string"},"trackExplanations":{"type":"array","items":{"type":"object","properties":{"trackUID":{"type":"string"},"explanation":{"type":"string"}},"required":["trackUID","explanation"],"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false,"nullable":true},"community":{"type":"object","properties":{"uid":{"type":"string"},"chainID":{"type":"number"},"details":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"imageURL":{"type":"string"},"slug":{"type":"string"}},"additionalProperties":false}},"required":["uid","chainID"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["uid","chainID","projectUID","communityUID","milestones","updates","createdAt","updatedAt"],"additionalProperties":false}}},"required":["uid","chainID","owner","chainPayoutAddress","details","external","members","endorsements","milestones","impacts","updates","communities","pointers"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"page":{"type":"number"},"limit":{"type":"number"},"total":{"type":"number"},"totalPages":{"type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["projects","pagination"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/user/profiles":{"get":{"summary":"Get User Profiles by Addresses","description":"Get user profiles (name, email) for a batch of wallet addresses. Returns only profiles that exist.","tags":["User"],"parameters":[{"type":"string","required":true,"in":"query","name":"addresses"}],"responses":{"200":{"description":"Default Response","schema":{"type":"array","items":{"type":"object","properties":{"publicAddress":{"type":"string","description":"Wallet address"},"name":{"type":"string","description":"Display name"},"email":{"type":"string","description":"Email address"}},"required":["publicAddress","name","email"],"additionalProperties":false}}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/user/resolve-email":{"post":{"summary":"Resolve Email to Wallet Address","description":"Resolve an email address to an EVM wallet address, creating a Privy user with an embedded wallet if one does not already exist. Requires authentication.","tags":["User"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"name":{"type":"string","minLength":1}},"required":["email"],"additionalProperties":false}}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"walletAddress":{"type":"string","description":"Resolved EVM wallet address for the email"},"isNewUser":{"type":"boolean","description":"Whether the user was newly created in Privy"}},"required":["walletAddress","isNewUser"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/tracks":{"get":{"summary":"List Tracks","description":"Get all tracks for a community. Optionally include archived tracks.","tags":["Tracks"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"query","name":"communityUID"},{"type":"boolean","default":false,"required":false,"in":"query","name":"includeArchived"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"communityUID":{"type":"string"},"isArchived":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","communityUID","isArchived","createdAt","updatedAt"],"additionalProperties":false}}},"required":["tracks"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"post":{"summary":"Create Track","description":"Create a new track for a community. Requires authentication.","tags":["Tracks"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"communityUID":{"type":"string","minLength":1}},"required":["name","communityUID"],"additionalProperties":false}}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"communityUID":{"type":"string"},"isArchived":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","communityUID","isArchived","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/tracks/{id}":{"get":{"summary":"Get Track by ID","description":"Get a track by its ID.","tags":["Tracks"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"id"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"communityUID":{"type":"string"},"isArchived":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","communityUID","isArchived","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"put":{"summary":"Update Track","description":"Update a track. Requires authentication.","tags":["Tracks"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"}},"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"id"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"communityUID":{"type":"string"},"isArchived":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","communityUID","isArchived","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"delete":{"summary":"Archive Track","description":"Archive (soft delete) a track. Requires authentication.","tags":["Tracks"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"id"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"communityUID":{"type":"string"},"isArchived":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","communityUID","isArchived","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/programs/{programId}/tracks":{"get":{"summary":"Get Program Tracks","description":"Get all tracks assigned to a program.","tags":["Tracks"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"communityUID":{"type":"string"},"isArchived":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","communityUID","isArchived","createdAt","updatedAt"],"additionalProperties":false}}},"required":["tracks"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"post":{"summary":"Assign Tracks to Program","description":"Assign tracks to a program. Requires authentication.","tags":["Tracks"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"trackIds":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["trackIds"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"}],"responses":{"200":{"description":"Default Response"}}}},"/v2/programs/{programId}/tracks/{trackId}":{"delete":{"summary":"Unassign Track from Program","description":"Remove a track from a program. Requires authentication.","tags":["Tracks"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"},{"type":"string","minLength":1,"required":true,"in":"path","name":"trackId"}],"responses":{"200":{"description":"Default Response"}}}},"/v2/projects/{projectId}/programs/{programId}/tracks":{"get":{"summary":"Get Project Tracks","description":"Get tracks assigned to a project for a specific program.","tags":["Tracks"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"projectId"},{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectUID":{"type":"string"},"trackId":{"type":"string"},"programId":{"type":"string"},"isActive":{"type":"boolean"},"track":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"communityUID":{"type":"string"},"isArchived":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","communityUID","isArchived","createdAt","updatedAt"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","projectUID","trackId","programId","isActive","createdAt"],"additionalProperties":false}}},"required":["tracks"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/projects/{projectId}/tracks":{"post":{"summary":"Assign Tracks to Project","description":"Assign tracks to a project for a specific program. Requires authentication.","tags":["Tracks"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"programId":{"type":"string","minLength":1},"trackIds":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["programId","trackIds"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"projectId"}],"responses":{"200":{"description":"Default Response"}}}},"/v2/programs/{programId}/projects/{projectId}/tracks":{"delete":{"summary":"Unassign Tracks from Project","description":"Remove tracks from a project for a specific program. Requires authentication.","tags":["Tracks"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"trackIds":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["trackIds"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"},{"type":"string","minLength":1,"required":true,"in":"path","name":"projectId"}],"responses":{"200":{"description":"Default Response"}}}},"/v2/communities/{communityId}/programs/{programId}/projects":{"get":{"summary":"Get Projects by Track","description":"Get projects by track for a community and program. Optionally filter by track ID.","tags":["Tracks"],"parameters":[{"type":"string","required":false,"in":"query","name":"trackId"},{"type":"string","minLength":1,"required":true,"in":"path","name":"communityId"},{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"projects":{"type":"array","items":{"type":"object","properties":{"projectUID":{"type":"string"},"programId":{"type":"string"},"track":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"communityUID":{"type":"string"},"isArchived":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","communityUID","isArchived","createdAt","updatedAt"],"additionalProperties":false},"project":{"type":"object","properties":{"uid":{"type":"string"},"chainID":{"type":"number"},"title":{"type":"string"},"slug":{"type":"string"},"logoUrl":{"type":"string","nullable":true}},"required":["uid","chainID","title","slug","logoUrl"],"additionalProperties":false}},"required":["projectUID","programId","track","project"],"additionalProperties":false}}},"required":["projects"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/registry/":{"get":{"summary":"Search Registry Programs","description":"Search and list registry programs (funding map). Supports filtering by status, categories, ecosystems, networks, grant types, and more.","tags":["Registry"],"parameters":[{"allOf":[{"anyOf":[{"not":{}},{"anyOf":[{"type":"string"},{"type":"number"}]}]},{"anyOf":[{"not":{}},{"type":"integer","minimum":1}],"default":1}],"description":"Page number (default: 1)","required":false,"in":"query","name":"page"},{"allOf":[{"anyOf":[{"not":{}},{"anyOf":[{"type":"string"},{"type":"number"}]}]},{"anyOf":[{"not":{}},{"type":"integer","minimum":1,"maximum":100}],"default":12}],"description":"Number of results per page (1-100, default: 12)","required":false,"in":"query","name":"limit"},{"type":"string","description":"Search by program name/title","required":false,"in":"query","name":"name"},{"type":"string","enum":["accepted","rejected","pending","all"],"default":"accepted","description":"Filter by validity status (default: accepted)","required":false,"in":"query","name":"isValid"},{"type":"string","enum":["active","inactive"],"description":"Filter by program status based on dates","required":false,"in":"query","name":"status"},{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Filter by categories (comma-separated)","required":false,"in":"query","name":"categories"},{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Filter by ecosystems (comma-separated)","required":false,"in":"query","name":"ecosystems"},{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Filter by networks (comma-separated)","required":false,"in":"query","name":"networks"},{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Filter by grant types (comma-separated)","required":false,"in":"query","name":"grantTypes"},{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Filter by communities (comma-separated)","required":false,"in":"query","name":"communities"},{"anyOf":[{"type":"string"},{"type":"number"}],"description":"Minimum grant size","required":false,"in":"query","name":"minGrantSize"},{"anyOf":[{"type":"string"},{"type":"number"}],"description":"Maximum grant size","required":false,"in":"query","name":"maxGrantSize"},{"type":"string","enum":["createdAt","updatedAt","startsAt","endsAt","name"],"default":"updatedAt","description":"Field to sort by (default: updatedAt)","required":false,"in":"query","name":"sortField"},{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort order (default: desc)","required":false,"in":"query","name":"sortOrder"},{"anyOf":[{"type":"string"},{"type":"boolean"}],"description":"Filter to only show programs that are on Karma (have a funding config)","required":false,"in":"query","name":"onlyOnKarma"},{"type":"string","description":"Filter by community UID (from communityRef)","required":false,"in":"query","name":"communityUid"},{"type":"string","description":"Filter by organization name (from metadata.organizations)","required":false,"in":"query","name":"organization"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"programs":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"object","properties":{"$oid":{"type":"string"}},"required":["$oid"],"additionalProperties":false},"programId":{"type":"string"},"chainID":{"type":"number"},"name":{"type":"string"},"isValid":{"type":"boolean"},"isOnKarma":{"type":"boolean"},"communities":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"imageUrl":{"type":"string"}},"required":["uid"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"metadata":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"shortDescription":{"type":"string"},"logoImg":{"type":"string"},"logoImgData":{"type":"string"},"bannerImg":{"type":"string"},"bannerImgData":{"type":"string"},"status":{"type":"string"},"startsAt":{"anyOf":[{"type":"string"},{"type":"number"}]},"endsAt":{"anyOf":[{"type":"string"},{"type":"number"}]},"categories":{"type":"array","items":{"type":"string"}},"ecosystems":{"type":"array","items":{"type":"string"}},"networks":{"type":"array","items":{"type":"string"}},"grantTypes":{"type":"array","items":{"type":"string"}},"organizations":{"type":"array","items":{"type":"string"}},"minGrantSize":{"type":"number"},"maxGrantSize":{"type":"number"},"programBudget":{"anyOf":[{"type":"string"},{"type":"number"}]},"amountDistributedToDate":{"type":"string"},"currency":{"type":"string"},"grantsToDate":{"type":"number"},"website":{"type":"string"},"projectTwitter":{"type":"string"},"blog":{"type":"string"},"forum":{"type":"string"},"discord":{"type":"string"},"socialLinks":{"type":"object","additionalProperties":{"type":"string"}},"communityRef":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"type":{"type":"string"},"platformsUsed":{"type":"array","items":{"type":"string"}},"bugBounty":{"type":"string"}},"additionalProperties":false}},"required":["_id","isValid"],"additionalProperties":false}},"count":{"type":"number"},"totalPages":{"type":"number"},"currentPage":{"type":"number"},"hasNext":{"type":"boolean"},"hasPrevious":{"type":"boolean"}},"required":["programs","count","totalPages","currentPage","hasNext","hasPrevious"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/registry/filters":{"get":{"summary":"Get Organization Filters","description":"Get available organization/community filters for the funding map. Returns a list of communities and organizations that have programs, sorted by program count.","tags":["Registry"],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier - community uid or organization name"},"name":{"type":"string","description":"Display name"},"type":{"type":"string","enum":["community","organization"],"description":"Type of filter option"},"imageUrl":{"type":"string","description":"Community image URL (only for communities)"},"programCount":{"type":"number","description":"Number of programs with this organization/community"}},"required":["id","name","type","programCount"],"additionalProperties":false}}},"required":["options"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/registry/{programId}/{chainId}":{"get":{"summary":"Get Registry Program by ID","description":"Get a single registry program by program ID and chain ID","tags":["Registry"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"},{"allOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"integer","minimum":1}],"required":true,"in":"path","name":"chainId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"_id":{"type":"object","properties":{"$oid":{"type":"string"}},"required":["$oid"],"additionalProperties":false},"programId":{"type":"string"},"chainID":{"type":"number"},"name":{"type":"string"},"isValid":{"type":"boolean"},"isOnKarma":{"type":"boolean"},"communities":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"imageUrl":{"type":"string"}},"required":["uid"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"metadata":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"shortDescription":{"type":"string"},"logoImg":{"type":"string"},"logoImgData":{"type":"string"},"bannerImg":{"type":"string"},"bannerImgData":{"type":"string"},"status":{"type":"string"},"startsAt":{"anyOf":[{"type":"string"},{"type":"number"}]},"endsAt":{"anyOf":[{"type":"string"},{"type":"number"}]},"categories":{"type":"array","items":{"type":"string"}},"ecosystems":{"type":"array","items":{"type":"string"}},"networks":{"type":"array","items":{"type":"string"}},"grantTypes":{"type":"array","items":{"type":"string"}},"organizations":{"type":"array","items":{"type":"string"}},"minGrantSize":{"type":"number"},"maxGrantSize":{"type":"number"},"programBudget":{"anyOf":[{"type":"string"},{"type":"number"}]},"amountDistributedToDate":{"type":"string"},"currency":{"type":"string"},"grantsToDate":{"type":"number"},"website":{"type":"string"},"projectTwitter":{"type":"string"},"blog":{"type":"string"},"forum":{"type":"string"},"discord":{"type":"string"},"socialLinks":{"type":"object","additionalProperties":{"type":"string"}},"communityRef":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"type":{"type":"string"},"platformsUsed":{"type":"array","items":{"type":"string"}},"bugBounty":{"type":"string"}},"additionalProperties":false}},"required":["_id","isValid"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/onramp/transactions/{provider}/{orderId}":{"get":{"description":"Get transaction status for an onramp session","tags":["Onramp"],"parameters":[{"type":"string","enum":["stripe"],"required":true,"in":"path","name":"provider"},{"type":"string","minLength":1,"required":true,"in":"path","name":"orderId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"status":{"type":"string","enum":["pending","success","failed","NOT_FOUND","unknown"]},"purchaseAmount":{"type":"string"},"purchaseCurrency":{"type":"string"},"paymentTotal":{"type":"string"},"paymentCurrency":{"type":"string"},"txHash":{"type":"string"},"txLink":{"type":"string"},"transactionId":{"type":"string"},"network":{"type":"string"},"cryptoAmount":{"type":"string"},"cryptoCurrency":{"type":"string"}},"required":["status"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/onramp/session":{"post":{"description":"Create an onramp session for fiat-to-crypto donation","tags":["Onramp"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"provider":{"type":"string","enum":["stripe"]},"projectUid":{"type":"string","minLength":1},"payoutAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"fiatAmount":{"type":"number","minimum":0.01},"fiatCurrency":{"type":"string","minLength":3,"maxLength":3},"network":{"type":"string","minLength":1},"targetAsset":{"type":"string","minLength":1},"donorAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"donorEmail":{"type":"string","format":"email"},"country":{"type":"string","minLength":2,"maxLength":2},"redirectUrl":{"type":"string","format":"uri"}},"required":["provider","projectUid","payoutAddress","fiatAmount","fiatCurrency","network","targetAsset"],"additionalProperties":false}}],"security":[{"bearerAuth":[]},{}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"sessionToken":{"type":"string"},"sessionId":{"type":"string"},"donationUid":{"type":"string"},"pollingToken":{"type":"string"},"expiresAt":{"type":"string"},"onrampUrl":{"type":"string"}},"required":["sessionToken","sessionId","donationUid","pollingToken","expiresAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/onramp/webhook/{provider}":{"head":{"description":"Webhook endpoint verification","tags":["Onramp","Webhooks"],"parameters":[{"type":"string","enum":["stripe"],"required":true,"in":"path","name":"provider"}],"responses":{"200":{"description":"Default Response"}}},"post":{"description":"Webhook endpoint for onramp provider callbacks","tags":["Onramp","Webhooks"],"parameters":[{"type":"string","enum":["stripe"],"required":true,"in":"path","name":"provider"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"received":{"type":"boolean"}},"required":["received"],"additionalProperties":false}}}}},"/v2/payouts/disburse":{"post":{"summary":"Create Disbursements","description":"Create payout disbursement records for multiple grants","tags":["Payout Disbursements"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"grants":{"type":"array","items":{"type":"object","properties":{"grantUID":{"type":"string","minLength":1},"projectUID":{"type":"string","minLength":1},"amount":{"type":"string","minLength":1},"payoutAddress":{"type":"string","minLength":1},"milestoneBreakdown":{"type":"object","additionalProperties":{"type":"string"}},"paidAllocationIds":{"type":"array","items":{"type":"string"},"maxItems":100}},"required":["grantUID","projectUID","amount","payoutAddress"],"additionalProperties":false},"minItems":1,"maxItems":100},"communityUID":{"type":"string","minLength":1},"chainID":{"type":"integer","minimum":1},"safeAddress":{"type":"string","minLength":1},"token":{"type":"string","minLength":1},"tokenAddress":{"type":"string","minLength":1},"tokenDecimals":{"type":"integer","minimum":0,"maximum":18}},"required":["grants","communityUID","chainID","safeAddress","token","tokenAddress","tokenDecimals"],"additionalProperties":false}}],"responses":{"201":{"description":"Default Response","schema":{"type":"object","properties":{"disbursements":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"grantUID":{"type":"string"},"projectUID":{"type":"string"},"communityUID":{"type":"string"},"chainID":{"type":"number"},"safeAddress":{"type":"string"},"safeTransactionHash":{"type":"string","nullable":true},"disbursedAmount":{"type":"string"},"tokenDecimals":{"type":"number"},"token":{"type":"string"},"tokenAddress":{"type":"string"},"payoutAddress":{"type":"string"},"milestoneBreakdown":{"type":"object","additionalProperties":{"type":"string"},"nullable":true},"paidAllocationIds":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["CONFIGURED","PENDING","AWAITING_SIGNATURES","DISBURSED","CANCELLED","FAILED"]},"executedAt":{"type":"string","nullable":true},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"metadata":{"type":"object","properties":{"notes":{"type":"string"},"safeTransactionUrl":{"type":"string"},"milestoneLabels":{"type":"object","additionalProperties":{"type":"string","maxLength":500}},"cancellationReason":{"type":"string"},"errorMessage":{"type":"string"}},"additionalProperties":false,"nullable":true}},"required":["id","grantUID","projectUID","communityUID","chainID","safeAddress","safeTransactionHash","disbursedAmount","tokenDecimals","token","tokenAddress","payoutAddress","milestoneBreakdown","paidAllocationIds","status","executedAt","createdBy","createdAt","updatedAt"],"additionalProperties":false}}},"required":["disbursements"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/payouts/{disbursementId}/record-safe-tx":{"post":{"summary":"Record Safe Transaction","description":"Record Safe transaction hash for a disbursement","tags":["Payout Disbursements"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"safeTransactionHash":{"type":"string","minLength":1},"nonce":{"type":"integer","minimum":0}},"required":["safeTransactionHash"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"disbursementId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string"},"grantUID":{"type":"string"},"projectUID":{"type":"string"},"communityUID":{"type":"string"},"chainID":{"type":"number"},"safeAddress":{"type":"string"},"safeTransactionHash":{"type":"string","nullable":true},"disbursedAmount":{"type":"string"},"tokenDecimals":{"type":"number"},"token":{"type":"string"},"tokenAddress":{"type":"string"},"payoutAddress":{"type":"string"},"milestoneBreakdown":{"type":"object","additionalProperties":{"type":"string"},"nullable":true},"paidAllocationIds":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["CONFIGURED","PENDING","AWAITING_SIGNATURES","DISBURSED","CANCELLED","FAILED"]},"executedAt":{"type":"string","nullable":true},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"metadata":{"type":"object","properties":{"notes":{"type":"string"},"safeTransactionUrl":{"type":"string"},"milestoneLabels":{"type":"object","additionalProperties":{"type":"string","maxLength":500}},"cancellationReason":{"type":"string"},"errorMessage":{"type":"string"}},"additionalProperties":false,"nullable":true}},"required":["id","grantUID","projectUID","communityUID","chainID","safeAddress","safeTransactionHash","disbursedAmount","tokenDecimals","token","tokenAddress","payoutAddress","milestoneBreakdown","paidAllocationIds","status","executedAt","createdBy","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/payouts/grant/{grantUID}/history":{"get":{"summary":"Get Grant Payout History","description":"Get payout history for a specific grant","tags":["Payout Disbursements"],"parameters":[{"type":"integer","minimum":1,"default":1,"required":false,"in":"query","name":"page"},{"type":"integer","minimum":1,"maximum":100,"default":10,"required":false,"in":"query","name":"limit"},{"type":"string","minLength":1,"required":true,"in":"path","name":"grantUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"payload":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"grantUID":{"type":"string"},"projectUID":{"type":"string"},"communityUID":{"type":"string"},"chainID":{"type":"number"},"safeAddress":{"type":"string"},"safeTransactionHash":{"type":"string","nullable":true},"disbursedAmount":{"type":"string"},"tokenDecimals":{"type":"number"},"token":{"type":"string"},"tokenAddress":{"type":"string"},"payoutAddress":{"type":"string"},"milestoneBreakdown":{"type":"object","additionalProperties":{"type":"string"},"nullable":true},"paidAllocationIds":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["CONFIGURED","PENDING","AWAITING_SIGNATURES","DISBURSED","CANCELLED","FAILED"]},"executedAt":{"type":"string","nullable":true},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"metadata":{"type":"object","properties":{"notes":{"type":"string"},"safeTransactionUrl":{"type":"string"},"milestoneLabels":{"type":"object","additionalProperties":{"type":"string","maxLength":500}},"cancellationReason":{"type":"string"},"errorMessage":{"type":"string"}},"additionalProperties":false,"nullable":true}},"required":["id","grantUID","projectUID","communityUID","chainID","safeAddress","safeTransactionHash","disbursedAmount","tokenDecimals","token","tokenAddress","payoutAddress","milestoneBreakdown","paidAllocationIds","status","executedAt","createdBy","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"totalCount":{"type":"number","description":"Total number of items"},"page":{"type":"number","description":"Current page number"},"limit":{"type":"number","description":"Items per page"},"totalPages":{"type":"number","description":"Total number of pages"},"nextPage":{"type":"number","nullable":true,"description":"Next page number"},"prevPage":{"type":"number","nullable":true,"description":"Previous page number"},"hasNextPage":{"type":"boolean","description":"Whether there is a next page"},"hasPrevPage":{"type":"boolean","description":"Whether there is a previous page"}},"required":["totalCount","page","limit","totalPages","nextPage","prevPage","hasNextPage","hasPrevPage"],"additionalProperties":false}},"required":["payload","pagination"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/payouts/grant/{grantUID}/total-disbursed":{"get":{"summary":"Get Total Disbursed","description":"Get total disbursed amount for a grant","tags":["Payout Disbursements"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"grantUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"totalDisbursed":{"type":"string"}},"required":["totalDisbursed"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/payouts/community/{communityUID}/pending":{"get":{"summary":"Get Pending Disbursements","description":"Get pending disbursements for a community","tags":["Payout Disbursements"],"parameters":[{"type":"integer","minimum":1,"default":1,"required":false,"in":"query","name":"page"},{"type":"integer","minimum":1,"maximum":100,"default":10,"required":false,"in":"query","name":"limit"},{"type":"string","minLength":1,"required":true,"in":"path","name":"communityUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"payload":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"grantUID":{"type":"string"},"projectUID":{"type":"string"},"communityUID":{"type":"string"},"chainID":{"type":"number"},"safeAddress":{"type":"string"},"safeTransactionHash":{"type":"string","nullable":true},"disbursedAmount":{"type":"string"},"tokenDecimals":{"type":"number"},"token":{"type":"string"},"tokenAddress":{"type":"string"},"payoutAddress":{"type":"string"},"milestoneBreakdown":{"type":"object","additionalProperties":{"type":"string"},"nullable":true},"paidAllocationIds":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["CONFIGURED","PENDING","AWAITING_SIGNATURES","DISBURSED","CANCELLED","FAILED"]},"executedAt":{"type":"string","nullable":true},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"metadata":{"type":"object","properties":{"notes":{"type":"string"},"safeTransactionUrl":{"type":"string"},"milestoneLabels":{"type":"object","additionalProperties":{"type":"string","maxLength":500}},"cancellationReason":{"type":"string"},"errorMessage":{"type":"string"}},"additionalProperties":false,"nullable":true}},"required":["id","grantUID","projectUID","communityUID","chainID","safeAddress","safeTransactionHash","disbursedAmount","tokenDecimals","token","tokenAddress","payoutAddress","milestoneBreakdown","paidAllocationIds","status","executedAt","createdBy","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"totalCount":{"type":"number","description":"Total number of items"},"page":{"type":"number","description":"Current page number"},"limit":{"type":"number","description":"Items per page"},"totalPages":{"type":"number","description":"Total number of pages"},"nextPage":{"type":"number","nullable":true,"description":"Next page number"},"prevPage":{"type":"number","nullable":true,"description":"Previous page number"},"hasNextPage":{"type":"boolean","description":"Whether there is a next page"},"hasPrevPage":{"type":"boolean","description":"Whether there is a previous page"}},"required":["totalCount","page","limit","totalPages","nextPage","prevPage","hasNextPage","hasPrevPage"],"additionalProperties":false}},"required":["payload","pagination"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/payouts/{disbursementId}/status":{"patch":{"summary":"Update Disbursement Status","description":"Update disbursement status (for Safe execution confirmation)","tags":["Payout Disbursements"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"status":{"type":"string","enum":["CONFIGURED","PENDING","AWAITING_SIGNATURES","DISBURSED","CANCELLED","FAILED"]},"errorMessage":{"type":"string"},"reason":{"type":"string"}},"required":["status"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"disbursementId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string"},"grantUID":{"type":"string"},"projectUID":{"type":"string"},"communityUID":{"type":"string"},"chainID":{"type":"number"},"safeAddress":{"type":"string"},"safeTransactionHash":{"type":"string","nullable":true},"disbursedAmount":{"type":"string"},"tokenDecimals":{"type":"number"},"token":{"type":"string"},"tokenAddress":{"type":"string"},"payoutAddress":{"type":"string"},"milestoneBreakdown":{"type":"object","additionalProperties":{"type":"string"},"nullable":true},"paidAllocationIds":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["CONFIGURED","PENDING","AWAITING_SIGNATURES","DISBURSED","CANCELLED","FAILED"]},"executedAt":{"type":"string","nullable":true},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"metadata":{"type":"object","properties":{"notes":{"type":"string"},"safeTransactionUrl":{"type":"string"},"milestoneLabels":{"type":"object","additionalProperties":{"type":"string","maxLength":500}},"cancellationReason":{"type":"string"},"errorMessage":{"type":"string"}},"additionalProperties":false,"nullable":true}},"required":["id","grantUID","projectUID","communityUID","chainID","safeAddress","safeTransactionHash","disbursedAmount","tokenDecimals","token","tokenAddress","payoutAddress","milestoneBreakdown","paidAllocationIds","status","executedAt","createdBy","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/payouts/safe/{safeAddress}/awaiting":{"get":{"summary":"Get Awaiting Signatures","description":"Get disbursements awaiting signatures for a Safe address","tags":["Payout Disbursements"],"parameters":[{"type":"integer","minimum":1,"default":1,"required":false,"in":"query","name":"page"},{"type":"integer","minimum":1,"maximum":100,"default":10,"required":false,"in":"query","name":"limit"},{"type":"string","minLength":1,"required":true,"in":"path","name":"safeAddress"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"payload":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"grantUID":{"type":"string"},"projectUID":{"type":"string"},"communityUID":{"type":"string"},"chainID":{"type":"number"},"safeAddress":{"type":"string"},"safeTransactionHash":{"type":"string","nullable":true},"disbursedAmount":{"type":"string"},"tokenDecimals":{"type":"number"},"token":{"type":"string"},"tokenAddress":{"type":"string"},"payoutAddress":{"type":"string"},"milestoneBreakdown":{"type":"object","additionalProperties":{"type":"string"},"nullable":true},"paidAllocationIds":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["CONFIGURED","PENDING","AWAITING_SIGNATURES","DISBURSED","CANCELLED","FAILED"]},"executedAt":{"type":"string","nullable":true},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"metadata":{"type":"object","properties":{"notes":{"type":"string"},"safeTransactionUrl":{"type":"string"},"milestoneLabels":{"type":"object","additionalProperties":{"type":"string","maxLength":500}},"cancellationReason":{"type":"string"},"errorMessage":{"type":"string"}},"additionalProperties":false,"nullable":true}},"required":["id","grantUID","projectUID","communityUID","chainID","safeAddress","safeTransactionHash","disbursedAmount","tokenDecimals","token","tokenAddress","payoutAddress","milestoneBreakdown","paidAllocationIds","status","executedAt","createdBy","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"totalCount":{"type":"number","description":"Total number of items"},"page":{"type":"number","description":"Current page number"},"limit":{"type":"number","description":"Items per page"},"totalPages":{"type":"number","description":"Total number of pages"},"nextPage":{"type":"number","nullable":true,"description":"Next page number"},"prevPage":{"type":"number","nullable":true,"description":"Previous page number"},"hasNextPage":{"type":"boolean","description":"Whether there is a next page"},"hasPrevPage":{"type":"boolean","description":"Whether there is a previous page"}},"required":["totalCount","page","limit","totalPages","nextPage","prevPage","hasNextPage","hasPrevPage"],"additionalProperties":false}},"required":["payload","pagination"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/payouts/grant/{grantUID}/milestone":{"delete":{"summary":"Delete Disbursement by Milestone","description":"Delete a disbursement record associated with a specific milestone","tags":["Payout Disbursements"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"communityUID":{"type":"string","minLength":1},"milestoneUID":{"type":"string","minLength":1}},"required":["communityUID","milestoneUID"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"grantUID"}],"responses":{"204":{"description":"Disbursement deleted"},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/payouts/record-payment":{"post":{"summary":"Record Historical Payment","description":"Record a historical payment directly as disbursed (no Safe required)","tags":["Payout Disbursements"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"grantUID":{"type":"string","minLength":1},"projectUID":{"type":"string","minLength":1},"communityUID":{"type":"string","minLength":1},"chainID":{"type":"integer","minimum":1},"disbursedAmount":{"type":"string","minLength":1},"tokenDecimals":{"type":"integer","minimum":0,"maximum":18},"token":{"type":"string","minLength":1},"tokenAddress":{"type":"string","minLength":1},"payoutAddress":{"type":"string"},"milestoneBreakdown":{"type":"object","additionalProperties":{"type":"string","maxLength":100}},"paidAllocationIds":{"type":"array","items":{"type":"string"},"maxItems":100},"paymentDate":{"type":"string","format":"date-time"},"transactionHash":{"type":"string","maxLength":66},"notes":{"type":"string","maxLength":1000},"milestoneLabels":{"type":"object","additionalProperties":{"type":"string","maxLength":500}},"status":{"type":"string","enum":["AWAITING_SIGNATURES","DISBURSED"]}},"required":["grantUID","projectUID","communityUID","chainID","disbursedAmount","tokenDecimals","token","tokenAddress","paymentDate"],"additionalProperties":false}}],"responses":{"201":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string"},"grantUID":{"type":"string"},"projectUID":{"type":"string"},"communityUID":{"type":"string"},"chainID":{"type":"number"},"safeAddress":{"type":"string"},"safeTransactionHash":{"type":"string","nullable":true},"disbursedAmount":{"type":"string"},"tokenDecimals":{"type":"number"},"token":{"type":"string"},"tokenAddress":{"type":"string"},"payoutAddress":{"type":"string"},"milestoneBreakdown":{"type":"object","additionalProperties":{"type":"string"},"nullable":true},"paidAllocationIds":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["CONFIGURED","PENDING","AWAITING_SIGNATURES","DISBURSED","CANCELLED","FAILED"]},"executedAt":{"type":"string","nullable":true},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"metadata":{"type":"object","properties":{"notes":{"type":"string"},"safeTransactionUrl":{"type":"string"},"milestoneLabels":{"type":"object","additionalProperties":{"type":"string","maxLength":500}},"cancellationReason":{"type":"string"},"errorMessage":{"type":"string"}},"additionalProperties":false,"nullable":true}},"required":["id","grantUID","projectUID","communityUID","chainID","safeAddress","safeTransactionHash","disbursedAmount","tokenDecimals","token","tokenAddress","payoutAddress","milestoneBreakdown","paidAllocationIds","status","executedAt","createdBy","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/payout-config/":{"post":{"summary":"Save Payout Configs","description":"Save payout configurations for grants (batch upsert)","tags":["Payout Grant Config"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"communityUID":{"type":"string","minLength":1},"configs":{"type":"array","items":{"type":"object","properties":{"grantUID":{"type":"string","minLength":1},"projectUID":{"type":"string","minLength":1},"payoutAddress":{"type":"string","nullable":true},"totalGrantAmount":{"type":"string","pattern":"^(0|[1-9]\\d*)(\\.\\d+)?$","nullable":true},"tokenAddress":{"allOf":[{"$ref":"#/properties/configs/items/properties/payoutAddress"}],"nullable":true},"chainID":{"type":"integer","minimum":1,"nullable":true},"milestoneAllocations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"milestoneUID":{"type":"string"},"label":{"type":"string","minLength":1},"amount":{"$ref":"#/properties/configs/items/properties/totalGrantAmount"}},"required":["id","label","amount"],"additionalProperties":false},"nullable":true}},"required":["grantUID","projectUID"],"additionalProperties":false},"minItems":1,"maxItems":100}},"required":["communityUID","configs"],"additionalProperties":false}}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"success":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"grantUID":{"type":"string"},"projectUID":{"type":"string"},"communityUID":{"type":"string"},"payoutAddress":{"type":"string","nullable":true},"totalGrantAmount":{"type":"string","nullable":true},"tokenAddress":{"type":"string","nullable":true},"chainID":{"type":"number","nullable":true},"milestoneAllocations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"milestoneUID":{"type":"string"},"label":{"type":"string"},"amount":{"type":"string"}},"required":["id","label","amount"],"additionalProperties":false},"nullable":true},"createdBy":{"type":"string"},"updatedBy":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","grantUID","projectUID","communityUID","payoutAddress","totalGrantAmount","tokenAddress","chainID","milestoneAllocations","createdBy","updatedBy","createdAt","updatedAt"],"additionalProperties":false}},"failed":{"type":"array","items":{"type":"object","properties":{"grantUID":{"type":"string"},"error":{"type":"string"}},"required":["grantUID","error"],"additionalProperties":false}}},"required":["success","failed"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/payout-config/bulk-import/validate":{"post":{"summary":"Validate Bulk Import","description":"Validate and match bulk import rows against all community grants","tags":["Payout Grant Config"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"communityUID":{"type":"string","minLength":1},"rows":{"type":"array","items":{"type":"object","properties":{"rowNumber":{"type":"integer","minimum":1},"grantUID":{"type":"string"},"projectUID":{"type":"string"},"projectSlug":{"type":"string"},"projectName":{"type":"string"},"payoutAddress":{"type":"string"},"amount":{"type":"string"}},"required":["rowNumber","grantUID","projectUID","projectSlug","projectName","payoutAddress","amount"],"additionalProperties":false},"minItems":1,"maxItems":100}},"required":["communityUID","rows"],"additionalProperties":false}}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"rowNumber":{"type":"number"},"grantUID":{"type":"string"},"projectUID":{"type":"string"},"projectSlug":{"type":"string"},"projectName":{"type":"string"},"payoutAddress":{"type":"string"},"amount":{"type":"string"},"status":{"type":"string","enum":["valid","invalid"]},"errors":{"type":"array","items":{"type":"string"}},"target":{"type":"object","properties":{"grantUID":{"type":"string"},"projectUID":{"type":"string"},"matchedBy":{"type":"string","enum":["direct_uid_pair","grant_uid","project_uid","project_slug","project_name","combined_identifiers"]}},"required":["grantUID","projectUID","matchedBy"],"additionalProperties":false,"nullable":true}},"required":["rowNumber","grantUID","projectUID","projectSlug","projectName","payoutAddress","amount","status","errors","target"],"additionalProperties":false}}},"required":["rows"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/payout-config/community/{communityUID}/public":{"get":{"summary":"Get Community Configs (Public)","description":"Get all payout configurations for a community (public read-only)","tags":["Payout Grant Config"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"communityUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"configs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"grantUID":{"type":"string"},"projectUID":{"type":"string"},"communityUID":{"type":"string"},"payoutAddress":{"type":"string","nullable":true},"totalGrantAmount":{"type":"string","nullable":true},"tokenAddress":{"type":"string","nullable":true},"chainID":{"type":"number","nullable":true},"milestoneAllocations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"milestoneUID":{"type":"string"},"label":{"type":"string"},"amount":{"type":"string"}},"required":["id","label","amount"],"additionalProperties":false},"nullable":true},"createdBy":{"type":"string"},"updatedBy":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","grantUID","projectUID","communityUID","payoutAddress","totalGrantAmount","tokenAddress","chainID","milestoneAllocations","createdBy","updatedBy","createdAt","updatedAt"],"additionalProperties":false}}},"required":["configs"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/payout-config/community/{communityUID}":{"get":{"summary":"Get Community Configs","description":"Get all payout configurations for a community","tags":["Payout Grant Config"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"communityUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"configs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"grantUID":{"type":"string"},"projectUID":{"type":"string"},"communityUID":{"type":"string"},"payoutAddress":{"type":"string","nullable":true},"totalGrantAmount":{"type":"string","nullable":true},"tokenAddress":{"type":"string","nullable":true},"chainID":{"type":"number","nullable":true},"milestoneAllocations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"milestoneUID":{"type":"string"},"label":{"type":"string"},"amount":{"type":"string"}},"required":["id","label","amount"],"additionalProperties":false},"nullable":true},"createdBy":{"type":"string"},"updatedBy":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","grantUID","projectUID","communityUID","payoutAddress","totalGrantAmount","tokenAddress","chainID","milestoneAllocations","createdBy","updatedBy","createdAt","updatedAt"],"additionalProperties":false}}},"required":["configs"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/payout-config/grant/{grantUID}/public":{"get":{"summary":"Get Grant Config (Public)","description":"Get payout configuration for a specific grant (public read-only)","tags":["Payout Grant Config"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"grantUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"config":{"type":"object","properties":{"id":{"type":"string"},"grantUID":{"type":"string"},"projectUID":{"type":"string"},"communityUID":{"type":"string"},"payoutAddress":{"type":"string","nullable":true},"totalGrantAmount":{"type":"string","nullable":true},"tokenAddress":{"type":"string","nullable":true},"chainID":{"type":"number","nullable":true},"milestoneAllocations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"milestoneUID":{"type":"string"},"label":{"type":"string"},"amount":{"type":"string"}},"required":["id","label","amount"],"additionalProperties":false},"nullable":true},"createdBy":{"type":"string"},"updatedBy":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","grantUID","projectUID","communityUID","payoutAddress","totalGrantAmount","tokenAddress","chainID","milestoneAllocations","createdBy","updatedBy","createdAt","updatedAt"],"additionalProperties":false,"nullable":true}},"required":["config"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/payout-config/grant/{grantUID}":{"get":{"summary":"Get Grant Config","description":"Get payout configuration for a specific grant (returns null config if none exists)","tags":["Payout Grant Config"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"grantUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"config":{"type":"object","properties":{"id":{"type":"string"},"grantUID":{"type":"string"},"projectUID":{"type":"string"},"communityUID":{"type":"string"},"payoutAddress":{"type":"string","nullable":true},"totalGrantAmount":{"type":"string","nullable":true},"tokenAddress":{"type":"string","nullable":true},"chainID":{"type":"number","nullable":true},"milestoneAllocations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"milestoneUID":{"type":"string"},"label":{"type":"string"},"amount":{"type":"string"}},"required":["id","label","amount"],"additionalProperties":false},"nullable":true},"createdBy":{"type":"string"},"updatedBy":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","grantUID","projectUID","communityUID","payoutAddress","totalGrantAmount","tokenAddress","chainID","milestoneAllocations","createdBy","updatedBy","createdAt","updatedAt"],"additionalProperties":false,"nullable":true}},"required":["config"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"delete":{"summary":"Delete Grant Config","description":"Delete payout configuration for a grant","tags":["Payout Grant Config"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"grantUID"}],"responses":{"204":{"description":"Default Response"},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/payout-config/grant/{grantUID}/line-items/{allocationId}":{"put":{"summary":"Update Line Item","description":"Update a single line item (label/amount) in a grant payout config. Blocked when the allocation is part of an active or completed disbursement.","tags":["Payout Grant Config"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":200},"amount":{"type":"string","maxLength":50,"pattern":"^(0|[1-9]\\d*)(\\.\\d+)?$"}},"additionalProperties":false}},{"type":"string","minLength":1,"maxLength":100,"required":true,"in":"path","name":"grantUID"},{"type":"string","format":"uuid","required":true,"in":"path","name":"allocationId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"config":{"type":"object","properties":{"id":{"type":"string"},"grantUID":{"type":"string"},"projectUID":{"type":"string"},"communityUID":{"type":"string"},"payoutAddress":{"type":"string","nullable":true},"totalGrantAmount":{"type":"string","nullable":true},"tokenAddress":{"type":"string","nullable":true},"chainID":{"type":"number","nullable":true},"milestoneAllocations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"milestoneUID":{"type":"string"},"label":{"type":"string"},"amount":{"type":"string"}},"required":["id","label","amount"],"additionalProperties":false},"nullable":true},"createdBy":{"type":"string"},"updatedBy":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","grantUID","projectUID","communityUID","payoutAddress","totalGrantAmount","tokenAddress","chainID","milestoneAllocations","createdBy","updatedBy","createdAt","updatedAt"],"additionalProperties":false,"nullable":true}},"required":["config"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"delete":{"summary":"Delete Line Item","description":"Delete a single line item from a grant payout config. Blocked when the allocation is part of an active or completed disbursement.","tags":["Payout Grant Config"],"parameters":[{"type":"string","minLength":1,"maxLength":100,"required":true,"in":"path","name":"grantUID"},{"type":"string","format":"uuid","required":true,"in":"path","name":"allocationId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"config":{"type":"object","properties":{"id":{"type":"string"},"grantUID":{"type":"string"},"projectUID":{"type":"string"},"communityUID":{"type":"string"},"payoutAddress":{"type":"string","nullable":true},"totalGrantAmount":{"type":"string","nullable":true},"tokenAddress":{"type":"string","nullable":true},"chainID":{"type":"number","nullable":true},"milestoneAllocations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"milestoneUID":{"type":"string"},"label":{"type":"string"},"amount":{"type":"string"}},"required":["id","label","amount"],"additionalProperties":false},"nullable":true},"createdBy":{"type":"string"},"updatedBy":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","grantUID","projectUID","communityUID","payoutAddress","totalGrantAmount","tokenAddress","chainID","milestoneAllocations","createdBy","updatedBy","createdAt","updatedAt"],"additionalProperties":false,"nullable":true}},"required":["config"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-program-configs/{programId}/prompts":{"get":{"summary":"Get Program Prompts","description":"Get all prompts (external and internal) for a program. Requires PROGRAM_VIEW permission","tags":["Program Prompts"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"external":{"type":"object","properties":{"id":{"type":"string"},"programId":{"type":"string"},"promptType":{"type":"string","enum":["external","internal"]},"name":{"type":"string"},"systemMessage":{"type":"string","nullable":true},"content":{"type":"string"},"modelId":{"type":"string"},"langfusePromptId":{"type":"string"},"langfuseVersion":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"}},"required":["id","programId","promptType","name","systemMessage","content","modelId","langfusePromptId","langfuseVersion","createdAt","updatedAt","createdBy","updatedBy"],"additionalProperties":false,"nullable":true},"internal":{"allOf":[{"$ref":"#/properties/external"}],"nullable":true},"migrationRequired":{"type":"boolean"},"legacyPromptIds":{"type":"object","properties":{"external":{"type":"string","nullable":true},"internal":{"type":"string","nullable":true}},"required":["external","internal"],"additionalProperties":false}},"required":["external","internal","migrationRequired","legacyPromptIds"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-program-configs/{programId}/prompts/{promptType}":{"put":{"summary":"Save Program Prompt","description":"Save or update a prompt for a program. Requires PROGRAM_EDIT permission. Name cannot be changed after creation.","tags":["Program Prompts"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"systemMessage":{"type":"string"},"content":{"type":"string","minLength":1},"modelId":{"type":"string","minLength":1}},"required":["name","content","modelId"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"},{"type":"string","enum":["external","internal"],"required":true,"in":"path","name":"promptType"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string"},"programId":{"type":"string"},"promptType":{"type":"string","enum":["external","internal"]},"name":{"type":"string"},"systemMessage":{"type":"string","nullable":true},"content":{"type":"string"},"modelId":{"type":"string"},"langfusePromptId":{"type":"string"},"langfuseVersion":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"}},"required":["id","programId","promptType","name","systemMessage","content","modelId","langfusePromptId","langfuseVersion","createdAt","updatedAt","createdBy","updatedBy"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-program-configs/{programId}/prompts/{promptType}/test":{"post":{"summary":"Test Program Prompt","description":"Test a prompt with a specific application. Requires PROGRAM_EDIT permission","tags":["Program Prompts"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"applicationId":{"type":"string","minLength":1}},"required":["applicationId"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"},{"type":"string","enum":["external","internal"],"required":true,"in":"path","name":"promptType"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"success":{"type":"boolean"},"result":{"type":"string"},"rawResponse":{},"compiledPrompt":{"type":"string"},"error":{"type":"string"}},"required":["success"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-program-configs/{programId}/evaluate-all":{"post":{"summary":"Trigger Bulk Evaluation","description":"Trigger bulk re-evaluation of all applications for a program. Requires PROGRAM_EDIT permission","tags":["Program Prompts"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"promptType":{"type":"string","enum":["external","internal"]}},"required":["promptType"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"jobId":{"type":"string"},"totalApplications":{"type":"number"}},"required":["jobId","totalApplications"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-program-configs/{programId}/evaluate-all/{jobId}":{"get":{"summary":"Get Bulk Evaluation Job Status","description":"Get the status of a bulk evaluation job. Requires PROGRAM_VIEW permission","tags":["Program Prompts"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"},{"type":"string","minLength":1,"required":true,"in":"path","name":"jobId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string"},"programId":{"type":"string"},"promptType":{"type":"string","enum":["external","internal"]},"status":{"type":"string","enum":["pending","running","completed","failed"]},"totalApplications":{"type":"number"},"completedApplications":{"type":"number"},"failedApplications":{"type":"number"},"errorApplicationId":{"type":"string","nullable":true},"errorMessage":{"type":"string","nullable":true},"startedAt":{"type":"string"},"completedAt":{"type":"string","nullable":true},"triggeredBy":{"type":"string"}},"required":["id","programId","promptType","status","totalApplications","completedApplications","failedApplications","startedAt","triggeredBy"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/projects/{projectUID}/communities/{communityUID}/kyc-status":{"get":{"summary":"Get KYC Status","description":"Get KYC verification status for a project in a specific community","tags":["KYC"],"parameters":[{"type":"string","minLength":1,"description":"The project UID","required":true,"in":"path","name":"projectUID"},{"type":"string","minLength":1,"description":"The community UID","required":true,"in":"path","name":"communityUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"projectUID":{"type":"string"},"communityUID":{"type":"string"},"status":{"type":"string","enum":["NOT_STARTED","PENDING","OUTREACH","VERIFIED","REJECTED","EXPIRED"]},"verificationType":{"type":"string","enum":["KYC","KYB"]},"verifiedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"isExpired":{"type":"boolean"}},"required":["communityUID","status","isExpired"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/{referenceNumber}/kyc-status":{"get":{"summary":"Get KYC Status by Application Reference","description":"Get KYC verification status for a funding application by its reference number","tags":["KYC"],"parameters":[{"type":"string","minLength":1,"pattern":"^APP-[A-Z0-9]+-[A-Z0-9]+$","description":"The funding application reference number (e.g., APP-FUPIOMKO-KBKLSQ)","required":true,"in":"path","name":"referenceNumber"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"projectUID":{"type":"string"},"communityUID":{"type":"string"},"status":{"type":"string","enum":["NOT_STARTED","PENDING","OUTREACH","VERIFIED","REJECTED","EXPIRED"]},"verificationType":{"type":"string","enum":["KYC","KYB"]},"verifiedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"isExpired":{"type":"boolean"}},"required":["communityUID","status","isExpired"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/communities/{communityIdOrSlug}/kyc-config":{"get":{"summary":"Get KYC Config","description":"Get KYC provider configuration for a community (form URLs, validity, etc.)","tags":["KYC"],"parameters":[{"type":"string","minLength":1,"description":"The community UID or slug","required":true,"in":"path","name":"communityIdOrSlug"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"communityUID":{"type":"string"},"providerType":{"type":"string","enum":["TREOVA","FILECOIN"]},"providerName":{"type":"string"},"kycFormUrl":{"type":"string"},"kybFormUrl":{"type":"string"},"validityMonths":{"type":"number"},"isEnabled":{"type":"boolean"}},"required":["communityUID","providerType","providerName","kycFormUrl","kybFormUrl","validityMonths","isEnabled"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"put":{"summary":"Upsert KYC Config","description":"Create or update KYC provider configuration for a community. Requires admin authentication.","tags":["KYC Admin"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"providerType":{"type":"string","enum":["TREOVA"]},"providerName":{"type":"string","minLength":1},"kycFormUrl":{"type":"string","format":"uri"},"kybFormUrl":{"type":"string","format":"uri"},"validityMonths":{"type":"integer","minimum":1,"maximum":60,"default":12},"isEnabled":{"type":"boolean","default":true}},"required":["providerType","providerName","kycFormUrl","kybFormUrl"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"communityIdOrSlug"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string"},"communityUID":{"type":"string"},"providerType":{"type":"string"},"providerName":{"type":"string"},"kycFormUrl":{"type":"string"},"kybFormUrl":{"type":"string"},"validityMonths":{"type":"number"},"isEnabled":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","communityUID","providerType","providerName","kycFormUrl","kybFormUrl","validityMonths","isEnabled","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/communities/{communityIdOrSlug}/kyc/batch-status/by-project-uid/public":{"post":{"summary":"Get Batch KYC Statuses by Project UID (Public)","description":"Get KYC verification statuses for multiple projects in a community (public, read-only)","tags":["KYC"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"projectUIDs":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":100}},"required":["projectUIDs"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"communityIdOrSlug"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"statuses":{"type":"object","additionalProperties":{"type":"object","properties":{"projectUID":{"type":"string"},"communityUID":{"type":"string"},"status":{"anyOf":[{"type":"string","enum":["NOT_STARTED","PENDING","OUTREACH","VERIFIED","REJECTED"]},{"type":"string","enum":["EXPIRED"]}]},"verificationType":{"type":"string","enum":["KYC","KYB"]},"verifiedAt":{"type":"string"},"expiresAt":{"type":"string"},"isExpired":{"type":"boolean"}},"required":["communityUID","status","isExpired"],"additionalProperties":false,"nullable":true}}},"required":["statuses"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/communities/{communityIdOrSlug}/kyc/batch-status/by-project-uid":{"post":{"summary":"Get Batch KYC Statuses by Project UID","description":"Get KYC verification statuses for multiple projects in a community","tags":["KYC"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"projectUIDs":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":100}},"required":["projectUIDs"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"communityIdOrSlug"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"statuses":{"type":"object","additionalProperties":{"type":"object","properties":{"projectUID":{"type":"string"},"communityUID":{"type":"string"},"status":{"anyOf":[{"type":"string","enum":["NOT_STARTED","PENDING","OUTREACH","VERIFIED","REJECTED"]},{"type":"string","enum":["EXPIRED"]}]},"verificationType":{"type":"string","enum":["KYC","KYB"]},"verifiedAt":{"type":"string"},"expiresAt":{"type":"string"},"isExpired":{"type":"boolean"}},"required":["communityUID","status","isExpired"],"additionalProperties":false,"nullable":true}}},"required":["statuses"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/communities/{communityIdOrSlug}/kyc/batch-status/by-application-reference":{"post":{"summary":"Get Batch KYC Statuses by Application Reference","description":"Get KYC verification statuses for multiple funding applications in a community","tags":["KYC"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"applicationReferences":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["applicationReferences"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"communityIdOrSlug"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"statuses":{"type":"object","additionalProperties":{"type":"object","properties":{"projectUID":{"type":"string"},"communityUID":{"type":"string"},"status":{"anyOf":[{"type":"string","enum":["NOT_STARTED","PENDING","OUTREACH","VERIFIED","REJECTED"]},{"type":"string","enum":["EXPIRED"]}]},"verificationType":{"type":"string","enum":["KYC","KYB"]},"verifiedAt":{"type":"string"},"expiresAt":{"type":"string"},"isExpired":{"type":"boolean"}},"required":["communityUID","status","isExpired"],"additionalProperties":false,"nullable":true}}},"required":["statuses"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/communities/{communityIdOrSlug}/kyc-form-url":{"post":{"summary":"Get KYC Form URL","description":"Get KYC form URL for a project with application reference","tags":["KYC"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"projectUID":{"type":"string","minLength":1},"verificationType":{"type":"string","enum":["KYC","KYB"]},"walletAddress":{"type":"string"}},"required":["projectUID","verificationType"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"communityIdOrSlug"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"formUrl":{"type":"string"},"applicationReference":{"type":"string"}},"required":["formUrl","applicationReference"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/admin/kyc/verification-status":{"put":{"summary":"Admin KYC Status Override","description":"Override KYC/KYB verification status for a project. Requires staff authentication.","tags":["KYC Admin"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"applicationReference":{"type":"string","minLength":1},"status":{"type":"string","enum":["NOT_STARTED","PENDING","OUTREACH","VERIFIED","REJECTED"]},"verificationType":{"type":"string","enum":["KYC","KYB"]},"reason":{"type":"string","minLength":1}},"required":["applicationReference","status","verificationType","reason"],"additionalProperties":false}}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"applicationReference":{"type":"string"},"communityUID":{"type":"string"},"projectUID":{"type":"string"},"status":{"type":"string"},"verificationType":{"type":"string"},"verifiedAt":{"type":"string","nullable":true},"expiresAt":{"type":"string","nullable":true},"overriddenBy":{"type":"string"},"reason":{"type":"string"}},"required":["applicationReference","communityUID","status","verificationType","verifiedAt","expiresAt","overriddenBy","reason"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/webhooks/kyc/treova":{"post":{"summary":"Treova Webhook","description":"Webhook endpoint for Treova KYC status updates. Signature verification required.","tags":["KYC Webhooks"],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}}}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/programs/{programId}/financials":{"get":{"summary":"Get Program Financials","description":"Get financial summary and project-level financial status for a program. Returns total allocated, disbursed, and remaining amounts along with per-project breakdown.","tags":["Program Financials"],"parameters":[{"type":"integer","minimum":1,"default":1,"description":"Page number","required":false,"in":"query","name":"page"},{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"Items per page","required":false,"in":"query","name":"limit"},{"type":"string","minLength":1,"description":"Program ID","required":true,"in":"path","name":"programId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"summary":{"type":"object","properties":{"programId":{"type":"string"},"programName":{"type":"string"},"primaryCurrency":{"type":"string"},"primaryTokenAddress":{"type":"string","nullable":true},"primaryChainID":{"type":"number","nullable":true},"totalAllocated":{"type":"string"},"totalDisbursed":{"type":"string"},"totalRemaining":{"type":"string"},"projectCount":{"type":"number"},"currencyBreakdown":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"tokenAddress":{"type":"string","nullable":true},"chainID":{"type":"number"},"allocated":{"type":"string"},"disbursed":{"type":"string"},"remaining":{"type":"string"},"grantCount":{"type":"number"}},"required":["currency","tokenAddress","chainID","allocated","disbursed","remaining","grantCount"],"additionalProperties":false}}},"required":["programId","programName","primaryCurrency","primaryTokenAddress","primaryChainID","totalAllocated","totalDisbursed","totalRemaining","projectCount"],"additionalProperties":false},"projects":{"type":"array","items":{"type":"object","properties":{"projectUID":{"type":"string"},"projectName":{"type":"string"},"projectSlug":{"type":"string"},"logoUrl":{"type":"string","nullable":true},"grantUID":{"type":"string"},"currency":{"type":"string"},"tokenAddress":{"type":"string","nullable":true},"chainID":{"type":"number"},"approved":{"type":"string"},"disbursed":{"type":"string"},"remaining":{"type":"string"},"disbursementPercentage":{"type":"number"},"disbursementStatus":{"type":"string","enum":["NOT_STARTED","IN_PROGRESS","COMPLETED"]},"milestoneCompletion":{"type":"number"}},"required":["projectUID","projectName","projectSlug","logoUrl","grantUID","currency","tokenAddress","chainID","approved","disbursed","remaining","disbursementPercentage","disbursementStatus","milestoneCompletion"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"totalCount":{"type":"number"},"page":{"type":"number"},"limit":{"type":"number"},"totalPages":{"type":"number"},"nextPage":{"type":"number","nullable":true},"prevPage":{"type":"number","nullable":true},"hasNextPage":{"type":"boolean"},"hasPrevPage":{"type":"boolean"}},"required":["totalCount","page","limit","totalPages","nextPage","prevPage","hasNextPage","hasPrevPage"],"additionalProperties":false}},"required":["summary","projects","pagination"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/hedgey-campaign-mappings":{"get":{"summary":"Get Campaign Mappings","description":"Get all Hedgey campaign name mappings","tags":["Hedgey Campaign Mappings"],"parameters":[{"type":"string","description":"Filter mappings by tenant ID","required":false,"in":"query","name":"tenantId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Mapping unique identifier"},"campaignUUID":{"type":"string","description":"Hedgey campaign UUID"},"name":{"type":"string","description":"Display name from spreadsheet"},"tenantId":{"type":"string","description":"Tenant identifier"},"createdAt":{"type":"string","format":"date-time","description":"Mapping creation date"},"updatedAt":{"type":"string","format":"date-time","description":"Mapping update date"}},"required":["id","campaignUUID","name","tenantId","createdAt","updatedAt"],"additionalProperties":false}}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/hedgey-campaign-mappings/{uuid}":{"get":{"summary":"Get Campaign Mapping by UUID","description":"Get a specific Hedgey campaign mapping by UUID","tags":["Hedgey Campaign Mappings"],"parameters":[{"type":"string","description":"Hedgey campaign UUID","required":true,"in":"path","name":"uuid"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string","description":"Mapping unique identifier"},"campaignUUID":{"type":"string","description":"Hedgey campaign UUID"},"name":{"type":"string","description":"Display name from spreadsheet"},"tenantId":{"type":"string","description":"Tenant identifier"},"createdAt":{"type":"string","format":"date-time","description":"Mapping creation date"},"updatedAt":{"type":"string","format":"date-time","description":"Mapping update date"}},"required":["id","campaignUUID","name","tenantId","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/{referenceNumber}/team-members":{"get":{"summary":"Get Team Members","description":"Get all team members for a funding application. Requires authentication.","tags":["Application Team Members"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"referenceNumber"}],"responses":{"200":{"description":"Default Response","schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the team member record"},"applicationId":{"type":"string","description":"ID of the funding application"},"referenceNumber":{"type":"string","description":"Reference number of the funding application"},"memberAddress":{"type":"string","description":"Wallet address of the team member"},"memberEmail":{"type":"string","description":"Email address of the team member"},"memberName":{"type":"string","description":"Display name of the team member"},"addedBy":{"type":"string","description":"Wallet address of the user who added this team member"},"createdAt":{"type":"string","description":"Creation timestamp"},"updatedAt":{"type":"string","description":"Last update timestamp"}},"required":["id","applicationId","referenceNumber","memberAddress","memberEmail","memberName","addedBy","createdAt","updatedAt"],"additionalProperties":false}}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"post":{"summary":"Add Team Member","description":"Add a team member to a funding application. Only the application owner can add team members. The member email is resolved via Privy to get their wallet address.","tags":["Application Team Members"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"memberEmail":{"type":"string","format":"email","description":"Email address of the team member to add"},"memberName":{"type":"string","minLength":1,"maxLength":200,"description":"Display name of the team member"}},"required":["memberEmail","memberName"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"referenceNumber"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the team member record"},"applicationId":{"type":"string","description":"ID of the funding application"},"referenceNumber":{"type":"string","description":"Reference number of the funding application"},"memberAddress":{"type":"string","description":"Wallet address of the team member"},"memberEmail":{"type":"string","description":"Email address of the team member"},"memberName":{"type":"string","description":"Display name of the team member"},"addedBy":{"type":"string","description":"Wallet address of the user who added this team member"},"createdAt":{"type":"string","description":"Creation timestamp"},"updatedAt":{"type":"string","description":"Last update timestamp"}},"required":["id","applicationId","referenceNumber","memberAddress","memberEmail","memberName","addedBy","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/{referenceNumber}/team-members/{memberAddress}":{"delete":{"summary":"Remove Team Member","description":"Remove a team member from a funding application. Only the application owner can remove team members.","tags":["Application Team Members"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"referenceNumber"},{"type":"string","minLength":1,"required":true,"in":"path","name":"memberAddress"}],"responses":{"204":{"description":"Team member removed"},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/user/api-keys":{"post":{"summary":"Generate API Key","description":"Generate a new API key for the authenticated user. If a key already exists, it will be revoked and a new one created.","tags":["API Keys"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"User-friendly label for the API key"}},"additionalProperties":false}}],"responses":{"201":{"description":"Default Response","schema":{"type":"object","properties":{"key":{"type":"string","description":"Plaintext API key (shown once)"},"keyHint":{"type":"string","description":"Last 4 characters of the key"},"name":{"type":"string","description":"Key name"},"createdAt":{"type":"string","description":"ISO timestamp of creation"}},"required":["key","keyHint","name","createdAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"get":{"summary":"Get API Key Info","description":"Get the current API key info for the authenticated user. Returns null if no active key exists.","tags":["API Keys"],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"apiKey":{"type":"object","properties":{"keyHint":{"type":"string"},"name":{"type":"string"},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"lastUsedAt":{"type":"string","nullable":true}},"required":["keyHint","name","isActive","createdAt","lastUsedAt"],"additionalProperties":false,"nullable":true,"description":"Active API key info, or null if none exists"}},"required":["apiKey"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"delete":{"summary":"Revoke API Key","description":"Revoke the active API key. Can be authenticated via JWT or API key (self-revoke).","tags":["API Keys"],"responses":{"204":{"description":"Key revoked successfully"},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/user/me":{"get":{"summary":"Get Current User","description":"Get current user info. Works with both JWT and API key authentication.","tags":["User"],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"publicAddress":{"type":"string"},"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"telegram":{"type":"string","nullable":true}},"required":["publicAddress","name","email","telegram"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/api-keys/auth/init":{"post":{"summary":"Initiate Email Verification","description":"Initiate email verification for programmatic API key generation.","tags":["API Keys"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Email address to send verification code to"}},"required":["email"],"additionalProperties":false}}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/api-keys/auth/verify":{"post":{"summary":"Verify OTP and Generate Key","description":"Verify email OTP and generate an API key. Only works if no active key exists.","tags":["API Keys"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Email address used for verification"},"code":{"type":"string","minLength":4,"maxLength":10,"description":"Verification code from email"},"name":{"type":"string","minLength":1,"maxLength":100,"description":"User-friendly label for the API key"}},"required":["email","code"],"additionalProperties":false}}],"responses":{"201":{"description":"Default Response","schema":{"type":"object","properties":{"key":{"type":"string","description":"Plaintext API key (shown once)"}},"required":["key"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/agent/execute":{"post":{"summary":"Execute Agent Action","description":"Execute an on-chain attestation action using the server-side wallet associated with the API key. Supports creating projects, milestones, milestone completions, and project updates.","tags":["Agent"],"parameters":[{"name":"body","in":"body","schema":{"anyOf":[{"type":"object","properties":{"action":{"type":"string","enum":["createProject"]},"params":{"type":"object","properties":{"chainId":{"type":"integer","minimum":1},"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","minLength":1,"maxLength":5000},"imageURL":{"type":"string","format":"uri"},"links":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false}},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":50},"maxItems":20},"problem":{"type":"string","maxLength":5000},"solution":{"type":"string","maxLength":5000},"missionSummary":{"type":"string","maxLength":1000},"locationOfImpact":{"type":"string","maxLength":1000},"businessModel":{"type":"string","maxLength":1000},"stageIn":{"type":"string","maxLength":1000},"raisedMoney":{"type":"string","maxLength":1000},"pathToTake":{"type":"string","maxLength":1000}},"required":["chainId","title","description"],"additionalProperties":false}},"required":["action","params"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["createMilestone"]},"params":{"type":"object","properties":{"chainId":{"type":"integer","minimum":1},"grantUID":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","minLength":1,"maxLength":5000},"endsAt":{"type":"integer","minimum":1},"priority":{"type":"integer","minimum":0}},"required":["chainId","grantUID","title","description","endsAt"],"additionalProperties":false}},"required":["action","params"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["completeMilestone"]},"params":{"type":"object","properties":{"chainId":{"type":"integer","minimum":1},"milestoneUID":{"type":"string","minLength":1},"reason":{"type":"string","minLength":1,"maxLength":5000},"proofOfWork":{"type":"string","format":"uri"}},"required":["chainId","milestoneUID","reason"],"additionalProperties":false}},"required":["action","params"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["createProjectUpdate"]},"params":{"type":"object","properties":{"chainId":{"type":"integer","minimum":1},"projectUID":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":200},"text":{"type":"string","minLength":1,"maxLength":10000}},"required":["chainId","projectUID","title","text"],"additionalProperties":false}},"required":["action","params"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["updateProjectDetails"]},"params":{"type":"object","properties":{"chainId":{"type":"integer","minimum":1},"projectUID":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","minLength":1,"maxLength":5000},"imageURL":{"type":"string","format":"uri"},"links":{"$ref":"#/anyOf/0/properties/params/properties/links"},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":50},"maxItems":20},"problem":{"$ref":"#/anyOf/0/properties/params/properties/problem"},"solution":{"$ref":"#/anyOf/0/properties/params/properties/solution"},"missionSummary":{"$ref":"#/anyOf/0/properties/params/properties/missionSummary"},"locationOfImpact":{"$ref":"#/anyOf/0/properties/params/properties/locationOfImpact"},"businessModel":{"$ref":"#/anyOf/0/properties/params/properties/businessModel"},"stageIn":{"$ref":"#/anyOf/0/properties/params/properties/stageIn"},"raisedMoney":{"$ref":"#/anyOf/0/properties/params/properties/raisedMoney"},"pathToTake":{"$ref":"#/anyOf/0/properties/params/properties/pathToTake"}},"required":["chainId","projectUID","title","description"],"additionalProperties":false}},"required":["action","params"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["createGrant"]},"params":{"type":"object","properties":{"chainId":{"type":"integer","minimum":1},"projectUID":{"type":"string","minLength":1},"communityUID":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000},"amount":{"type":"string"},"proposalURL":{"type":"string","format":"uri"},"programId":{"type":"string"}},"required":["chainId","projectUID","communityUID","title"],"additionalProperties":false}},"required":["action","params"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["createGrantUpdate"]},"params":{"type":"object","properties":{"chainId":{"type":"integer","minimum":1},"grantUID":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":200},"text":{"type":"string","minLength":1,"maxLength":10000}},"required":["chainId","grantUID","title","text"],"additionalProperties":false}},"required":["action","params"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["createProjectWithGrant"]},"params":{"type":"object","properties":{"chainId":{"type":"integer","minimum":1},"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","minLength":1,"maxLength":5000},"imageURL":{"type":"string","format":"uri"},"links":{"$ref":"#/anyOf/0/properties/params/properties/links"},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":50},"maxItems":20},"problem":{"$ref":"#/anyOf/0/properties/params/properties/problem"},"solution":{"$ref":"#/anyOf/0/properties/params/properties/solution"},"missionSummary":{"$ref":"#/anyOf/0/properties/params/properties/missionSummary"},"locationOfImpact":{"$ref":"#/anyOf/0/properties/params/properties/locationOfImpact"},"businessModel":{"$ref":"#/anyOf/0/properties/params/properties/businessModel"},"stageIn":{"$ref":"#/anyOf/0/properties/params/properties/stageIn"},"raisedMoney":{"$ref":"#/anyOf/0/properties/params/properties/raisedMoney"},"pathToTake":{"$ref":"#/anyOf/0/properties/params/properties/pathToTake"},"communityUID":{"type":"string","minLength":1},"grant":{"type":"object","properties":{"title":{"$ref":"#/anyOf/5/properties/params/properties/title"},"description":{"$ref":"#/anyOf/5/properties/params/properties/description"},"amount":{"$ref":"#/anyOf/5/properties/params/properties/amount"},"proposalURL":{"$ref":"#/anyOf/5/properties/params/properties/proposalURL"},"programId":{"$ref":"#/anyOf/5/properties/params/properties/programId"}},"required":["title"],"additionalProperties":false}},"required":["chainId","title","description","communityUID","grant"],"additionalProperties":false}},"required":["action","params"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["updateGrantDetails"]},"params":{"type":"object","properties":{"chainId":{"type":"integer","minimum":1},"grantUID":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000},"amount":{"type":"string"},"proposalURL":{"type":"string","format":"uri"},"programId":{"type":"string"}},"required":["chainId","grantUID","title"],"additionalProperties":false}},"required":["action","params"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["completeGrant"]},"params":{"type":"object","properties":{"chainId":{"type":"integer","minimum":1},"grantUID":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":200},"text":{"type":"string","minLength":1,"maxLength":10000},"proofOfWork":{"type":"string","format":"uri"},"pitchDeck":{"type":"string","format":"uri"},"demoVideo":{"type":"string","format":"uri"},"trackExplanations":{"type":"array","items":{"type":"object","properties":{"trackId":{"type":"string","minLength":1},"trackName":{"type":"string","minLength":1},"explanation":{"type":"string","minLength":1,"maxLength":5000}},"required":["trackId","trackName","explanation"],"additionalProperties":false}}},"required":["chainId","grantUID","title","text"],"additionalProperties":false}},"required":["action","params"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["createProjectMilestone"]},"params":{"type":"object","properties":{"chainId":{"type":"integer","minimum":1},"projectUID":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":200},"text":{"type":"string","minLength":1,"maxLength":5000}},"required":["chainId","projectUID","title","text"],"additionalProperties":false}},"required":["action","params"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["createProjectImpact"]},"params":{"type":"object","properties":{"chainId":{"type":"integer","minimum":1},"projectUID":{"type":"string","minLength":1},"work":{"type":"string","minLength":1,"maxLength":5000},"impact":{"type":"string","minLength":1,"maxLength":5000},"proof":{"type":"string","minLength":1,"maxLength":5000},"startedAt":{"type":"integer","minimum":0},"completedAt":{"type":"integer","minimum":1}},"required":["chainId","projectUID","work","impact","proof","completedAt"],"additionalProperties":false}},"required":["action","params"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["endorseProject"]},"params":{"type":"object","properties":{"chainId":{"type":"integer","minimum":1},"projectUID":{"type":"string","minLength":1},"comment":{"type":"string","maxLength":5000}},"required":["chainId","projectUID"],"additionalProperties":false}},"required":["action","params"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["addProjectMembers"]},"params":{"type":"object","properties":{"chainId":{"type":"integer","minimum":1},"projectUID":{"type":"string","minLength":1},"members":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","minLength":1},"name":{"type":"string","maxLength":200},"profilePictureURL":{"type":"string","format":"uri"}},"required":["address"],"additionalProperties":false},"minItems":1,"maxItems":20}},"required":["chainId","projectUID","members"],"additionalProperties":false}},"required":["action","params"],"additionalProperties":false}]}}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"transactionHash":{"type":"string"},"chainId":{"type":"number"},"smartAccountAddress":{"type":"string"}},"required":["transactionHash","chainId","smartAccountAddress"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/agent/info":{"get":{"summary":"Get Agent Info","description":"Get the server-side wallet address, supported chains, and available actions for the authenticated API key.","tags":["Agent"],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"walletAddress":{"type":"string","nullable":true},"smartAccountAddress":{"type":"string","nullable":true},"supportedChainIds":{"type":"array","items":{"type":"number"}},"supportedActions":{"type":"array","items":{"type":"string"}}},"required":["walletAddress","smartAccountAddress","supportedChainIds","supportedActions"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/agent/register":{"post":{"summary":"Register Agent","description":"Register a new agent without authentication. Creates a server wallet and API key. Rate limited to 5 requests per minute per IP.","tags":["Agent"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"additionalProperties":false}}],"responses":{"201":{"description":"Default Response","schema":{"type":"object","properties":{"apiKey":{"type":"string"},"walletAddress":{"type":"string"},"smartAccountAddress":{"type":"string"}},"required":["apiKey","walletAddress","smartAccountAddress"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/agent/stream":{"post":{"parameters":[{"name":"body","in":"body","schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string","minLength":1},"conversationHistory":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"content":{"type":"string"}}}},"agentContext":{"type":"object","properties":{"projectId":{"type":"string"},"programId":{"type":"string"},"applicationId":{"type":"string"},"communityId":{"type":"string"}}},"projectId":{"type":"string"},"programId":{"type":"string"},"applicationId":{"type":"string"},"communityId":{"type":"string"}}}}],"responses":{"200":{"description":"Default Response"}}}},"/v2/grant-agreements/{grantUID}":{"post":{"summary":"Toggle Grant Agreement","description":"Toggle agreement signed status for a grant","tags":["Grant Agreements"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"signed":{"type":"boolean"},"communityUID":{"type":"string","minLength":1},"signedAt":{"type":"string","format":"date-time"}},"required":["signed","communityUID"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"grantUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string"},"grantUID":{"type":"string"},"communityUID":{"type":"string"},"signed":{"type":"boolean"},"signedAt":{"type":"string","nullable":true},"signedBy":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","grantUID","communityUID","signed","signedAt","signedBy","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}},"get":{"summary":"Get Grant Agreement","description":"Get agreement status for a grant","tags":["Grant Agreements"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"grantUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string"},"grantUID":{"type":"string"},"communityUID":{"type":"string"},"signed":{"type":"boolean"},"signedAt":{"type":"string","nullable":true},"signedBy":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","grantUID","communityUID","signed","signedAt","signedBy","createdAt","updatedAt"],"additionalProperties":false,"nullable":true}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/milestone-invoices/{grantUID}":{"put":{"summary":"Batch Save Milestone Invoices","description":"Batch update invoice statuses for milestones of a grant","tags":["Milestone Invoices"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"communityUID":{"type":"string","minLength":1},"invoices":{"type":"array","items":{"type":"object","properties":{"milestoneLabel":{"type":"string","minLength":1},"milestoneUID":{"type":"string","nullable":true},"invoiceReceivedAt":{"type":"string","format":"date-time","nullable":true},"invoiceFileKey":{"type":"string","maxLength":500,"nullable":true},"invoiceFileUrl":{"type":"string","format":"uri","maxLength":500,"nullable":true}},"required":["milestoneLabel"],"additionalProperties":false},"minItems":1,"maxItems":100}},"required":["communityUID","invoices"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"grantUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"invoices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"grantUID":{"type":"string"},"milestoneUID":{"type":"string","nullable":true},"milestoneLabel":{"type":"string"},"communityUID":{"type":"string"},"invoiceStatus":{"type":"string","enum":["not_submitted","submitted","received","paid"]},"invoiceReceivedAt":{"type":"string","nullable":true},"invoiceReceivedBy":{"type":"string","nullable":true},"invoiceFileKey":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","grantUID","milestoneUID","milestoneLabel","communityUID","invoiceStatus","invoiceReceivedAt","invoiceReceivedBy","invoiceFileKey","createdAt","updatedAt"],"additionalProperties":false}}},"required":["invoices"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/milestone-invoices/presigned":{"post":{"summary":"Generate Invoice Upload URL","description":"Generate presigned URL for invoice file upload","tags":["Milestone Invoices"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"fileName":{"type":"string","minLength":1,"maxLength":255},"fileType":{"type":"string","minLength":1,"maxLength":100},"fileSize":{"type":"number","minimum":1,"maximum":10485760}},"required":["fileName","fileType","fileSize"],"additionalProperties":false}}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"uploadUrl":{"type":"string"},"finalUrl":{"type":"string"},"key":{"type":"string"}},"required":["uploadUrl","finalUrl","key"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/milestone-invoices/download":{"get":{"summary":"Get Invoice Download URL","description":"Generate a temporary download URL for an invoice file (15 min TTL)","tags":["Milestone Invoices"],"parameters":[{"type":"string","minLength":1,"maxLength":500,"required":true,"in":"query","name":"key"},{"type":"string","minLength":1,"required":true,"in":"query","name":"grantUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"downloadUrl":{"type":"string"}},"required":["downloadUrl"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/milestone-invoices/{grantUID}/payment-status":{"patch":{"summary":"Update Payment Status","description":"Update payment status override for a milestone invoice (admin)","tags":["Milestone Invoices"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"communityUID":{"type":"string","minLength":1},"milestoneLabel":{"type":"string","minLength":1,"maxLength":500},"paymentStatus":{"type":"string","enum":["pending"]}},"required":["communityUID","milestoneLabel","paymentStatus"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"grantUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"id":{"type":"string"},"grantUID":{"type":"string"},"milestoneUID":{"type":"string","nullable":true},"milestoneLabel":{"type":"string"},"communityUID":{"type":"string"},"invoiceStatus":{"type":"string","enum":["not_submitted","submitted","received","paid"]},"invoiceReceivedAt":{"type":"string","nullable":true},"invoiceReceivedBy":{"type":"string","nullable":true},"invoiceFileKey":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","grantUID","milestoneUID","milestoneLabel","communityUID","invoiceStatus","invoiceReceivedAt","invoiceReceivedBy","invoiceFileKey","createdAt","updatedAt"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/milestone-invoices/grant/{grantUID}":{"get":{"summary":"Get Grant Invoices","description":"Get all milestone invoices for a grant","tags":["Milestone Invoices"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"grantUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"invoices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"grantUID":{"type":"string"},"milestoneUID":{"type":"string","nullable":true},"milestoneLabel":{"type":"string"},"communityUID":{"type":"string"},"invoiceStatus":{"type":"string","enum":["not_submitted","submitted","received","paid"]},"invoiceReceivedAt":{"type":"string","nullable":true},"invoiceReceivedBy":{"type":"string","nullable":true},"invoiceFileKey":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","grantUID","milestoneUID","milestoneLabel","communityUID","invoiceStatus","invoiceReceivedAt","invoiceReceivedBy","invoiceFileKey","createdAt","updatedAt"],"additionalProperties":false}}},"required":["invoices"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/milestone-invoices/grantee/presigned":{"post":{"summary":"Generate Invoice Upload URL (Grantee)","description":"Generate presigned URL for grantee invoice file upload","tags":["Milestone Invoices - Grantee"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"fileName":{"type":"string","minLength":1,"maxLength":255},"fileType":{"type":"string","minLength":1,"maxLength":100},"fileSize":{"type":"number","minimum":1,"maximum":10485760}},"required":["fileName","fileType","fileSize"],"additionalProperties":false}}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"uploadUrl":{"type":"string"},"finalUrl":{"type":"string"},"key":{"type":"string"}},"required":["uploadUrl","finalUrl","key"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/grants/{grantUID}/invoice-requirement":{"get":{"summary":"Get Invoice Requirement","description":"Check if invoice is required for a grant and get existing invoice status","tags":["Grants"],"parameters":[{"type":"string","maxLength":500,"required":false,"in":"query","name":"milestoneLabel"},{"type":"string","minLength":1,"required":true,"in":"path","name":"grantUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"data":{"type":"object","properties":{"invoiceRequired":{"type":"boolean"},"invoiceStatus":{"type":"string","enum":["not_submitted","submitted","received","paid"],"nullable":true},"invoiceFileKey":{"type":"string","nullable":true}},"required":["invoiceRequired"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/grants/{grantUID}/invoice":{"put":{"summary":"Submit Invoice (Grantee)","description":"Submit an invoice for a milestone as a grantee. Auto-marks as received.","tags":["Grants"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"milestoneLabel":{"type":"string","minLength":1,"maxLength":500},"milestoneUID":{"type":"string","nullable":true},"invoiceFileKey":{"type":"string","minLength":1,"maxLength":500},"invoiceFileUrl":{"type":"string","format":"uri","maxLength":500}},"required":["milestoneLabel","invoiceFileKey","invoiceFileUrl"],"additionalProperties":false}},{"type":"string","minLength":1,"required":true,"in":"path","name":"grantUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"data":{"type":"object","properties":{"invoice":{"type":"object","properties":{"id":{"type":"string"},"grantUID":{"type":"string"},"milestoneUID":{"type":"string","nullable":true},"milestoneLabel":{"type":"string"},"communityUID":{"type":"string"},"invoiceStatus":{"type":"string","enum":["not_submitted","submitted","received","paid"]},"invoiceReceivedAt":{"type":"string","format":"date-time","nullable":true},"invoiceReceivedBy":{"type":"string","nullable":true},"invoiceFileKey":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","grantUID","milestoneUID","milestoneLabel","communityUID","invoiceStatus","invoiceReceivedAt","invoiceReceivedBy","invoiceFileKey","createdAt","updatedAt"],"additionalProperties":false}},"required":["invoice"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/grants/{grantUID}/invoice/download":{"get":{"summary":"Download Invoice (Authorized Users)","description":"Get a temporary download URL for an invoice file. Requires authentication and project/community authorization.","tags":["Grants"],"parameters":[{"type":"string","minLength":1,"maxLength":500,"required":true,"in":"query","name":"key"},{"type":"string","minLength":1,"required":true,"in":"path","name":"grantUID"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"data":{"type":"object","properties":{"downloadUrl":{"type":"string"}},"required":["downloadUrl"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/funding-applications/{referenceNumber}/invoice-config":{"get":{"summary":"Get Invoice Config by Reference Number","description":"Resolve a funding application referenceNumber to its linked grant and return invoice configuration","tags":["Funding Applications"],"parameters":[{"type":"string","minLength":1,"maxLength":500,"required":true,"in":"path","name":"referenceNumber"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"data":{"type":"object","properties":{"grantUID":{"type":"string"},"invoiceRequired":{"type":"boolean"},"milestoneInvoices":{"type":"array","items":{"type":"object","properties":{"milestoneLabel":{"type":"string"},"invoiceStatus":{"type":"string","enum":["not_submitted","submitted","received","paid"]},"invoiceFileKey":{"type":"string","nullable":true}},"required":["milestoneLabel","invoiceStatus","invoiceFileKey"],"additionalProperties":false}}},"required":["grantUID","invoiceRequired","milestoneInvoices"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/communities/{uidOrSlug}/milestones/pending-verification":{"get":{"summary":"Get Pending Verification Milestones","description":"Get milestones that are completed but not yet verified for a community","tags":["Milestone Report"],"parameters":[{"type":"integer","minimum":1,"default":1,"required":false,"in":"query","name":"page"},{"type":"integer","minimum":1,"default":50,"required":false,"in":"query","name":"pageLimit"},{"type":"string","required":false,"in":"query","name":"programIds"},{"type":"string","required":false,"in":"query","name":"reviewerAddress"},{"type":"string","minLength":1,"required":true,"in":"path","name":"uidOrSlug"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"milestoneUid":{"type":"string"},"milestoneTitle":{"type":"string"},"completedAt":{"type":"string","nullable":true},"grantUid":{"type":"string"},"grantTitle":{"type":"string"},"programId":{"type":"string","nullable":true},"projectUid":{"type":"string"},"projectTitle":{"type":"string"},"projectSlug":{"type":"string"},"status":{"type":"string","enum":["pending_verification","pending_completion"]}},"required":["milestoneUid","milestoneTitle","completedAt","grantUid","grantTitle","programId","projectUid","projectTitle","projectSlug","status"],"additionalProperties":false}},"pageInfo":{"type":"object","properties":{"totalItems":{"type":"number"},"page":{"type":"number"},"pageLimit":{"type":"number"}},"required":["totalItems","page","pageLimit"],"additionalProperties":false}},"required":["data","pageInfo"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/email-grantees/program/{programId}/emails":{"get":{"summary":"Get Grantee Emails by Program","description":"Get all grantee contact emails for a specific program. Requires COMMUNITY_ADMIN role or higher.","tags":["Email Grantees"],"parameters":[{"type":"string","minLength":1,"required":true,"in":"path","name":"programId"}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"emails":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"projectName":{"type":"string"},"referenceNumber":{"type":"string"}},"required":["email","projectName"],"additionalProperties":false}}},"required":["emails"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}},"/v2/email-grantees/send":{"post":{"summary":"Send Email to Grantees","description":"Send an email to selected grantees. Requires COMMUNITY_ADMIN role or higher.","tags":["Email Grantees"],"parameters":[{"name":"body","in":"body","schema":{"type":"object","properties":{"programId":{"type":"string","minLength":1},"recipients":{"type":"array","items":{"type":"string","format":"email"},"minItems":1,"maxItems":500},"subject":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1,"maxLength":50000},"replyTo":{"type":"string","format":"email"}},"required":["programId","recipients","subject","body"],"additionalProperties":false}}],"responses":{"200":{"description":"Default Response","schema":{"type":"object","properties":{"success":{"type":"boolean"},"sentCount":{"type":"number"},"failedCount":{"type":"number"}},"required":["success","sentCount","failedCount"],"additionalProperties":false}},"400":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"404":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}},"500":{"description":"Default Response","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"required":["error","message"],"additionalProperties":false}}}}}},"host":"gapapi.karmahq.xyz","schemes":["https"],"consumes":["application/json"],"produces":["application/json"],"securityDefinitions":{"bearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"Bearer token authentication. Format: Bearer <token>"}}}