{"openapi":"3.0.3","info":{"title":"Karma V2 API","summary":"Modern API for grants, projects, communities, and funding programs — designed for both human developers and AI agent consumption.","description":"API documentation for Karma V2 endpoints. Manage grants, projects, communities, and funding applications.\n\n**For AI agents / LLMs reading this spec:** Karma also exposes an MCP (Model Context Protocol) server. The canonical, versioned endpoint is `/v2/mcp`; `/mcp` is registered as a convenience alias and serves the same JSON-RPC handler. The MCP surface wraps the same data this API exposes with single-call tool semantics — prefer it for agentic workflows. See `/v2/mcp/info` and `/.well-known/mcp-tools.json` for tool discovery, or follow the `x-mcp-endpoint` extension in this document.\n\n**Field semantics matter.** Funding-related fields look superficially interchangeable but answer different questions: program-level totals (allocated / disbursed) live under the **Program Financials** tag; intake-time application approvals live under **Funding Applications**; per-grant payout records live under **Payout Disbursements**. Read each tag description before picking an endpoint — the tags explicitly call out which question each one answers.","version":"2.0.0","contact":{"name":"Karma","email":"info@karmahq.xyz","url":"https://www.karmahq.xyz"},"license":{"name":"See terms","url":"https://www.karmahq.xyz/terms-and-conditions"},"termsOfService":"https://www.karmahq.xyz/terms-and-conditions","x-mcp-endpoint":"/v2/mcp"},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2.0 Bearer token. Format: `Authorization: Bearer <token>`. See `/.well-known/oauth-protected-resource` for protected-resource metadata."},"apiKeyAuth":{"type":"apiKey","name":"x-api-key","in":"header","description":"Karma API key. Generate one at https://www.karmahq.xyz/agent-setup."}},"schemas":{"ErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}},"paths":{"/v2/projects":{"get":{"summary":"List/Search Projects","tags":["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).","parameters":[{"in":"query","name":"q","required":false,"schema":{"type":"string","minLength":3},"description":"Search query string (minimum 3 characters). When provided, searches projects by title, slug, or description."},{"in":"query","name":"limit","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]},"description":"Maximum number of results to return (1-50, default: 10)"},{"in":"query","name":"page","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]},"description":"Page number for pagination (1-based). When provided, returns paginated response format { payload: [], pagination: {} }."},{"in":"query","name":"sortBy","required":false,"schema":{"type":"string","enum":["createdAt","updatedAt","title","noOfGrants","noOfProjectMilestones","noOfGrantMilestones"],"default":"updatedAt"},"description":"Field to sort by: createdAt, updatedAt, title, noOfGrants, noOfProjectMilestones, noOfGrantMilestones"},{"in":"query","name":"sortOrder","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Sort direction: asc or desc"},{"in":"query","name":"includeStats","required":false,"schema":{"allOf":[{"anyOf":[{"not":{}},{"anyOf":[{"type":"string"},{"type":"boolean"}]}]},{"type":"boolean"}]},"description":"When true, includes stats for each project: grantsCount, grantMilestonesCount, roadmapItemsCount"},{"in":"query","name":"excludeTestProjects","required":false,"schema":{"allOf":[{"anyOf":[{"not":{}},{"anyOf":[{"type":"string"},{"type":"boolean"}]}]},{"type":"boolean"}]},"description":"When true, excludes projects with \"test\" (case-insensitive) in title"},{"in":"query","name":"hasPayoutAddress","required":false,"schema":{"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)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/projects/slug/check/{slug}":{"get":{"summary":"Check Slug Availability","tags":["Projects"],"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.","parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"pattern":"^[a-z0-9_-]+$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/projects/{identifier}":{"get":{"summary":"Get Project by Identifier","tags":["Projects"],"description":"Get project by UID or slug (auto-detected). Supports both 0x-prefixed UIDs and slug identifiers","parameters":[{"in":"path","name":"identifier","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/projects/logos/presigned":{"post":{"summary":"Generate Presigned URL for Project Logo Upload","tags":["Projects"],"description":"Generate a presigned URL for uploading project logo images to S3","requestBody":{"content":{"application/json":{"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}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/projects/logos/promote-to-permanent":{"post":{"summary":"Promote Logo to Permanent Storage","tags":["Projects"],"description":"Promote a temporarily uploaded logo file to permanent storage and associate it with a project","requestBody":{"content":{"application/json":{"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}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/projects/{projectId}/regions":{"put":{"summary":"Update Project Regions","tags":["Projects"],"description":"Update the regions assigned to a project. Only community administrators can perform this operation.","requestBody":{"content":{"application/json":{"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}}},"required":true},"parameters":[{"in":"path","name":"projectId","required":true,"schema":{"type":"string","minLength":1},"description":"Project unique identifier"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/projects/{projectId}/chain-payout-address":{"put":{"summary":"Update Chain Payout Addresses","tags":["Projects"],"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.","requestBody":{"content":{"application/json":{"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}}},"required":true},"parameters":[{"in":"path","name":"projectId","required":true,"schema":{"type":"string","minLength":1},"description":"Project unique identifier (UID or slug)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/projects/{identifier}/updates":{"get":{"summary":"Get Project Updates","tags":["Projects"],"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.","parameters":[{"in":"query","name":"programIds","required":false,"schema":{"type":"string"},"description":"Comma-separated list of program IDs in format programId_chainId (e.g., 920_42161,921_42161)"},{"in":"query","name":"includeFundingApplicationData","required":false,"schema":{"type":"string"},"description":"Flag to include funding application milestone completion data. Set to \"true\" to enable."},{"in":"query","name":"milestoneStatus","required":false,"schema":{"type":"string","enum":["pending","completed","verified"]},"description":"Filter milestones by lifecycle status. One of: pending, completed, verified. Omit to return all milestones."},{"in":"query","name":"dateFrom","required":false,"schema":{"type":"string"},"description":"ISO 8601 datetime. Filters activities whose timestamp >= dateFrom (applies to all activity types)."},{"in":"query","name":"dateTo","required":false,"schema":{"type":"string"},"description":"ISO 8601 datetime. Filters activities whose timestamp <= dateTo (applies to all activity types)."},{"in":"query","name":"hasAIEvaluation","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"description":"When true, keep only milestone activities with at least one AI evaluation. When false, keep only milestones without evaluations."},{"in":"query","name":"aiScoreMin","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0,"maximum":10},{"type":"string","pattern":"^\\d+$"}]},"description":"Integer 0-10. Keep only milestone activities whose max evaluation rating >= aiScoreMin. Implies hasAIEvaluation=true."},{"in":"query","name":"aiScoreMax","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0,"maximum":10},{"type":"string","pattern":"^\\d+$"}]},"description":"Integer 0-10. Keep only milestone activities whose max evaluation rating <= aiScoreMax. Implies hasAIEvaluation=true."},{"in":"path","name":"identifier","required":true,"schema":{"type":"string","minLength":1},"description":"Project identifier (UID or slug)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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 (0-10)"},"startsAt":{"type":"number","description":"Milestone start date as Unix timestamp"},"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"},"grantMilestoneIndex":{"type":"integer","description":"1-based position of this milestone within its parent grant (computed across all of the grant's milestones, before any status/date/AI filter is applied)"},"grantMilestoneTotal":{"type":"integer","description":"Total number of milestones in this milestone's parent grant (independent of the active filter)"}},"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/projects/{identifier}/milestones":{"get":{"summary":"Get Project Milestones","tags":["Projects"],"description":"Get project-level milestones (roadmap items) for a project by UID or slug. These are different from grant milestones.","parameters":[{"in":"path","name":"identifier","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/projects/{identifier}/grants":{"get":{"summary":"Get Project Grants","tags":["Projects"],"description":"Get all grants for a project by UID or slug. Returns grants with milestones, updates, and completion data.","parameters":[{"in":"path","name":"identifier","required":true,"schema":{"type":"string","minLength":1},"description":"Project identifier - either a UID (0x-prefixed hex string) or a slug"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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","description":"Legacy per-grant amount carried over from the original attestation. The Karma UI still displays this on the individual grant overview page for context. NOT the authoritative figure for program funding totals and NOT kept in sync with the disbursement/control-center flow. Do NOT sum this across grants — use GET /v2/programs/{programId}/financials for accurate program-level totals."},"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":"Legacy per-grant amount stored on the attestation when the grant was created. NOT updated by the current disbursement/control-center flow and NOT the authoritative source for funding totals. Do NOT sum this field across grants to compute program funding — use GET /v2/programs/{programId}/financials instead, which is what the Karma UI displays."},"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"},"attester":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/projects/{identifier}/grants/{programId}/milestones":{"get":{"summary":"Get Grant with Application Milestones (410 Gone)","tags":["Projects (Deprecated)"],"description":"DEPRECATED. Off-chain milestone mapping is no longer supplied. Returns 410 Gone. For grant + on-chain milestone data, use `GET /v2/projects/:identifier/grants` and read `grant.milestones[]`; for application-anchored milestones, read `application.milestoneStatuses[]` on the funding-application detail endpoint.","parameters":[{"in":"path","name":"identifier","required":true,"schema":{"type":"string"},"description":"Project UID or slug (auto-detected by 0x prefix)"},{"in":"path","name":"programId","required":true,"schema":{"type":"string"},"description":"Program ID to filter the grant"}],"deprecated":true,"responses":{"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/projects/contracts/address-availability":{"get":{"summary":"Check Contract Address Availability","tags":["Projects"],"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.","parameters":[{"in":"query","name":"address","required":true,"schema":{"type":"string","minLength":1}},{"in":"query","name":"network","required":true,"schema":{"type":"string","minLength":1}},{"in":"query","name":"excludeProjectId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/projects/download-csv":{"get":{"summary":"Download Projects CSV","tags":["Projects"],"description":"Download projects as CSV file filtered by date range. Returns a CSV file with project data for projects created between startDate and endDate.","parameters":[{"in":"query","name":"startDate","required":true,"schema":{"type":"string"}},{"in":"query","name":"endDate","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Default Response"}}}},"/v2/hermes/orgs/{slug}/provision":{"post":{"summary":"Provision (register) a Hermes container for a nonprofit org","tags":["Hermes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"communityId":{"type":"string","minLength":1,"maxLength":128,"nullable":true},"containerUrl":{"type":"string","format":"uri","maxLength":512},"sessionToken":{"type":"string","minLength":16,"maxLength":512}},"required":["containerUrl","sessionToken"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"communityId":{"type":"string","nullable":true},"status":{"type":"string","enum":["provisioning","active","suspended","failed"]},"statusReason":{"type":"string","nullable":true},"provisionedAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slug","communityId","status","statusReason","provisionedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hermes/orgs/{slug}":{"get":{"summary":"Get Hermes org metadata","tags":["Hermes"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"communityId":{"type":"string","nullable":true},"status":{"type":"string","enum":["provisioning","active","suspended","failed"]},"statusReason":{"type":"string","nullable":true},"provisionedAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slug","communityId","status","statusReason","provisionedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hermes/orgs/{slug}/profiles":{"get":{"summary":"List Hermes profiles in an org's container","tags":["Hermes"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"profiles":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"path":{"type":"string"},"is_default":{"type":"boolean"},"model":{"type":"string"},"provider":{"type":"string"},"has_env":{"type":"boolean"},"skill_count":{"type":"integer","minimum":0}},"required":["name"],"additionalProperties":false},"maxItems":100}},"required":["profiles"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hermes/orgs/{slug}/profiles/{profile}/soul":{"get":{"summary":"Read a profile SOUL.md (backs the About tab)","tags":["Hermes"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"profile","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"}},"required":["content"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"put":{"summary":"Update a profile SOUL.md (backs the About tab editor)","tags":["Hermes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","maxLength":64000}},"required":["content"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"profile","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}}],"responses":{"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hermes/orgs/{slug}/brain/{topic}":{"get":{"summary":"Read structured Org Brain payload for a topic","tags":["Hermes"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"topic","required":true,"schema":{"type":"string","enum":["mission","brand"]}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"topic":{"type":"string","enum":["mission","brand"]},"exists":{"type":"boolean"},"data":{"type":"object","additionalProperties":{}}},"required":["topic","exists","data"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"put":{"summary":"Save structured Org Brain payload (mission or brand)","tags":["Hermes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"topic","required":true,"schema":{"type":"string","enum":["mission","brand"]}}],"responses":{"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hermes/orgs/{slug}/work/tasks":{"get":{"summary":"List work tasks (kanban board flattened, archived filtered out)","tags":["Hermes"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["queued","working","blocked","done"]},"hermesStatus":{"type":"string"},"assignee":{"type":"string","nullable":true},"priority":{"type":"number"},"latestSummary":{"type":"string","nullable":true},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["id","title","status","hermesStatus"],"additionalProperties":false},"maxItems":500}},"required":["tasks"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"post":{"summary":"Create a new work task","tags":["Hermes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","maxLength":8000},"assignee":{"type":"string","maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"},"priority":{"type":"integer","minimum":0,"maximum":100}},"required":["title"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["queued","working","blocked","done"]},"hermesStatus":{"type":"string"},"assignee":{"type":"string","nullable":true},"priority":{"type":"number"},"latestSummary":{"type":"string","nullable":true},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["id","title","status","hermesStatus"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hermes/orgs/{slug}/work/tasks/{taskId}":{"get":{"summary":"Get a work task with comments","tags":["Hermes"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"taskId","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["queued","working","blocked","done"]},"hermesStatus":{"type":"string"},"assignee":{"type":"string","nullable":true},"priority":{"type":"number"},"latestSummary":{"type":"string","nullable":true},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"number"}]},"author":{"type":"string"},"body":{"type":"string"},"createdAt":{"type":"number"}},"required":["id","body","createdAt"],"additionalProperties":false},"maxItems":500},"activity":{"type":"object","properties":{"currentRun":{"type":"object","properties":{"id":{"type":"number"},"profile":{"type":"string","nullable":true},"status":{"type":"string"},"workerPid":{"type":"number","nullable":true},"startedAt":{"type":"number","nullable":true},"endedAt":{"type":"number","nullable":true},"lastHeartbeatAt":{"type":"number","nullable":true},"claimExpires":{"type":"number","nullable":true},"consecutiveFailures":{"type":"number"},"lastError":{"type":"string","nullable":true}},"required":["id","profile","status","workerPid","startedAt","endedAt","lastHeartbeatAt","claimExpires","lastError"],"additionalProperties":false,"nullable":true},"latestHeartbeatNote":{"type":"string","nullable":true},"recentEvents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"runId":{"type":"number","nullable":true},"kind":{"type":"string"},"note":{"type":"string","nullable":true},"createdAt":{"type":"number"}},"required":["id","runId","kind","note","createdAt"],"additionalProperties":false},"maxItems":50},"runCount":{"type":"number"}},"required":["currentRun","latestHeartbeatNote","recentEvents","runCount"],"additionalProperties":false}},"required":["id","title","status","hermesStatus","comments"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"delete":{"summary":"Archive (soft-delete) a work task","tags":["Hermes"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"taskId","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}}],"responses":{"204":{"description":"Default Response"},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hermes/orgs/{slug}/work/tasks/{taskId}/status":{"put":{"summary":"Transition a work task to a new product status","tags":["Hermes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["queued","working","blocked","done"]},"block_reason":{"type":"string","maxLength":1000}},"required":["status"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"taskId","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["queued","working","blocked","done"]},"hermesStatus":{"type":"string"},"assignee":{"type":"string","nullable":true},"priority":{"type":"number"},"latestSummary":{"type":"string","nullable":true},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["id","title","status","hermesStatus"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hermes/orgs/{slug}/work/tasks/{taskId}/assignee":{"put":{"summary":"Reassign a work task (null = unassign)","tags":["Hermes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assignee":{"type":"string","maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$","nullable":true}},"required":["assignee"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"taskId","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["queued","working","blocked","done"]},"hermesStatus":{"type":"string"},"assignee":{"type":"string","nullable":true},"priority":{"type":"number"},"latestSummary":{"type":"string","nullable":true},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["id","title","status","hermesStatus"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hermes/orgs/{slug}/work/tasks/{taskId}/comments":{"post":{"summary":"Add a comment to a work task","tags":["Hermes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":8000}},"required":["body"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"taskId","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hermes/orgs/{slug}/skills/available":{"get":{"summary":"List the catalog of skills bundled in the org container","tags":["Hermes"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"namespace":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"version":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"},"maxItems":50}},"required":["id","namespace","name","description","version","tags"],"additionalProperties":false},"maxItems":500}},"required":["skills"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hermes/orgs/{slug}/profiles/{profile}/skills":{"get":{"summary":"List skills installed for a profile","tags":["Hermes"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"profile","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"namespace":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"version":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"},"maxItems":50}},"required":["id","namespace","name","description","version","tags"],"additionalProperties":false},"maxItems":500}},"required":["skills"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"post":{"summary":"Install a catalog skill into a profile (idempotent)","tags":["Hermes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":3,"maxLength":129,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}\\/[a-z0-9][a-z0-9_-]{0,63}$"}},"required":["id"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"profile","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"installed":{"type":"boolean"},"skill":{"type":"object","properties":{"id":{"type":"string"},"namespace":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"version":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"},"maxItems":50}},"required":["id","namespace","name","description","version","tags"],"additionalProperties":false,"nullable":true}},"required":["installed","skill"],"additionalProperties":false}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"installed":{"type":"boolean"},"skill":{"type":"object","properties":{"id":{"type":"string"},"namespace":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"version":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"},"maxItems":50}},"required":["id","namespace","name","description","version","tags"],"additionalProperties":false,"nullable":true}},"required":["installed","skill"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hermes/orgs/{slug}/profiles/{profile}/skills/{namespace}/{skillId}":{"delete":{"summary":"Uninstall a skill from a profile (idempotent)","tags":["Hermes"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"profile","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}},{"in":"path","name":"namespace","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}},{"in":"path","name":"skillId","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"boolean"},"id":{"type":"string"}},"required":["removed","id"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hermes/orgs/{slug}/profiles/{profile}/chat":{"post":{"summary":"Start a chat run with a profile","tags":["Hermes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":8000},"previousResponseId":{"type":"string","maxLength":80}},"required":["message"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"profile","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string"},"sessionId":{"type":"string"}},"required":["runId","sessionId"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hermes/orgs/{slug}/profiles/{profile}/chat/{runId}":{"get":{"summary":"Get chat run status","tags":["Hermes"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"profile","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}},{"in":"path","name":"runId","required":true,"schema":{"type":"string","minLength":1,"maxLength":80,"pattern":"^run_[A-Za-z0-9]{8,64}$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting_for_approval","completed","failed","cancelled"]},"sessionId":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"lastEvent":{"type":"string","nullable":true},"createdAt":{"type":"number","nullable":true},"updatedAt":{"type":"number","nullable":true}},"required":["runId","status","sessionId","model","lastEvent","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hermes/orgs/{slug}/profiles/{profile}/chat/{runId}/events":{"get":{"summary":"Stream chat run events (SSE)","tags":["Hermes"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"profile","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}},{"in":"path","name":"runId","required":true,"schema":{"type":"string","minLength":1,"maxLength":80,"pattern":"^run_[A-Za-z0-9]{8,64}$"}}],"responses":{"200":{"description":"Default Response"}}}},"/v2/hermes/orgs/{slug}/profiles/{profile}/chat/{runId}/stop":{"post":{"summary":"Cancel an in-flight chat run","tags":["Hermes"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"profile","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}},{"in":"path","name":"runId","required":true,"schema":{"type":"string","minLength":1,"maxLength":80,"pattern":"^run_[A-Za-z0-9]{8,64}$"}}],"responses":{"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hermes/orgs/{slug}/profiles/{profile}/uploads":{"get":{"summary":"List chat files uploaded for this profile","tags":["Hermes"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"profile","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"sha256":{"type":"string"},"filename":{"type":"string"},"mime":{"type":"string","nullable":true},"size":{"type":"integer","minimum":0}},"required":["sha256","filename","mime","size"],"additionalProperties":false},"maxItems":1000}},"required":["files"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"post":{"summary":"Upload a file for use in chat with this profile","tags":["Hermes"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"profile","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"sha256":{"type":"string"},"filename":{"type":"string"},"mime":{"type":"string","nullable":true},"size":{"type":"integer","minimum":0}},"required":["sha256","filename","mime","size"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hermes/orgs/{slug}/profiles/{profile}/uploads/{sha256}":{"get":{"summary":"Download a chat upload by sha256","tags":["Hermes"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"profile","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}},{"in":"path","name":"sha256","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"responses":{"200":{"description":"Default Response"}}},"delete":{"summary":"Delete a chat upload","tags":["Hermes"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"profile","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}},{"in":"path","name":"sha256","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"boolean"},"sha256":{"type":"string"}},"required":["removed","sha256"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hermes/orgs/{slug}/work/tasks/{taskId}/attachments":{"get":{"summary":"List attachments for a kanban task","tags":["Hermes"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"taskId","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"sha256":{"type":"string"},"filename":{"type":"string"},"mime":{"type":"string","nullable":true},"size":{"type":"integer","minimum":0}},"required":["sha256","filename","mime","size"],"additionalProperties":false},"maxItems":1000}},"required":["files"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"post":{"summary":"Attach a file to a kanban task","tags":["Hermes"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"taskId","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"sha256":{"type":"string"},"filename":{"type":"string"},"mime":{"type":"string","nullable":true},"size":{"type":"integer","minimum":0}},"required":["sha256","filename","mime","size"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hermes/orgs/{slug}/work/tasks/{taskId}/attachments/{sha256}":{"get":{"summary":"Download a task attachment","tags":["Hermes"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"taskId","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}},{"in":"path","name":"sha256","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"responses":{"200":{"description":"Default Response"}}},"delete":{"summary":"Delete a task attachment","tags":["Hermes"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"taskId","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}},{"in":"path","name":"sha256","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"boolean"},"sha256":{"type":"string"}},"required":["removed","sha256"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hermes/orgs/mine":{"get":{"summary":"List orgs the caller is a member of","tags":["Hermes"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"orgs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string"},"role":{"type":"string"},"joinedAt":{"type":"string"}},"required":["id","slug","status","role","joinedAt"],"additionalProperties":false},"maxItems":200}},"required":["orgs"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hermes/orgs/{slug}/members":{"get":{"summary":"List org members and pending invites","tags":["Hermes"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"publicAddress":{"type":"string"},"email":{"type":"string","nullable":true},"invitedBy":{"type":"string","nullable":true},"joinedAt":{"type":"string"}},"required":["publicAddress","email","invitedBy","joinedAt"],"additionalProperties":false},"maxItems":100},"pendingInvites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"invitedBy":{"type":"string"},"expiresAt":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","email","invitedBy","expiresAt","createdAt"],"additionalProperties":false},"maxItems":100}},"required":["members","pendingInvites"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hermes/orgs/{slug}/members/invite":{"post":{"summary":"Invite a teammate to the org by email","tags":["Hermes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","maxLength":320}},"required":["email"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"invitedBy":{"type":"string"},"expiresAt":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","email","invitedBy","expiresAt","createdAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hermes/orgs/{slug}/members/accept":{"post":{"summary":"Accept a pending org invite","tags":["Hermes"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":20,"maxLength":256,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["token"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string"},"role":{"type":"string"},"joinedAt":{"type":"string"}},"required":["id","slug","status","role","joinedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hermes/orgs/{slug}/members/{publicAddress}":{"delete":{"summary":"Remove a member from the org","tags":["Hermes"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"publicAddress","required":true,"schema":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}],"responses":{"204":{"description":"Default Response"},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hermes/orgs/{slug}/invites/{inviteId}":{"delete":{"summary":"Revoke a pending org invite","tags":["Hermes"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]{0,63}$"}},{"in":"path","name":"inviteId","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+$"}}],"responses":{"204":{"description":"Default Response"},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/projects/contracts/deployer":{"get":{"summary":"Get Contract Deployer Address","tags":["Contract Verification"],"description":"Lookup the deployer address of a smart contract. Returns the address that originally deployed the contract along with transaction details. Requires authentication.","parameters":[{"in":"query","name":"network","required":true,"schema":{"type":"string","minLength":1},"description":"Blockchain network name"},{"in":"query","name":"contractAddress","required":true,"schema":{"type":"string"},"description":"Smart contract address to lookup deployer for"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/projects/contracts/verify-message":{"post":{"summary":"Generate Contract Verification Message","tags":["Contract Verification"],"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.","requestBody":{"content":{"application/json":{"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}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/projects/contracts/verify-signature":{"post":{"summary":"Verify Contract Ownership Signature","tags":["Contract Verification"],"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.","requestBody":{"content":{"application/json":{"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}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/":{"get":{"summary":"Get All Communities","tags":["Community"],"description":"Get all communities with optional filtering and pagination","parameters":[{"in":"query","name":"page","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"limit","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"includeStats","required":false,"schema":{"type":"boolean","default":false}},{"in":"query","name":"groupSimilarCommunities","required":false,"schema":{"type":"boolean","default":true}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"post":{"summary":"Create Community","tags":["Community"],"description":"Create a new community via server-side EAS attestation. Requires authentication. Free tier: max 1 community per non-staff user.","requestBody":{"content":{"application/json":{"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}}},"required":true},"responses":{"200":{"description":"Default Response"}}}},"/v2/communities/stats":{"get":{"summary":"Get Global Community Stats","tags":["Community"],"description":"Get global statistics across all communities including total grants, projects funded, and milestones completed","responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/slug/check/{slug}":{"get":{"summary":"Check Community Slug Availability","tags":["Community"],"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.","parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"pattern":"^[a-z0-9_-]+$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{uidOrSlug}":{"get":{"summary":"Get Community","tags":["Community"],"description":"Get a community by its UID or slug identifier","parameters":[{"in":"path","name":"uidOrSlug","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{slug}/stats":{"get":{"summary":"Get Community Stats","tags":["Community"],"description":"Get community statistics by slug","parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{slug}/impact":{"get":{"summary":"Get Community Impact","tags":["Community"],"description":"Get impact data for a community with stats and categorized segments. Optionally filter stats by programId or projectId.","parameters":[{"in":"query","name":"programId","required":false,"schema":{"type":"string"},"description":"Filter stats by program ID"},{"in":"query","name":"projectId","required":false,"schema":{"type":"string"},"description":"Filter stats by project ID"},{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{slug}/projects":{"get":{"summary":"Get Community Projects","tags":["Community"],"description":"Get paginated projects by community slug","parameters":[{"in":"query","name":"page","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"limit","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"sortBy","required":false,"schema":{"type":"string"}},{"in":"query","name":"categories","required":false,"schema":{"type":"string"}},{"in":"query","name":"programIds","required":false,"schema":{"type":"string"}},{"in":"query","name":"trackIds","required":false,"schema":{"type":"string"}},{"in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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"},"numCompletedMilestones":{"type":"number","description":"Number of completed 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","numCompletedMilestones","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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{uidOrSlug}/project-updates":{"get":{"summary":"Get Community Project Updates","tags":["Community"],"description":"Get paginated project updates by community UID or slug","parameters":[{"in":"query","name":"status","required":false,"schema":{"type":"string","enum":["pending","completed","in_progress","cancelled","past_due"]}},{"in":"query","name":"page","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"limit","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"programId","required":false,"schema":{"type":"string"},"description":"Filter by program ID"},{"in":"query","name":"projectId","required":false,"schema":{"type":"string"},"description":"Filter by project UID or slug"},{"in":"query","name":"sortBy","required":false,"schema":{"type":"string","enum":["dueDate","status","title","projectTitle","grantTitle","completionDate"]},"description":"Field to sort milestones by. When omitted, milestones are returned in the canonical community-updates order: pending (including past_due) first ascending by dueDate, then completed last descending by updatedAt."},{"in":"query","name":"sortOrder","required":false,"schema":{"type":"string","enum":["asc","desc"]},"description":"Sort direction (defaults to asc when sortBy is provided; ignored when sortBy is omitted)"},{"in":"path","name":"uidOrSlug","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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)"},"grantMilestoneIndex":{"type":"integer","minimum":1,"description":"1-based position of this milestone within its parent grant, ordered by due date ascending"},"grantMilestoneTotal":{"type":"integer","minimum":1,"description":"Total number of milestones in the parent grant"},"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{slug}/grants":{"get":{"summary":"Get Community Grants","tags":["Community"],"description":"Get all grants for a community with optional filtering, pagination, and export. Use download=true with format=csv|json to export.","parameters":[{"in":"query","name":"page","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"pageLimit","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]},"description":"Capped to 1000 items per request, 5000 for downloads"},{"in":"query","name":"sort","required":false,"schema":{"type":"string","enum":["projectTitle","createdAt","updatedAt","status","totalMilestones"]},"description":"Sort field"},{"in":"query","name":"status","required":false,"schema":{"type":"string","enum":["all","active","completed","pending"]},"description":"Filter by grant status"},{"in":"query","name":"categories","required":false,"schema":{"type":"string"},"description":"Comma-separated category names"},{"in":"query","name":"selectedProgramIds","required":false,"schema":{"type":"string"},"description":"Comma-separated program IDs (e.g., \"1013\" or \"1013_10\")"},{"in":"query","name":"selectedTrackIds","required":false,"schema":{"type":"string"},"description":"Comma-separated track IDs"},{"in":"query","name":"download","required":false,"schema":{"type":"string"},"description":"Set to \"true\" to download as file"},{"in":"query","name":"format","required":false,"schema":{"type":"string","enum":["csv","json"],"default":"csv"},"description":"Export format when download=true"},{"in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{communityId}/payouts/public":{"get":{"summary":"Get Community Payouts (Public, per-grant detail)","tags":["Community"],"description":"Paginated per-grant payout/disbursement detail for a community. Public read-only endpoint; sensitive treasury fields (safeAddress, safeTransactionHash, createdBy, etc.) are stripped. Use this for grant-by-grant payout breakdowns. For program-level funding totals (totalAllocated / totalDisbursed across all grants in a program) call GET /v2/programs/{programId}/financials instead — that is the authoritative source matching the Karma UI.","parameters":[{"in":"query","name":"page","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]},"description":"Page number"},{"in":"query","name":"limit","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]},"description":"Items per page"},{"in":"query","name":"programId","required":false,"schema":{"type":"string","pattern":"^[\\w-]+$"},"description":"Filter by program ID"},{"in":"query","name":"status","required":false,"schema":{"type":"string","enum":["NOT_STARTED","IN_PROGRESS","COMPLETED"]},"description":"Filter by aggregated disbursement status"},{"in":"query","name":"agreementStatus","required":false,"schema":{"type":"string","enum":["signed","not_signed"]},"description":"Filter by agreement status"},{"in":"query","name":"invoiceStatus","required":false,"schema":{"type":"string","enum":["all_received","needs_invoices","has_invoices"]},"description":"Filter by invoice completion status"},{"in":"query","name":"search","required":false,"schema":{"type":"string","maxLength":200},"description":"Search by project or grant name"},{"in":"query","name":"sortBy","required":false,"schema":{"type":"string","enum":["project_title","grant_title","payout_amount","disbursed_amount","status"]},"description":"Field to sort by"},{"in":"query","name":"sortOrder","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"},"description":"Sort order"},{"in":"path","name":"communityId","required":true,"schema":{"type":"string","minLength":1},"description":"The community UID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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},"resolvedProjectName":{"type":"string"}},"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},"completionReason":{"type":"string","maxLength":10000,"nullable":true}},"required":["milestoneLabel","milestoneUID","milestoneStatus","milestoneDueDate","milestoneStatusUpdatedAt","invoiceStatus","invoiceReceivedAt","invoiceFileKey","paymentStatus","paymentStatusDate","completionReason"],"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{communityId}/payouts":{"get":{"summary":"Get Community Payouts","tags":["Community"],"description":"Get paginated payouts for a community with filtering and sorting. Requires community admin or staff permissions.","parameters":[{"in":"query","name":"page","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]},"description":"Page number"},{"in":"query","name":"limit","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]},"description":"Items per page"},{"in":"query","name":"programId","required":false,"schema":{"type":"string","pattern":"^[\\w-]+$"},"description":"Filter by program ID"},{"in":"query","name":"status","required":false,"schema":{"type":"string","enum":["NOT_STARTED","IN_PROGRESS","COMPLETED"]},"description":"Filter by aggregated disbursement status"},{"in":"query","name":"agreementStatus","required":false,"schema":{"type":"string","enum":["signed","not_signed"]},"description":"Filter by agreement status"},{"in":"query","name":"invoiceStatus","required":false,"schema":{"type":"string","enum":["all_received","needs_invoices","has_invoices"]},"description":"Filter by invoice completion status"},{"in":"query","name":"search","required":false,"schema":{"type":"string","maxLength":200},"description":"Search by project or grant name"},{"in":"query","name":"sortBy","required":false,"schema":{"type":"string","enum":["project_title","grant_title","payout_amount","disbursed_amount","status"]},"description":"Field to sort by"},{"in":"query","name":"sortOrder","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"},"description":"Sort order"},{"in":"path","name":"communityId","required":true,"schema":{"type":"string","minLength":1},"description":"The community UID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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},"resolvedProjectName":{"type":"string"}},"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},"completionReason":{"type":"string","maxLength":10000,"nullable":true}},"required":["milestoneLabel","milestoneUID","milestoneStatus","milestoneDueDate","milestoneStatusUpdatedAt","invoiceStatus","invoiceReceivedAt","invoiceFileKey","paymentStatus","paymentStatusDate","completionReason"],"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{uidOrSlug}/community-metrics":{"get":{"summary":"Get Community Metrics","tags":["Community"],"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.","parameters":[{"in":"query","name":"startDate","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"Filter metrics from this date (inclusive, YYYY-MM-DD)"},{"in":"query","name":"endDate","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"Filter metrics until this date (inclusive, YYYY-MM-DD)"},{"in":"path","name":"uidOrSlug","required":true,"schema":{"type":"string","minLength":1},"description":"The community UID (0x...) or slug identifier"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/community-configs/{slugOrUid}":{"get":{"summary":"Get Community Info with Config","tags":["Community Config"],"description":"Get community information along with its configuration by slug or UID. Requires staff authentication.","parameters":[{"in":"path","name":"slugOrUid","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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"},"disableReviewerEmails":{"type":"boolean","description":"Whether reviewer/admin/finance emails are disabled"},"telegramChats":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":32,"pattern":"^-?\\d+$"},"name":{"type":"string","maxLength":128}},"required":["id","name"],"additionalProperties":false}},"telegramEnabled":{"type":"boolean"},"slackWebhookUrls":{"type":"array","items":{"type":"string"}},"slackEnabled":{"type":"boolean"},"accessDeniedUnauthenticatedMessage":{"type":"string","nullable":true,"description":"Markdown override shown when the visitor is not signed in"},"accessDeniedForbiddenMessage":{"type":"string","nullable":true,"description":"Markdown override shown when the visitor is signed in but lacks the page's required role"},"createdAt":{"type":"string","description":"Config creation timestamp"},"updatedAt":{"type":"string","description":"Config last update timestamp"}},"required":["communityUID","rank","public","disableReviewerEmails","createdAt","updatedAt"],"additionalProperties":false,"nullable":true,"description":"Community configuration"}},"required":["community","config"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"put":{"summary":"Update Community Config","tags":["Community Config"],"description":"Update community configuration settings by slug or UID. Requires authentication.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"public":{"type":"boolean"},"rank":{"type":"number"},"disableReviewerEmails":{"type":"boolean"},"telegramChats":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":32,"pattern":"^-?\\d+$"},"name":{"type":"string","maxLength":128}},"required":["id","name"],"additionalProperties":false},"maxItems":50},"telegramEnabled":{"type":"boolean"},"slackWebhookUrls":{"type":"array","items":{"type":"string","format":"uri","maxLength":2048},"maxItems":50},"slackEnabled":{"type":"boolean"},"accessDeniedUnauthenticatedMessage":{"type":"string","maxLength":500,"nullable":true},"accessDeniedForbiddenMessage":{"type":"string","maxLength":500,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"in":"path","name":"slugOrUid","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"communityUID":{"type":"string"},"rank":{"type":"number"},"public":{"type":"boolean"},"disableReviewerEmails":{"type":"boolean"},"telegramChats":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":32,"pattern":"^-?\\d+$"},"name":{"type":"string","maxLength":128}},"required":["id","name"],"additionalProperties":false}},"telegramEnabled":{"type":"boolean"},"slackWebhookUrls":{"type":"array","items":{"type":"string"}},"slackEnabled":{"type":"boolean"},"accessDeniedUnauthenticatedMessage":{"type":"string","nullable":true},"accessDeniedForbiddenMessage":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["communityUID","rank","public","disableReviewerEmails","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/community-configs/{slugOrUid}/access-denied-messages":{"get":{"summary":"Get Access Denied Messages (public)","tags":["Community Config"],"description":"Public endpoint: returns per-community Markdown overrides for the AccessDenied page (unauthenticated + forbidden scenarios). No authentication required. Returns nulls when the community has not customized either message.","parameters":[{"in":"path","name":"slugOrUid","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"unauthenticatedMessage":{"type":"string","nullable":true,"description":"Per-community Markdown shown when the visitor is not signed in. Null falls back to the hard-coded default."},"forbiddenMessage":{"type":"string","nullable":true,"description":"Per-community Markdown shown when the visitor is signed in but lacks the required role. Null falls back to the hard-coded default."}},"required":["unauthenticatedMessage","forbiddenMessage"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/community-configs/{slug}/telegram-pair/start":{"post":{"summary":"Start Telegram Pairing","tags":["Community Config"],"description":"Start the Telegram pairing flow. Returns a one-time KARMA-PAIR-* token (2 min TTL). The admin adds the Karma bot to a group and sends `/karma_pair <token>`; the bot POSTs to /v2/telegram-pair/claim and the FE poll of /telegram-pair/verify completes the binding.","parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"One-time pairing token with format KARMA-PAIR-XXXXXXXXXX"},"expiresAt":{"type":"string","description":"ISO-8601 expiry timestamp (2 min TTL)"}},"required":["token","expiresAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/community-configs/{slug}/telegram-pair/verify":{"post":{"summary":"Verify Telegram Pairing","tags":["Community Config"],"description":"Verify a Telegram pairing token by scanning recent bot updates. On success, appends the matched chat ID to the community config.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","pattern":"^KARMA-PAIR-[A-Za-z0-9_-]{10}$"}},"required":["token"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"chatId":{"type":"string","description":"Telegram chat ID (as string to handle bigints)"},"chatTitle":{"type":"string","description":"Chat title as reported by Telegram"},"chatType":{"type":"string","enum":["group","supergroup","channel","private"]},"alreadyPaired":{"type":"boolean","description":"True if the chat ID was already in telegramChats"}},"required":["chatId","chatTitle","chatType","alreadyPaired"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{communityId}/slack-oauth/workspace":{"post":{"summary":"Register Slack workspace for community","tags":["Slack OAuth"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","minLength":1,"maxLength":32},"teamName":{"type":"string","minLength":1,"maxLength":128},"botUserId":{"type":"string","minLength":1,"maxLength":32},"botToken":{"type":"string","minLength":20,"maxLength":500},"scopes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":32}},"required":["teamId","teamName","botUserId","botToken"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"communityId","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"uid":{"type":"string"},"teamId":{"type":"string"},"teamName":{"type":"string"},"botUserId":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["ACTIVE","REVOKED","ERROR"]},"statusReason":{"type":"string","nullable":true},"installedByUserId":{"type":"string"},"installedAt":{"type":"string"},"lastSuccessAt":{"type":"string","nullable":true},"lastFailureAt":{"type":"string","nullable":true},"consecutiveFailures":{"type":"integer"},"revokedAt":{"type":"string","nullable":true}},"required":["uid","teamId","teamName","botUserId","scopes","status","statusReason","installedByUserId","installedAt","lastSuccessAt","lastFailureAt","consecutiveFailures","revokedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"get":{"summary":"Get active Slack workspace for community","tags":["Slack OAuth"],"parameters":[{"in":"path","name":"communityId","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"uid":{"type":"string"},"teamId":{"type":"string"},"teamName":{"type":"string"},"botUserId":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["ACTIVE","REVOKED","ERROR"]},"statusReason":{"type":"string","nullable":true},"installedByUserId":{"type":"string"},"installedAt":{"type":"string"},"lastSuccessAt":{"type":"string","nullable":true},"lastFailureAt":{"type":"string","nullable":true},"consecutiveFailures":{"type":"integer"},"revokedAt":{"type":"string","nullable":true}},"required":["uid","teamId","teamName","botUserId","scopes","status","statusReason","installedByUserId","installedAt","lastSuccessAt","lastFailureAt","consecutiveFailures","revokedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{communityId}/slack-oauth/workspace/{uid}":{"delete":{"summary":"Delete Slack workspace registration","tags":["Slack OAuth"],"parameters":[{"in":"path","name":"communityId","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}},{"in":"path","name":"uid","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{communityId}/slack-oauth/workspace/{uid}/test":{"post":{"summary":"Test Slack workspace connection","tags":["Slack OAuth"],"parameters":[{"in":"path","name":"communityId","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}},{"in":"path","name":"uid","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string"},"botUserId":{"type":"string"}},"required":["teamId","botUserId"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{communityId}/slack-oauth/workspace/{uid}/members":{"get":{"summary":"Search Slack workspace members (cached)","tags":["Slack OAuth"],"parameters":[{"in":"query","name":"q","required":false,"schema":{"type":"string","minLength":1,"maxLength":80}},{"in":"query","name":"limit","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"in":"path","name":"communityId","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}},{"in":"path","name":"uid","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"slackUserId":{"type":"string"},"displayName":{"type":"string"},"realName":{"type":"string"},"email":{"type":"string"},"isBot":{"type":"boolean"},"deleted":{"type":"boolean"}},"required":["slackUserId","displayName","realName","isBot","deleted"],"additionalProperties":false},"maxItems":100},"total":{"type":"integer"}},"required":["items","total"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/slack-oauth/install":{"get":{"summary":"Start the distributed OAuth install flow","tags":["Slack OAuth"],"responses":{"200":{"description":"Default Response"}}}},"/v2/slack-oauth/authorize-url":{"get":{"summary":"Get a signed Slack authorize URL (JSON, for SPA use)","tags":["Slack OAuth"],"responses":{"200":{"description":"Default Response"}}}},"/v2/slack-oauth/callback":{"get":{"summary":"OAuth callback — exchanges code for token, redirects to settings","tags":["Slack OAuth"],"responses":{"200":{"description":"Default Response"}}}},"/v2/slack-oauth/events":{"post":{"summary":"Slack Events API webhook (app_uninstalled, tokens_revoked, ...)","tags":["Slack OAuth"],"responses":{"200":{"description":"Default Response"}}}},"/v2/funding-program-configs/my-reviewer-programs":{"get":{"summary":"Get My Reviewer Programs","tags":["Funding Programs"],"description":"Get funding programs where the authenticated user is a reviewer","responses":{"200":{"description":"List of programs where user is a reviewer","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Funding program database ID"},"programId":{"type":"string","description":"Program identifier"},"chainID":{"type":"number","nullable":true,"description":"Blockchain chain ID (null for off-chain programs)"},"createdAt":{"type":"string","description":"Program creation date"},"updatedAt":{"type":"string","description":"Program update date"},"name":{"type":"string","description":"Program name"},"metadata":{"type":"object","additionalProperties":{},"description":"Program metadata"},"langfusePromptId":{"type":"string","description":"Langfuse prompt ID"},"communityUID":{"type":"string","description":"Community unique identifier"},"communitySlug":{"type":"string","description":"Community slug"},"communityName":{"type":"string","description":"Community name"},"communityImage":{"type":"string","description":"Community image URL"},"applicationConfig":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Whether applications are enabled"},"formSchema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Form schema ID"},"title":{"type":"string","description":"Form title"},"description":{"type":"string","description":"Form description"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Field unique identifier"},"type":{"type":"string","description":"Field type (text, textarea, select, etc.)"},"label":{"type":"string","description":"Field label"},"required":{"type":"boolean","description":"Whether field is required"},"placeholder":{"type":"string","description":"Field placeholder text"},"description":{"type":"string","description":"Field description"},"validation":{"type":"object","additionalProperties":{},"description":"Field validation rules"},"aiEvaluation":{"type":"object","additionalProperties":{},"description":"AI evaluation configuration"},"private":{"type":"boolean","description":"Whether field is private"},"deleted":{"type":"boolean","description":"Whether field is soft deleted (internal use only)"}},"required":["id","type","label"],"additionalProperties":false},"description":"Form fields"},"settings":{"type":"object","properties":{"privateApplications":{"type":"boolean","description":"Whether private applications are enabled"},"submitButtonText":{"type":"string","description":"Submit button text"},"confirmationMessage":{"type":"string","description":"Confirmation message after submission"},"donationRound":{"type":"boolean","description":"Whether this is a donation round"},"showCommentsOnPublicPage":{"type":"boolean","description":"Whether comments should be shown on public application page"}},"additionalProperties":false,"description":"Form settings"},"aiConfig":{"type":"object","properties":{"langfusePromptId":{"type":"string","description":"Langfuse prompt ID for AI evaluation"},"aiModel":{"type":"string","description":"AI model to use for evaluation"}},"additionalProperties":false,"description":"AI configuration for evaluation"}},"required":["id","title","fields","settings"],"additionalProperties":false},{"type":"object","additionalProperties":{}}],"description":"Form schema configuration"},"postApprovalFormSchema":{"anyOf":[{"$ref":"#/items/properties/applicationConfig/properties/formSchema/anyOf/0"},{"type":"object","additionalProperties":{}}],"description":"Post-approval form schema configuration"},"createdAt":{"type":"string","description":"Configuration creation date"},"updatedAt":{"type":"string","description":"Configuration update date"}},"additionalProperties":false,"nullable":true,"description":"Application configuration"},"metrics":{"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"}},"additionalProperties":false,"description":"Application metrics"},"isProgramReviewer":{"type":"boolean","description":"Whether user is a program reviewer for this program"},"isMilestoneReviewer":{"type":"boolean","description":"Whether user is a milestone reviewer for this program"}},"required":["programId","chainID","createdAt","updatedAt"],"additionalProperties":false},"description":"List of programs where user is a reviewer"}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-program-configs/{programId}":{"post":{"summary":"Create Program Configuration","tags":["Funding Programs"],"description":"Create funding program configuration for existing programs. Requires PROGRAM_EDIT permission. programId may include chainId suffix for duplicates","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"isEnabled":{"type":"boolean","default":false},"formSchema":{"type":"object","additionalProperties":{},"nullable":true},"postApprovalFormSchema":{"type":"object","additionalProperties":{},"nullable":true},"kycFormUrl":{"type":"string","format":"uri","nullable":true},"kybFormUrl":{"type":"string","format":"uri","nullable":true},"reviewers":{"type":"array","items":{"type":"object","properties":{"name":{"allOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"string","minLength":1}]},"email":{"type":"string","format":"email"},"telegram":{"allOf":[{"type":"string","maxLength":200},{"anyOf":[{"type":"string","pattern":"^@?[a-zA-Z0-9_]{5,32}$"},{"type":"string","enum":[""]}]}],"description":"Telegram handle"},"slack":{"allOf":[{"type":"string","maxLength":254},{"anyOf":[{"type":"string","minLength":2},{"type":"string","enum":[""]}]}],"description":"Slack member ID, email, or display name"}},"required":["name","email"],"additionalProperties":false}}},"additionalProperties":true}}}},"parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Funding program database ID"},"programId":{"type":"string","description":"Program identifier"},"chainID":{"type":"number","nullable":true,"description":"Blockchain chain ID (null for off-chain programs)"},"createdAt":{"type":"string","description":"Program creation date"},"updatedAt":{"type":"string","description":"Program update date"},"name":{"type":"string","description":"Program name"},"metadata":{"type":"object","additionalProperties":{},"description":"Program metadata"},"langfusePromptId":{"type":"string","description":"Langfuse prompt ID"},"communityUID":{"type":"string","description":"Community unique identifier"},"communitySlug":{"type":"string","description":"Community slug"},"communityName":{"type":"string","description":"Community name"},"communityImage":{"type":"string","description":"Community image URL"},"applicationConfig":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Whether applications are enabled"},"formSchema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Form schema ID"},"title":{"type":"string","description":"Form title"},"description":{"type":"string","description":"Form description"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Field unique identifier"},"type":{"type":"string","description":"Field type (text, textarea, select, etc.)"},"label":{"type":"string","description":"Field label"},"required":{"type":"boolean","description":"Whether field is required"},"placeholder":{"type":"string","description":"Field placeholder text"},"description":{"type":"string","description":"Field description"},"validation":{"type":"object","additionalProperties":{},"description":"Field validation rules"},"aiEvaluation":{"type":"object","additionalProperties":{},"description":"AI evaluation configuration"},"private":{"type":"boolean","description":"Whether field is private"},"deleted":{"type":"boolean","description":"Whether field is soft deleted (internal use only)"}},"required":["id","type","label"],"additionalProperties":false},"description":"Form fields"},"settings":{"type":"object","properties":{"privateApplications":{"type":"boolean","description":"Whether private applications are enabled"},"submitButtonText":{"type":"string","description":"Submit button text"},"confirmationMessage":{"type":"string","description":"Confirmation message after submission"},"donationRound":{"type":"boolean","description":"Whether this is a donation round"},"showCommentsOnPublicPage":{"type":"boolean","description":"Whether comments should be shown on public application page"}},"additionalProperties":false,"description":"Form settings"},"aiConfig":{"type":"object","properties":{"langfusePromptId":{"type":"string","description":"Langfuse prompt ID for AI evaluation"},"aiModel":{"type":"string","description":"AI model to use for evaluation"}},"additionalProperties":false,"description":"AI configuration for evaluation"}},"required":["id","title","fields","settings"],"additionalProperties":false},{"type":"object","additionalProperties":{}}],"description":"Form schema configuration"},"postApprovalFormSchema":{"anyOf":[{"$ref":"#/properties/applicationConfig/properties/formSchema/anyOf/0"},{"type":"object","additionalProperties":{}}],"description":"Post-approval form schema configuration"},"createdAt":{"type":"string","description":"Configuration creation date"},"updatedAt":{"type":"string","description":"Configuration update date"}},"additionalProperties":false,"nullable":true,"description":"Application configuration"},"metrics":{"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"}},"additionalProperties":false,"description":"Application metrics"},"isProgramReviewer":{"type":"boolean","description":"Whether user is a program reviewer for this program"},"isMilestoneReviewer":{"type":"boolean","description":"Whether user is a milestone reviewer for this program"}},"required":["programId","chainID","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"put":{"summary":"Update Program Configuration","tags":["Funding Programs"],"description":"Update funding program configuration. Requires PROGRAM_EDIT permission. programId may include chainId suffix for duplicates","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"formSchema":{"type":"object","additionalProperties":{},"nullable":true},"postApprovalFormSchema":{"type":"object","additionalProperties":{},"nullable":true},"kycFormUrl":{"type":"string","format":"uri","nullable":true},"kybFormUrl":{"type":"string","format":"uri","nullable":true}},"additionalProperties":true}}}},"parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Funding program database ID"},"programId":{"type":"string","description":"Program identifier"},"chainID":{"type":"number","nullable":true,"description":"Blockchain chain ID (null for off-chain programs)"},"createdAt":{"type":"string","description":"Program creation date"},"updatedAt":{"type":"string","description":"Program update date"},"name":{"type":"string","description":"Program name"},"metadata":{"type":"object","additionalProperties":{},"description":"Program metadata"},"langfusePromptId":{"type":"string","description":"Langfuse prompt ID"},"communityUID":{"type":"string","description":"Community unique identifier"},"communitySlug":{"type":"string","description":"Community slug"},"communityName":{"type":"string","description":"Community name"},"communityImage":{"type":"string","description":"Community image URL"},"applicationConfig":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Whether applications are enabled"},"formSchema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Form schema ID"},"title":{"type":"string","description":"Form title"},"description":{"type":"string","description":"Form description"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Field unique identifier"},"type":{"type":"string","description":"Field type (text, textarea, select, etc.)"},"label":{"type":"string","description":"Field label"},"required":{"type":"boolean","description":"Whether field is required"},"placeholder":{"type":"string","description":"Field placeholder text"},"description":{"type":"string","description":"Field description"},"validation":{"type":"object","additionalProperties":{},"description":"Field validation rules"},"aiEvaluation":{"type":"object","additionalProperties":{},"description":"AI evaluation configuration"},"private":{"type":"boolean","description":"Whether field is private"},"deleted":{"type":"boolean","description":"Whether field is soft deleted (internal use only)"}},"required":["id","type","label"],"additionalProperties":false},"description":"Form fields"},"settings":{"type":"object","properties":{"privateApplications":{"type":"boolean","description":"Whether private applications are enabled"},"submitButtonText":{"type":"string","description":"Submit button text"},"confirmationMessage":{"type":"string","description":"Confirmation message after submission"},"donationRound":{"type":"boolean","description":"Whether this is a donation round"},"showCommentsOnPublicPage":{"type":"boolean","description":"Whether comments should be shown on public application page"}},"additionalProperties":false,"description":"Form settings"},"aiConfig":{"type":"object","properties":{"langfusePromptId":{"type":"string","description":"Langfuse prompt ID for AI evaluation"},"aiModel":{"type":"string","description":"AI model to use for evaluation"}},"additionalProperties":false,"description":"AI configuration for evaluation"}},"required":["id","title","fields","settings"],"additionalProperties":false},{"type":"object","additionalProperties":{}}],"description":"Form schema configuration"},"postApprovalFormSchema":{"anyOf":[{"$ref":"#/properties/applicationConfig/properties/formSchema/anyOf/0"},{"type":"object","additionalProperties":{}}],"description":"Post-approval form schema configuration"},"createdAt":{"type":"string","description":"Configuration creation date"},"updatedAt":{"type":"string","description":"Configuration update date"}},"additionalProperties":false,"nullable":true,"description":"Application configuration"},"metrics":{"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"}},"additionalProperties":false,"description":"Application metrics"},"isProgramReviewer":{"type":"boolean","description":"Whether user is a program reviewer for this program"},"isMilestoneReviewer":{"type":"boolean","description":"Whether user is a milestone reviewer for this program"}},"required":["programId","chainID","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"get":{"summary":"Get Program by ProgramId","tags":["Funding Programs"],"description":"Get a specific funding program with its configuration by programId (programId may include chainId suffix for duplicates). Authenticated admins/reviewers receive full config including accessCode.","parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Funding program database ID"},"programId":{"type":"string","description":"Program identifier"},"chainID":{"type":"number","nullable":true,"description":"Blockchain chain ID (null for off-chain programs)"},"createdAt":{"type":"string","description":"Program creation date"},"updatedAt":{"type":"string","description":"Program update date"},"name":{"type":"string","description":"Program name"},"metadata":{"type":"object","additionalProperties":{},"description":"Program metadata"},"langfusePromptId":{"type":"string","description":"Langfuse prompt ID"},"communityUID":{"type":"string","description":"Community unique identifier"},"communitySlug":{"type":"string","description":"Community slug"},"communityName":{"type":"string","description":"Community name"},"communityImage":{"type":"string","description":"Community image URL"},"applicationConfig":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Whether applications are enabled"},"formSchema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Form schema ID"},"title":{"type":"string","description":"Form title"},"description":{"type":"string","description":"Form description"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Field unique identifier"},"type":{"type":"string","description":"Field type (text, textarea, select, etc.)"},"label":{"type":"string","description":"Field label"},"required":{"type":"boolean","description":"Whether field is required"},"placeholder":{"type":"string","description":"Field placeholder text"},"description":{"type":"string","description":"Field description"},"validation":{"type":"object","additionalProperties":{},"description":"Field validation rules"},"aiEvaluation":{"type":"object","additionalProperties":{},"description":"AI evaluation configuration"},"private":{"type":"boolean","description":"Whether field is private"},"deleted":{"type":"boolean","description":"Whether field is soft deleted (internal use only)"}},"required":["id","type","label"],"additionalProperties":false},"description":"Form fields"},"settings":{"type":"object","properties":{"privateApplications":{"type":"boolean","description":"Whether private applications are enabled"},"submitButtonText":{"type":"string","description":"Submit button text"},"confirmationMessage":{"type":"string","description":"Confirmation message after submission"},"donationRound":{"type":"boolean","description":"Whether this is a donation round"},"showCommentsOnPublicPage":{"type":"boolean","description":"Whether comments should be shown on public application page"}},"additionalProperties":false,"description":"Form settings"},"aiConfig":{"type":"object","properties":{"langfusePromptId":{"type":"string","description":"Langfuse prompt ID for AI evaluation"},"aiModel":{"type":"string","description":"AI model to use for evaluation"}},"additionalProperties":false,"description":"AI configuration for evaluation"}},"required":["id","title","fields","settings"],"additionalProperties":false},{"type":"object","additionalProperties":{}}],"description":"Form schema configuration"},"postApprovalFormSchema":{"anyOf":[{"$ref":"#/properties/applicationConfig/properties/formSchema/anyOf/0"},{"type":"object","additionalProperties":{}}],"description":"Post-approval form schema configuration"},"createdAt":{"type":"string","description":"Configuration creation date"},"updatedAt":{"type":"string","description":"Configuration update date"}},"additionalProperties":false,"nullable":true,"description":"Application configuration"},"metrics":{"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"}},"additionalProperties":false,"description":"Application metrics"},"isProgramReviewer":{"type":"boolean","description":"Whether user is a program reviewer for this program"},"isMilestoneReviewer":{"type":"boolean","description":"Whether user is a milestone reviewer for this program"}},"required":["programId","chainID","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-program-configs":{"get":{"summary":"Get All Programs","tags":["Funding Programs"],"description":"Get all funding programs with their configurations. Supports optional community filter parameter","parameters":[{"in":"query","name":"community","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of all funding programs with their configurations","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Funding program database ID"},"programId":{"type":"string","description":"Program identifier"},"chainID":{"type":"number","nullable":true,"description":"Blockchain chain ID (null for off-chain programs)"},"createdAt":{"type":"string","description":"Program creation date"},"updatedAt":{"type":"string","description":"Program update date"},"name":{"type":"string","description":"Program name"},"metadata":{"type":"object","additionalProperties":{},"description":"Program metadata"},"langfusePromptId":{"type":"string","description":"Langfuse prompt ID"},"communityUID":{"type":"string","description":"Community unique identifier"},"communitySlug":{"type":"string","description":"Community slug"},"communityName":{"type":"string","description":"Community name"},"communityImage":{"type":"string","description":"Community image URL"},"applicationConfig":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Whether applications are enabled"},"formSchema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Form schema ID"},"title":{"type":"string","description":"Form title"},"description":{"type":"string","description":"Form description"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Field unique identifier"},"type":{"type":"string","description":"Field type (text, textarea, select, etc.)"},"label":{"type":"string","description":"Field label"},"required":{"type":"boolean","description":"Whether field is required"},"placeholder":{"type":"string","description":"Field placeholder text"},"description":{"type":"string","description":"Field description"},"validation":{"type":"object","additionalProperties":{},"description":"Field validation rules"},"aiEvaluation":{"type":"object","additionalProperties":{},"description":"AI evaluation configuration"},"private":{"type":"boolean","description":"Whether field is private"},"deleted":{"type":"boolean","description":"Whether field is soft deleted (internal use only)"}},"required":["id","type","label"],"additionalProperties":false},"description":"Form fields"},"settings":{"type":"object","properties":{"privateApplications":{"type":"boolean","description":"Whether private applications are enabled"},"submitButtonText":{"type":"string","description":"Submit button text"},"confirmationMessage":{"type":"string","description":"Confirmation message after submission"},"donationRound":{"type":"boolean","description":"Whether this is a donation round"},"showCommentsOnPublicPage":{"type":"boolean","description":"Whether comments should be shown on public application page"}},"additionalProperties":false,"description":"Form settings"},"aiConfig":{"type":"object","properties":{"langfusePromptId":{"type":"string","description":"Langfuse prompt ID for AI evaluation"},"aiModel":{"type":"string","description":"AI model to use for evaluation"}},"additionalProperties":false,"description":"AI configuration for evaluation"}},"required":["id","title","fields","settings"],"additionalProperties":false},{"type":"object","additionalProperties":{}}],"description":"Form schema configuration"},"postApprovalFormSchema":{"anyOf":[{"$ref":"#/items/properties/applicationConfig/properties/formSchema/anyOf/0"},{"type":"object","additionalProperties":{}}],"description":"Post-approval form schema configuration"},"createdAt":{"type":"string","description":"Configuration creation date"},"updatedAt":{"type":"string","description":"Configuration update date"}},"additionalProperties":false,"nullable":true,"description":"Application configuration"},"metrics":{"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"}},"additionalProperties":false,"description":"Application metrics"},"isProgramReviewer":{"type":"boolean","description":"Whether user is a program reviewer for this program"},"isMilestoneReviewer":{"type":"boolean","description":"Whether user is a milestone reviewer for this program"}},"required":["programId","chainID","createdAt","updatedAt"],"additionalProperties":false},"description":"List of all funding programs with their configurations"}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-program-configs/community/{communityUID}":{"get":{"summary":"Get Programs by Community","tags":["Funding Programs"],"description":"Get funding programs by community UID or slug. Supports both community identifier formats","parameters":[{"in":"path","name":"communityUID","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"List of funding programs for the specified community","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Funding program database ID"},"programId":{"type":"string","description":"Program identifier"},"chainID":{"type":"number","nullable":true,"description":"Blockchain chain ID (null for off-chain programs)"},"createdAt":{"type":"string","description":"Program creation date"},"updatedAt":{"type":"string","description":"Program update date"},"name":{"type":"string","description":"Program name"},"metadata":{"type":"object","additionalProperties":{},"description":"Program metadata"},"langfusePromptId":{"type":"string","description":"Langfuse prompt ID"},"communityUID":{"type":"string","description":"Community unique identifier"},"communitySlug":{"type":"string","description":"Community slug"},"communityName":{"type":"string","description":"Community name"},"communityImage":{"type":"string","description":"Community image URL"},"applicationConfig":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Whether applications are enabled"},"formSchema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Form schema ID"},"title":{"type":"string","description":"Form title"},"description":{"type":"string","description":"Form description"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Field unique identifier"},"type":{"type":"string","description":"Field type (text, textarea, select, etc.)"},"label":{"type":"string","description":"Field label"},"required":{"type":"boolean","description":"Whether field is required"},"placeholder":{"type":"string","description":"Field placeholder text"},"description":{"type":"string","description":"Field description"},"validation":{"type":"object","additionalProperties":{},"description":"Field validation rules"},"aiEvaluation":{"type":"object","additionalProperties":{},"description":"AI evaluation configuration"},"private":{"type":"boolean","description":"Whether field is private"},"deleted":{"type":"boolean","description":"Whether field is soft deleted (internal use only)"}},"required":["id","type","label"],"additionalProperties":false},"description":"Form fields"},"settings":{"type":"object","properties":{"privateApplications":{"type":"boolean","description":"Whether private applications are enabled"},"submitButtonText":{"type":"string","description":"Submit button text"},"confirmationMessage":{"type":"string","description":"Confirmation message after submission"},"donationRound":{"type":"boolean","description":"Whether this is a donation round"},"showCommentsOnPublicPage":{"type":"boolean","description":"Whether comments should be shown on public application page"}},"additionalProperties":false,"description":"Form settings"},"aiConfig":{"type":"object","properties":{"langfusePromptId":{"type":"string","description":"Langfuse prompt ID for AI evaluation"},"aiModel":{"type":"string","description":"AI model to use for evaluation"}},"additionalProperties":false,"description":"AI configuration for evaluation"}},"required":["id","title","fields","settings"],"additionalProperties":false},{"type":"object","additionalProperties":{}}],"description":"Form schema configuration"},"postApprovalFormSchema":{"anyOf":[{"$ref":"#/items/properties/applicationConfig/properties/formSchema/anyOf/0"},{"type":"object","additionalProperties":{}}],"description":"Post-approval form schema configuration"},"createdAt":{"type":"string","description":"Configuration creation date"},"updatedAt":{"type":"string","description":"Configuration update date"}},"additionalProperties":false,"nullable":true,"description":"Application configuration"},"metrics":{"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"}},"additionalProperties":false,"description":"Application metrics"},"isProgramReviewer":{"type":"boolean","description":"Whether user is a program reviewer for this program"},"isMilestoneReviewer":{"type":"boolean","description":"Whether user is a milestone reviewer for this program"}},"required":["programId","chainID","createdAt","updatedAt"],"additionalProperties":false},"description":"List of funding programs for the specified community"}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-program-configs/enabled":{"get":{"summary":"Get Enabled Programs","tags":["Funding Programs"],"description":"Get only enabled funding programs with their configurations","responses":{"200":{"description":"List of enabled funding programs with their configurations","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Funding program database ID"},"programId":{"type":"string","description":"Program identifier"},"chainID":{"type":"number","nullable":true,"description":"Blockchain chain ID (null for off-chain programs)"},"createdAt":{"type":"string","description":"Program creation date"},"updatedAt":{"type":"string","description":"Program update date"},"name":{"type":"string","description":"Program name"},"metadata":{"type":"object","additionalProperties":{},"description":"Program metadata"},"langfusePromptId":{"type":"string","description":"Langfuse prompt ID"},"communityUID":{"type":"string","description":"Community unique identifier"},"communitySlug":{"type":"string","description":"Community slug"},"communityName":{"type":"string","description":"Community name"},"communityImage":{"type":"string","description":"Community image URL"},"applicationConfig":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Whether applications are enabled"},"formSchema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Form schema ID"},"title":{"type":"string","description":"Form title"},"description":{"type":"string","description":"Form description"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Field unique identifier"},"type":{"type":"string","description":"Field type (text, textarea, select, etc.)"},"label":{"type":"string","description":"Field label"},"required":{"type":"boolean","description":"Whether field is required"},"placeholder":{"type":"string","description":"Field placeholder text"},"description":{"type":"string","description":"Field description"},"validation":{"type":"object","additionalProperties":{},"description":"Field validation rules"},"aiEvaluation":{"type":"object","additionalProperties":{},"description":"AI evaluation configuration"},"private":{"type":"boolean","description":"Whether field is private"},"deleted":{"type":"boolean","description":"Whether field is soft deleted (internal use only)"}},"required":["id","type","label"],"additionalProperties":false},"description":"Form fields"},"settings":{"type":"object","properties":{"privateApplications":{"type":"boolean","description":"Whether private applications are enabled"},"submitButtonText":{"type":"string","description":"Submit button text"},"confirmationMessage":{"type":"string","description":"Confirmation message after submission"},"donationRound":{"type":"boolean","description":"Whether this is a donation round"},"showCommentsOnPublicPage":{"type":"boolean","description":"Whether comments should be shown on public application page"}},"additionalProperties":false,"description":"Form settings"},"aiConfig":{"type":"object","properties":{"langfusePromptId":{"type":"string","description":"Langfuse prompt ID for AI evaluation"},"aiModel":{"type":"string","description":"AI model to use for evaluation"}},"additionalProperties":false,"description":"AI configuration for evaluation"}},"required":["id","title","fields","settings"],"additionalProperties":false},{"type":"object","additionalProperties":{}}],"description":"Form schema configuration"},"postApprovalFormSchema":{"anyOf":[{"$ref":"#/items/properties/applicationConfig/properties/formSchema/anyOf/0"},{"type":"object","additionalProperties":{}}],"description":"Post-approval form schema configuration"},"createdAt":{"type":"string","description":"Configuration creation date"},"updatedAt":{"type":"string","description":"Configuration update date"}},"additionalProperties":false,"nullable":true,"description":"Application configuration"},"metrics":{"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"}},"additionalProperties":false,"description":"Application metrics"},"isProgramReviewer":{"type":"boolean","description":"Whether user is a program reviewer for this program"},"isMilestoneReviewer":{"type":"boolean","description":"Whether user is a milestone reviewer for this program"}},"required":["programId","chainID","createdAt","updatedAt"],"additionalProperties":false},"description":"List of enabled funding programs with their configurations"}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{communityUID}/metrics":{"get":{"summary":"Get Community Metrics","tags":["Funding Programs"],"description":"Get comprehensive metrics for a community including program and application statistics","parameters":[{"in":"path","name":"communityUID","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/program/funding-details":{"get":{"summary":"Get Funding Details","tags":["Funding Programs"],"description":"Get funding details for a program including total budget, total approved, and remaining budget","parameters":[{"in":"query","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"programId":{"type":"string","description":"Program identifier from program_registry"},"totalBudget":{"type":"string","nullable":true,"description":"Total budget allocated for the program (from program_registry.metadata.programBudget). Returns null if not set. Normalized to string format."},"totalApproved":{"type":"string","description":"Total amount approved across all approved applications. Sum of all approvedAmount values. Returns \"0\" if no applications approved."},"currency":{"type":"string","nullable":true,"description":"Currency used for the program (e.g., \"OP\", \"USD\", \"POL\"). Priority: 1) Program metadata currency, 2) First approved application currency. Returns null if neither is available."},"remainingBudget":{"type":"string","nullable":true,"description":"Remaining budget calculated as (totalBudget - totalApproved). Returns \"0\" if negative (overspent scenario). Returns null if totalBudget is null."}},"required":["programId","totalBudget","totalApproved","currency","remainingBudget"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/{programId}":{"post":{"summary":"Create Funding Application (programId only)","tags":["Funding Applications"],"description":"Create a new funding application for a specific program (offchain compatible)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"applicantEmail":{"type":"string","format":"email"},"applicationData":{"type":"object","additionalProperties":{}},"aiEvaluation":{},"accessCode":{"type":"string"}},"required":["applicantEmail","applicationData"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"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)"},"karmaProfileEvaluation":{"type":"object","properties":{"evaluation":{"type":"string","description":"Raw LLM JSON output"},"promptId":{"type":"string","description":"Prompt fingerprint used"},"evaluatedAt":{"type":"string","description":"When the evaluation last ran or last verified inputs unchanged"},"status":{"type":"string","enum":["pending","in_progress","completed","failed","skipped"],"description":"Evaluation status"},"context":{"type":"string","description":"Raw Karma profile markdown — audit trail for AI claims"},"contextHash":{"type":"string","description":"SHA-256 fingerprint of {projectUID, context, promptFingerprint}"},"skipReason":{"type":"string","enum":["no_field_configured","uid_empty","uid_invalid","project_not_found","aggregator_failed"],"description":"Present only when status === skipped"}},"required":["evaluation","promptId","status","context","contextHash"],"additionalProperties":false,"description":"Track-record AI evaluation (admin-only, never shown to applicants). Stripped from non-admin responses by the same sanitizer that hides internalAIEvaluation."},"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 the program reviewer approved for THIS application at intake. This is an intake-time approval value — it is NOT the amount actually disbursed and NOT the administrator-configured allocation in the disbursement system. Do NOT sum this field across applications to estimate \"program funding\" or \"total disbursed\" — that produces misleading numbers because: (a) approvals can be revised in the disbursement system, (b) applications without a corresponding payout configuration are not part of the funding flow, and (c) disbursements are tracked on-chain separately. For authoritative program funding totals call GET /v2/programs/{programId}/financials."},"approvedCurrency":{"type":"string","description":"Currency of the intake-time approved amount (e.g., \"OP\", \"USD\"). Paired with `approvedAmount` — same caveats apply."},"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"},"resolvedProjectName":{"type":"string","description":"Display name resolved server-side: prefers a project/title field from the submitted form data, falls back to the linked Karma project title when the application has a projectUID, omitted when neither source yields a value."},"milestoneStatuses":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["application","project"],"description":"Origin of this milestone: 'application' = added by the applicant via applicationData; 'project' = inherited from the project's grant for this program (not in applicationData)."},"milestoneUID":{"type":"string","maxLength":200,"description":"On-chain milestone UID. Omitted for application-source slots that have not been anchored on-chain yet."},"currentStatus":{"type":"string","maxLength":64,"description":"Milestone current status (pending, completed, verified)"},"grantUID":{"type":"string","maxLength":200,"description":"Parent grant UID — needed by clients submitting completion attestations"},"chainID":{"type":"number","description":"Chain on which this milestone lives — application.chainID is null for off-chain programs, so the milestone's actual chain has to come from the grant"},"title":{"type":"string","maxLength":500,"description":"Display title for the milestone"},"description":{"type":"string","maxLength":10000,"description":"Display description for the milestone"},"dueDate":{"type":"string","maxLength":64,"description":"ISO date or yyyy-mm-dd format"},"startsAt":{"type":"number"},"priority":{"type":"number"},"fieldLabel":{"type":"string","maxLength":200,"description":"For source=application only — the applicationData field this milestone slot lives in (used as a stable rendering key)."},"formData":{"type":"object","additionalProperties":{},"description":"For source=application only — applicant-filled fields beyond the core (deliverables, fundingRequested, etc.)."},"completed":{"type":"object","additionalProperties":{},"description":"Latest completion payload when present"},"verified":{"type":"object","additionalProperties":{},"description":"Latest verification payload when present (single object)"}},"required":["source","currentStatus","grantUID","chainID","title"],"additionalProperties":false},"maxItems":200,"description":"Every milestone the application detail page should render — both applicant-added (source=application) and project-inherited (source=project), UID-deduped (application wins) and sorted (done at bottom, then due date ascending)."}},"required":["id","programId","chainID","applicantEmail","ownerAddress","applicationData","status","statusHistory","referenceNumber","postApprovalCompleted","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/{programId}/{chainId}":{"post":{"summary":"Create Funding Application","tags":["Funding Applications"],"description":"Create a new funding application for a specific program","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"applicantEmail":{"type":"string","format":"email"},"applicationData":{"type":"object","additionalProperties":{}},"aiEvaluation":{},"accessCode":{"type":"string"}},"required":["applicantEmail","applicationData"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}},{"in":"path","name":"chainId","required":true,"schema":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}]}}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"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)"},"karmaProfileEvaluation":{"type":"object","properties":{"evaluation":{"type":"string","description":"Raw LLM JSON output"},"promptId":{"type":"string","description":"Prompt fingerprint used"},"evaluatedAt":{"type":"string","description":"When the evaluation last ran or last verified inputs unchanged"},"status":{"type":"string","enum":["pending","in_progress","completed","failed","skipped"],"description":"Evaluation status"},"context":{"type":"string","description":"Raw Karma profile markdown — audit trail for AI claims"},"contextHash":{"type":"string","description":"SHA-256 fingerprint of {projectUID, context, promptFingerprint}"},"skipReason":{"type":"string","enum":["no_field_configured","uid_empty","uid_invalid","project_not_found","aggregator_failed"],"description":"Present only when status === skipped"}},"required":["evaluation","promptId","status","context","contextHash"],"additionalProperties":false,"description":"Track-record AI evaluation (admin-only, never shown to applicants). Stripped from non-admin responses by the same sanitizer that hides internalAIEvaluation."},"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 the program reviewer approved for THIS application at intake. This is an intake-time approval value — it is NOT the amount actually disbursed and NOT the administrator-configured allocation in the disbursement system. Do NOT sum this field across applications to estimate \"program funding\" or \"total disbursed\" — that produces misleading numbers because: (a) approvals can be revised in the disbursement system, (b) applications without a corresponding payout configuration are not part of the funding flow, and (c) disbursements are tracked on-chain separately. For authoritative program funding totals call GET /v2/programs/{programId}/financials."},"approvedCurrency":{"type":"string","description":"Currency of the intake-time approved amount (e.g., \"OP\", \"USD\"). Paired with `approvedAmount` — same caveats apply."},"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"},"resolvedProjectName":{"type":"string","description":"Display name resolved server-side: prefers a project/title field from the submitted form data, falls back to the linked Karma project title when the application has a projectUID, omitted when neither source yields a value."},"milestoneStatuses":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["application","project"],"description":"Origin of this milestone: 'application' = added by the applicant via applicationData; 'project' = inherited from the project's grant for this program (not in applicationData)."},"milestoneUID":{"type":"string","maxLength":200,"description":"On-chain milestone UID. Omitted for application-source slots that have not been anchored on-chain yet."},"currentStatus":{"type":"string","maxLength":64,"description":"Milestone current status (pending, completed, verified)"},"grantUID":{"type":"string","maxLength":200,"description":"Parent grant UID — needed by clients submitting completion attestations"},"chainID":{"type":"number","description":"Chain on which this milestone lives — application.chainID is null for off-chain programs, so the milestone's actual chain has to come from the grant"},"title":{"type":"string","maxLength":500,"description":"Display title for the milestone"},"description":{"type":"string","maxLength":10000,"description":"Display description for the milestone"},"dueDate":{"type":"string","maxLength":64,"description":"ISO date or yyyy-mm-dd format"},"startsAt":{"type":"number"},"priority":{"type":"number"},"fieldLabel":{"type":"string","maxLength":200,"description":"For source=application only — the applicationData field this milestone slot lives in (used as a stable rendering key)."},"formData":{"type":"object","additionalProperties":{},"description":"For source=application only — applicant-filled fields beyond the core (deliverables, fundingRequested, etc.)."},"completed":{"type":"object","additionalProperties":{},"description":"Latest completion payload when present"},"verified":{"type":"object","additionalProperties":{},"description":"Latest verification payload when present (single object)"}},"required":["source","currentStatus","grantUID","chainID","title"],"additionalProperties":false},"maxItems":200,"description":"Every milestone the application detail page should render — both applicant-added (source=application) and project-inherited (source=project), UID-deduped (application wins) and sorted (done at bottom, then due date ascending)."}},"required":["id","programId","chainID","applicantEmail","ownerAddress","applicationData","status","statusHistory","referenceNumber","postApprovalCompleted","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/{programId}/validate-access-code":{"post":{"summary":"Validate Access Code","tags":["Funding Applications"],"description":"Validate an access code for a gated application form. Returns whether the code is valid.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"accessCode":{"type":"string","minLength":1}},"required":["accessCode"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"}},"required":["valid"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/program/{programId}":{"get":{"summary":"Get Applications by Program (programId only)","tags":["Funding Applications"],"description":"Get funding applications by program with pagination and filtering options (programId only)","parameters":[{"in":"query","name":"page","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"limit","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"status","required":false,"schema":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"]}},{"in":"query","name":"search","required":false,"schema":{"type":"string"}},{"in":"query","name":"dateFrom","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"in":"query","name":"dateTo","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"in":"query","name":"sortBy","required":false,"schema":{"type":"string","enum":["createdAt","updatedAt","status","applicantEmail","referenceNumber","projectTitle","aiEvaluationScore","internalAIEvaluationScore"]}},{"in":"query","name":"sortOrder","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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)"},"karmaProfileEvaluation":{"type":"object","properties":{"evaluation":{"type":"string","description":"Raw LLM JSON output"},"promptId":{"type":"string","description":"Prompt fingerprint used"},"evaluatedAt":{"type":"string","description":"When the evaluation last ran or last verified inputs unchanged"},"status":{"type":"string","enum":["pending","in_progress","completed","failed","skipped"],"description":"Evaluation status"},"context":{"type":"string","description":"Raw Karma profile markdown — audit trail for AI claims"},"contextHash":{"type":"string","description":"SHA-256 fingerprint of {projectUID, context, promptFingerprint}"},"skipReason":{"type":"string","enum":["no_field_configured","uid_empty","uid_invalid","project_not_found","aggregator_failed"],"description":"Present only when status === skipped"}},"required":["evaluation","promptId","status","context","contextHash"],"additionalProperties":false,"description":"Track-record AI evaluation (admin-only, never shown to applicants). Stripped from non-admin responses by the same sanitizer that hides internalAIEvaluation."},"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 the program reviewer approved for THIS application at intake. This is an intake-time approval value — it is NOT the amount actually disbursed and NOT the administrator-configured allocation in the disbursement system. Do NOT sum this field across applications to estimate \"program funding\" or \"total disbursed\" — that produces misleading numbers because: (a) approvals can be revised in the disbursement system, (b) applications without a corresponding payout configuration are not part of the funding flow, and (c) disbursements are tracked on-chain separately. For authoritative program funding totals call GET /v2/programs/{programId}/financials."},"approvedCurrency":{"type":"string","description":"Currency of the intake-time approved amount (e.g., \"OP\", \"USD\"). Paired with `approvedAmount` — same caveats apply."},"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"},"resolvedProjectName":{"type":"string","description":"Display name resolved server-side: prefers a project/title field from the submitted form data, falls back to the linked Karma project title when the application has a projectUID, omitted when neither source yields a value."},"milestoneStatuses":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["application","project"],"description":"Origin of this milestone: 'application' = added by the applicant via applicationData; 'project' = inherited from the project's grant for this program (not in applicationData)."},"milestoneUID":{"type":"string","maxLength":200,"description":"On-chain milestone UID. Omitted for application-source slots that have not been anchored on-chain yet."},"currentStatus":{"type":"string","maxLength":64,"description":"Milestone current status (pending, completed, verified)"},"grantUID":{"type":"string","maxLength":200,"description":"Parent grant UID — needed by clients submitting completion attestations"},"chainID":{"type":"number","description":"Chain on which this milestone lives — application.chainID is null for off-chain programs, so the milestone's actual chain has to come from the grant"},"title":{"type":"string","maxLength":500,"description":"Display title for the milestone"},"description":{"type":"string","maxLength":10000,"description":"Display description for the milestone"},"dueDate":{"type":"string","maxLength":64,"description":"ISO date or yyyy-mm-dd format"},"startsAt":{"type":"number"},"priority":{"type":"number"},"fieldLabel":{"type":"string","maxLength":200,"description":"For source=application only — the applicationData field this milestone slot lives in (used as a stable rendering key)."},"formData":{"type":"object","additionalProperties":{},"description":"For source=application only — applicant-filled fields beyond the core (deliverables, fundingRequested, etc.)."},"completed":{"type":"object","additionalProperties":{},"description":"Latest completion payload when present"},"verified":{"type":"object","additionalProperties":{},"description":"Latest verification payload when present (single object)"}},"required":["source","currentStatus","grantUID","chainID","title"],"additionalProperties":false},"maxItems":200,"description":"Every milestone the application detail page should render — both applicant-added (source=application) and project-inherited (source=project), UID-deduped (application wins) and sorted (done at bottom, then due date ascending)."}},"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/program/{programId}/{chainId}":{"get":{"summary":"Get Applications by Program","tags":["Funding Applications"],"description":"Get funding applications by program with pagination and filtering options","parameters":[{"in":"query","name":"page","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"limit","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"status","required":false,"schema":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"]}},{"in":"query","name":"search","required":false,"schema":{"type":"string"}},{"in":"query","name":"dateFrom","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"in":"query","name":"dateTo","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"in":"query","name":"sortBy","required":false,"schema":{"type":"string","enum":["createdAt","updatedAt","status","applicantEmail","referenceNumber","projectTitle","aiEvaluationScore","internalAIEvaluationScore"]}},{"in":"query","name":"sortOrder","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}},{"in":"path","name":"chainId","required":true,"schema":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}]}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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)"},"karmaProfileEvaluation":{"type":"object","properties":{"evaluation":{"type":"string","description":"Raw LLM JSON output"},"promptId":{"type":"string","description":"Prompt fingerprint used"},"evaluatedAt":{"type":"string","description":"When the evaluation last ran or last verified inputs unchanged"},"status":{"type":"string","enum":["pending","in_progress","completed","failed","skipped"],"description":"Evaluation status"},"context":{"type":"string","description":"Raw Karma profile markdown — audit trail for AI claims"},"contextHash":{"type":"string","description":"SHA-256 fingerprint of {projectUID, context, promptFingerprint}"},"skipReason":{"type":"string","enum":["no_field_configured","uid_empty","uid_invalid","project_not_found","aggregator_failed"],"description":"Present only when status === skipped"}},"required":["evaluation","promptId","status","context","contextHash"],"additionalProperties":false,"description":"Track-record AI evaluation (admin-only, never shown to applicants). Stripped from non-admin responses by the same sanitizer that hides internalAIEvaluation."},"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 the program reviewer approved for THIS application at intake. This is an intake-time approval value — it is NOT the amount actually disbursed and NOT the administrator-configured allocation in the disbursement system. Do NOT sum this field across applications to estimate \"program funding\" or \"total disbursed\" — that produces misleading numbers because: (a) approvals can be revised in the disbursement system, (b) applications without a corresponding payout configuration are not part of the funding flow, and (c) disbursements are tracked on-chain separately. For authoritative program funding totals call GET /v2/programs/{programId}/financials."},"approvedCurrency":{"type":"string","description":"Currency of the intake-time approved amount (e.g., \"OP\", \"USD\"). Paired with `approvedAmount` — same caveats apply."},"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"},"resolvedProjectName":{"type":"string","description":"Display name resolved server-side: prefers a project/title field from the submitted form data, falls back to the linked Karma project title when the application has a projectUID, omitted when neither source yields a value."},"milestoneStatuses":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["application","project"],"description":"Origin of this milestone: 'application' = added by the applicant via applicationData; 'project' = inherited from the project's grant for this program (not in applicationData)."},"milestoneUID":{"type":"string","maxLength":200,"description":"On-chain milestone UID. Omitted for application-source slots that have not been anchored on-chain yet."},"currentStatus":{"type":"string","maxLength":64,"description":"Milestone current status (pending, completed, verified)"},"grantUID":{"type":"string","maxLength":200,"description":"Parent grant UID — needed by clients submitting completion attestations"},"chainID":{"type":"number","description":"Chain on which this milestone lives — application.chainID is null for off-chain programs, so the milestone's actual chain has to come from the grant"},"title":{"type":"string","maxLength":500,"description":"Display title for the milestone"},"description":{"type":"string","maxLength":10000,"description":"Display description for the milestone"},"dueDate":{"type":"string","maxLength":64,"description":"ISO date or yyyy-mm-dd format"},"startsAt":{"type":"number"},"priority":{"type":"number"},"fieldLabel":{"type":"string","maxLength":200,"description":"For source=application only — the applicationData field this milestone slot lives in (used as a stable rendering key)."},"formData":{"type":"object","additionalProperties":{},"description":"For source=application only — applicant-filled fields beyond the core (deliverables, fundingRequested, etc.)."},"completed":{"type":"object","additionalProperties":{},"description":"Latest completion payload when present"},"verified":{"type":"object","additionalProperties":{},"description":"Latest verification payload when present (single object)"}},"required":["source","currentStatus","grantUID","chainID","title"],"additionalProperties":false},"maxItems":200,"description":"Every milestone the application detail page should render — both applicant-added (source=application) and project-inherited (source=project), UID-deduped (application wins) and sorted (done at bottom, then due date ascending)."}},"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/lookup-credential/{referenceNumber}":{"get":{"summary":"Lookup Application Credential (Masked)","tags":["Funding Applications"],"description":"Lookup which credential (masked email or wallet) was used to create an application. Returns ONLY masked credentials for security. Requires authentication.","parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string"},"description":"The application reference number (e.g., APP-XXXXXXXX-XXXXXX)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/{referenceNumber}/access":{"get":{"summary":"Check Application Access","tags":["Funding Applications"],"description":"Check user access level and permissions for a specific funding application. Returns role and boolean permission flags.","parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string"},"description":"The application reference number (e.g., APP-XXXXXXXX-XXXXXX)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/{referenceNumber}":{"get":{"summary":"Get Application by Reference","tags":["Funding Applications"],"description":"Get a specific funding application by its reference number","parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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)"},"karmaProfileEvaluation":{"type":"object","properties":{"evaluation":{"type":"string","description":"Raw LLM JSON output"},"promptId":{"type":"string","description":"Prompt fingerprint used"},"evaluatedAt":{"type":"string","description":"When the evaluation last ran or last verified inputs unchanged"},"status":{"type":"string","enum":["pending","in_progress","completed","failed","skipped"],"description":"Evaluation status"},"context":{"type":"string","description":"Raw Karma profile markdown — audit trail for AI claims"},"contextHash":{"type":"string","description":"SHA-256 fingerprint of {projectUID, context, promptFingerprint}"},"skipReason":{"type":"string","enum":["no_field_configured","uid_empty","uid_invalid","project_not_found","aggregator_failed"],"description":"Present only when status === skipped"}},"required":["evaluation","promptId","status","context","contextHash"],"additionalProperties":false,"description":"Track-record AI evaluation (admin-only, never shown to applicants). Stripped from non-admin responses by the same sanitizer that hides internalAIEvaluation."},"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 the program reviewer approved for THIS application at intake. This is an intake-time approval value — it is NOT the amount actually disbursed and NOT the administrator-configured allocation in the disbursement system. Do NOT sum this field across applications to estimate \"program funding\" or \"total disbursed\" — that produces misleading numbers because: (a) approvals can be revised in the disbursement system, (b) applications without a corresponding payout configuration are not part of the funding flow, and (c) disbursements are tracked on-chain separately. For authoritative program funding totals call GET /v2/programs/{programId}/financials."},"approvedCurrency":{"type":"string","description":"Currency of the intake-time approved amount (e.g., \"OP\", \"USD\"). Paired with `approvedAmount` — same caveats apply."},"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"},"resolvedProjectName":{"type":"string","description":"Display name resolved server-side: prefers a project/title field from the submitted form data, falls back to the linked Karma project title when the application has a projectUID, omitted when neither source yields a value."},"milestoneStatuses":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["application","project"],"description":"Origin of this milestone: 'application' = added by the applicant via applicationData; 'project' = inherited from the project's grant for this program (not in applicationData)."},"milestoneUID":{"type":"string","maxLength":200,"description":"On-chain milestone UID. Omitted for application-source slots that have not been anchored on-chain yet."},"currentStatus":{"type":"string","maxLength":64,"description":"Milestone current status (pending, completed, verified)"},"grantUID":{"type":"string","maxLength":200,"description":"Parent grant UID — needed by clients submitting completion attestations"},"chainID":{"type":"number","description":"Chain on which this milestone lives — application.chainID is null for off-chain programs, so the milestone's actual chain has to come from the grant"},"title":{"type":"string","maxLength":500,"description":"Display title for the milestone"},"description":{"type":"string","maxLength":10000,"description":"Display description for the milestone"},"dueDate":{"type":"string","maxLength":64,"description":"ISO date or yyyy-mm-dd format"},"startsAt":{"type":"number"},"priority":{"type":"number"},"fieldLabel":{"type":"string","maxLength":200,"description":"For source=application only — the applicationData field this milestone slot lives in (used as a stable rendering key)."},"formData":{"type":"object","additionalProperties":{},"description":"For source=application only — applicant-filled fields beyond the core (deliverables, fundingRequested, etc.)."},"completed":{"type":"object","additionalProperties":{},"description":"Latest completion payload when present"},"verified":{"type":"object","additionalProperties":{},"description":"Latest verification payload when present (single object)"}},"required":["source","currentStatus","grantUID","chainID","title"],"additionalProperties":false},"maxItems":200,"description":"Every milestone the application detail page should render — both applicant-added (source=application) and project-inherited (source=project), UID-deduped (application wins) and sorted (done at bottom, then due date ascending)."}},"required":["id","programId","chainID","applicantEmail","ownerAddress","applicationData","status","statusHistory","referenceNumber","postApprovalCompleted","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"put":{"summary":"Update Funding Application","tags":["Funding Applications"],"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.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"applicationData":{"type":"object","additionalProperties":{}},"aiEvaluation":{}},"additionalProperties":false}}}},"parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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)"},"karmaProfileEvaluation":{"type":"object","properties":{"evaluation":{"type":"string","description":"Raw LLM JSON output"},"promptId":{"type":"string","description":"Prompt fingerprint used"},"evaluatedAt":{"type":"string","description":"When the evaluation last ran or last verified inputs unchanged"},"status":{"type":"string","enum":["pending","in_progress","completed","failed","skipped"],"description":"Evaluation status"},"context":{"type":"string","description":"Raw Karma profile markdown — audit trail for AI claims"},"contextHash":{"type":"string","description":"SHA-256 fingerprint of {projectUID, context, promptFingerprint}"},"skipReason":{"type":"string","enum":["no_field_configured","uid_empty","uid_invalid","project_not_found","aggregator_failed"],"description":"Present only when status === skipped"}},"required":["evaluation","promptId","status","context","contextHash"],"additionalProperties":false,"description":"Track-record AI evaluation (admin-only, never shown to applicants). Stripped from non-admin responses by the same sanitizer that hides internalAIEvaluation."},"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 the program reviewer approved for THIS application at intake. This is an intake-time approval value — it is NOT the amount actually disbursed and NOT the administrator-configured allocation in the disbursement system. Do NOT sum this field across applications to estimate \"program funding\" or \"total disbursed\" — that produces misleading numbers because: (a) approvals can be revised in the disbursement system, (b) applications without a corresponding payout configuration are not part of the funding flow, and (c) disbursements are tracked on-chain separately. For authoritative program funding totals call GET /v2/programs/{programId}/financials."},"approvedCurrency":{"type":"string","description":"Currency of the intake-time approved amount (e.g., \"OP\", \"USD\"). Paired with `approvedAmount` — same caveats apply."},"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"},"resolvedProjectName":{"type":"string","description":"Display name resolved server-side: prefers a project/title field from the submitted form data, falls back to the linked Karma project title when the application has a projectUID, omitted when neither source yields a value."},"milestoneStatuses":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["application","project"],"description":"Origin of this milestone: 'application' = added by the applicant via applicationData; 'project' = inherited from the project's grant for this program (not in applicationData)."},"milestoneUID":{"type":"string","maxLength":200,"description":"On-chain milestone UID. Omitted for application-source slots that have not been anchored on-chain yet."},"currentStatus":{"type":"string","maxLength":64,"description":"Milestone current status (pending, completed, verified)"},"grantUID":{"type":"string","maxLength":200,"description":"Parent grant UID — needed by clients submitting completion attestations"},"chainID":{"type":"number","description":"Chain on which this milestone lives — application.chainID is null for off-chain programs, so the milestone's actual chain has to come from the grant"},"title":{"type":"string","maxLength":500,"description":"Display title for the milestone"},"description":{"type":"string","maxLength":10000,"description":"Display description for the milestone"},"dueDate":{"type":"string","maxLength":64,"description":"ISO date or yyyy-mm-dd format"},"startsAt":{"type":"number"},"priority":{"type":"number"},"fieldLabel":{"type":"string","maxLength":200,"description":"For source=application only — the applicationData field this milestone slot lives in (used as a stable rendering key)."},"formData":{"type":"object","additionalProperties":{},"description":"For source=application only — applicant-filled fields beyond the core (deliverables, fundingRequested, etc.)."},"completed":{"type":"object","additionalProperties":{},"description":"Latest completion payload when present"},"verified":{"type":"object","additionalProperties":{},"description":"Latest verification payload when present (single object)"}},"required":["source","currentStatus","grantUID","chainID","title"],"additionalProperties":false},"maxItems":200,"description":"Every milestone the application detail page should render — both applicant-added (source=application) and project-inherited (source=project), UID-deduped (application wins) and sorted (done at bottom, then due date ascending)."}},"required":["id","programId","chainID","applicantEmail","ownerAddress","applicationData","status","statusHistory","referenceNumber","postApprovalCompleted","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"delete":{"summary":"Delete Application (Admin Only)","tags":["Funding Applications"],"description":"Permanently delete a funding application. Requires APPLICATION_CHANGE_STATUS permission.","parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"204":{"description":"Application deleted successfully"},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/project/{projectUID}":{"get":{"summary":"Get Application by Project UID","tags":["Funding Applications"],"description":"Get a funding application by project UID with optional authentication for access control","parameters":[{"in":"path","name":"projectUID","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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)"},"karmaProfileEvaluation":{"type":"object","properties":{"evaluation":{"type":"string","description":"Raw LLM JSON output"},"promptId":{"type":"string","description":"Prompt fingerprint used"},"evaluatedAt":{"type":"string","description":"When the evaluation last ran or last verified inputs unchanged"},"status":{"type":"string","enum":["pending","in_progress","completed","failed","skipped"],"description":"Evaluation status"},"context":{"type":"string","description":"Raw Karma profile markdown — audit trail for AI claims"},"contextHash":{"type":"string","description":"SHA-256 fingerprint of {projectUID, context, promptFingerprint}"},"skipReason":{"type":"string","enum":["no_field_configured","uid_empty","uid_invalid","project_not_found","aggregator_failed"],"description":"Present only when status === skipped"}},"required":["evaluation","promptId","status","context","contextHash"],"additionalProperties":false,"description":"Track-record AI evaluation (admin-only, never shown to applicants). Stripped from non-admin responses by the same sanitizer that hides internalAIEvaluation."},"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 the program reviewer approved for THIS application at intake. This is an intake-time approval value — it is NOT the amount actually disbursed and NOT the administrator-configured allocation in the disbursement system. Do NOT sum this field across applications to estimate \"program funding\" or \"total disbursed\" — that produces misleading numbers because: (a) approvals can be revised in the disbursement system, (b) applications without a corresponding payout configuration are not part of the funding flow, and (c) disbursements are tracked on-chain separately. For authoritative program funding totals call GET /v2/programs/{programId}/financials."},"approvedCurrency":{"type":"string","description":"Currency of the intake-time approved amount (e.g., \"OP\", \"USD\"). Paired with `approvedAmount` — same caveats apply."},"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"},"resolvedProjectName":{"type":"string","description":"Display name resolved server-side: prefers a project/title field from the submitted form data, falls back to the linked Karma project title when the application has a projectUID, omitted when neither source yields a value."},"milestoneStatuses":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["application","project"],"description":"Origin of this milestone: 'application' = added by the applicant via applicationData; 'project' = inherited from the project's grant for this program (not in applicationData)."},"milestoneUID":{"type":"string","maxLength":200,"description":"On-chain milestone UID. Omitted for application-source slots that have not been anchored on-chain yet."},"currentStatus":{"type":"string","maxLength":64,"description":"Milestone current status (pending, completed, verified)"},"grantUID":{"type":"string","maxLength":200,"description":"Parent grant UID — needed by clients submitting completion attestations"},"chainID":{"type":"number","description":"Chain on which this milestone lives — application.chainID is null for off-chain programs, so the milestone's actual chain has to come from the grant"},"title":{"type":"string","maxLength":500,"description":"Display title for the milestone"},"description":{"type":"string","maxLength":10000,"description":"Display description for the milestone"},"dueDate":{"type":"string","maxLength":64,"description":"ISO date or yyyy-mm-dd format"},"startsAt":{"type":"number"},"priority":{"type":"number"},"fieldLabel":{"type":"string","maxLength":200,"description":"For source=application only — the applicationData field this milestone slot lives in (used as a stable rendering key)."},"formData":{"type":"object","additionalProperties":{},"description":"For source=application only — applicant-filled fields beyond the core (deliverables, fundingRequested, etc.)."},"completed":{"type":"object","additionalProperties":{},"description":"Latest completion payload when present"},"verified":{"type":"object","additionalProperties":{},"description":"Latest verification payload when present (single object)"}},"required":["source","currentStatus","grantUID","chainID","title"],"additionalProperties":false},"maxItems":200,"description":"Every milestone the application detail page should render — both applicant-added (source=application) and project-inherited (source=project), UID-deduped (application wins) and sorted (done at bottom, then due date ascending)."}},"required":["id","programId","chainID","applicantEmail","ownerAddress","applicationData","status","statusHistory","referenceNumber","postApprovalCompleted","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/{referenceNumber}/status":{"put":{"summary":"Update Application Status","tags":["Funding Applications"],"description":"Update the status of a funding application. Requires APPLICATION_CHANGE_STATUS permission","requestBody":{"content":{"application/json":{"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}}},"required":true},"parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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)"},"karmaProfileEvaluation":{"type":"object","properties":{"evaluation":{"type":"string","description":"Raw LLM JSON output"},"promptId":{"type":"string","description":"Prompt fingerprint used"},"evaluatedAt":{"type":"string","description":"When the evaluation last ran or last verified inputs unchanged"},"status":{"type":"string","enum":["pending","in_progress","completed","failed","skipped"],"description":"Evaluation status"},"context":{"type":"string","description":"Raw Karma profile markdown — audit trail for AI claims"},"contextHash":{"type":"string","description":"SHA-256 fingerprint of {projectUID, context, promptFingerprint}"},"skipReason":{"type":"string","enum":["no_field_configured","uid_empty","uid_invalid","project_not_found","aggregator_failed"],"description":"Present only when status === skipped"}},"required":["evaluation","promptId","status","context","contextHash"],"additionalProperties":false,"description":"Track-record AI evaluation (admin-only, never shown to applicants). Stripped from non-admin responses by the same sanitizer that hides internalAIEvaluation."},"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 the program reviewer approved for THIS application at intake. This is an intake-time approval value — it is NOT the amount actually disbursed and NOT the administrator-configured allocation in the disbursement system. Do NOT sum this field across applications to estimate \"program funding\" or \"total disbursed\" — that produces misleading numbers because: (a) approvals can be revised in the disbursement system, (b) applications without a corresponding payout configuration are not part of the funding flow, and (c) disbursements are tracked on-chain separately. For authoritative program funding totals call GET /v2/programs/{programId}/financials."},"approvedCurrency":{"type":"string","description":"Currency of the intake-time approved amount (e.g., \"OP\", \"USD\"). Paired with `approvedAmount` — same caveats apply."},"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"},"resolvedProjectName":{"type":"string","description":"Display name resolved server-side: prefers a project/title field from the submitted form data, falls back to the linked Karma project title when the application has a projectUID, omitted when neither source yields a value."},"milestoneStatuses":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["application","project"],"description":"Origin of this milestone: 'application' = added by the applicant via applicationData; 'project' = inherited from the project's grant for this program (not in applicationData)."},"milestoneUID":{"type":"string","maxLength":200,"description":"On-chain milestone UID. Omitted for application-source slots that have not been anchored on-chain yet."},"currentStatus":{"type":"string","maxLength":64,"description":"Milestone current status (pending, completed, verified)"},"grantUID":{"type":"string","maxLength":200,"description":"Parent grant UID — needed by clients submitting completion attestations"},"chainID":{"type":"number","description":"Chain on which this milestone lives — application.chainID is null for off-chain programs, so the milestone's actual chain has to come from the grant"},"title":{"type":"string","maxLength":500,"description":"Display title for the milestone"},"description":{"type":"string","maxLength":10000,"description":"Display description for the milestone"},"dueDate":{"type":"string","maxLength":64,"description":"ISO date or yyyy-mm-dd format"},"startsAt":{"type":"number"},"priority":{"type":"number"},"fieldLabel":{"type":"string","maxLength":200,"description":"For source=application only — the applicationData field this milestone slot lives in (used as a stable rendering key)."},"formData":{"type":"object","additionalProperties":{},"description":"For source=application only — applicant-filled fields beyond the core (deliverables, fundingRequested, etc.)."},"completed":{"type":"object","additionalProperties":{},"description":"Latest completion payload when present"},"verified":{"type":"object","additionalProperties":{},"description":"Latest verification payload when present (single object)"}},"required":["source","currentStatus","grantUID","chainID","title"],"additionalProperties":false},"maxItems":200,"description":"Every milestone the application detail page should render — both applicant-added (source=application) and project-inherited (source=project), UID-deduped (application wins) and sorted (done at bottom, then due date ascending)."}},"required":["id","programId","chainID","applicantEmail","ownerAddress","applicationData","status","statusHistory","referenceNumber","postApprovalCompleted","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/program/{programId}/{chainId}/by-email":{"get":{"summary":"Get Application by Email","tags":["Funding Applications"],"description":"Get a funding application by email and program","parameters":[{"in":"query","name":"email","required":true,"schema":{"type":"string","format":"email"}},{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}},{"in":"path","name":"chainId","required":true,"schema":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}]}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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)"},"karmaProfileEvaluation":{"type":"object","properties":{"evaluation":{"type":"string","description":"Raw LLM JSON output"},"promptId":{"type":"string","description":"Prompt fingerprint used"},"evaluatedAt":{"type":"string","description":"When the evaluation last ran or last verified inputs unchanged"},"status":{"type":"string","enum":["pending","in_progress","completed","failed","skipped"],"description":"Evaluation status"},"context":{"type":"string","description":"Raw Karma profile markdown — audit trail for AI claims"},"contextHash":{"type":"string","description":"SHA-256 fingerprint of {projectUID, context, promptFingerprint}"},"skipReason":{"type":"string","enum":["no_field_configured","uid_empty","uid_invalid","project_not_found","aggregator_failed"],"description":"Present only when status === skipped"}},"required":["evaluation","promptId","status","context","contextHash"],"additionalProperties":false,"description":"Track-record AI evaluation (admin-only, never shown to applicants). Stripped from non-admin responses by the same sanitizer that hides internalAIEvaluation."},"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 the program reviewer approved for THIS application at intake. This is an intake-time approval value — it is NOT the amount actually disbursed and NOT the administrator-configured allocation in the disbursement system. Do NOT sum this field across applications to estimate \"program funding\" or \"total disbursed\" — that produces misleading numbers because: (a) approvals can be revised in the disbursement system, (b) applications without a corresponding payout configuration are not part of the funding flow, and (c) disbursements are tracked on-chain separately. For authoritative program funding totals call GET /v2/programs/{programId}/financials."},"approvedCurrency":{"type":"string","description":"Currency of the intake-time approved amount (e.g., \"OP\", \"USD\"). Paired with `approvedAmount` — same caveats apply."},"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"},"resolvedProjectName":{"type":"string","description":"Display name resolved server-side: prefers a project/title field from the submitted form data, falls back to the linked Karma project title when the application has a projectUID, omitted when neither source yields a value."},"milestoneStatuses":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["application","project"],"description":"Origin of this milestone: 'application' = added by the applicant via applicationData; 'project' = inherited from the project's grant for this program (not in applicationData)."},"milestoneUID":{"type":"string","maxLength":200,"description":"On-chain milestone UID. Omitted for application-source slots that have not been anchored on-chain yet."},"currentStatus":{"type":"string","maxLength":64,"description":"Milestone current status (pending, completed, verified)"},"grantUID":{"type":"string","maxLength":200,"description":"Parent grant UID — needed by clients submitting completion attestations"},"chainID":{"type":"number","description":"Chain on which this milestone lives — application.chainID is null for off-chain programs, so the milestone's actual chain has to come from the grant"},"title":{"type":"string","maxLength":500,"description":"Display title for the milestone"},"description":{"type":"string","maxLength":10000,"description":"Display description for the milestone"},"dueDate":{"type":"string","maxLength":64,"description":"ISO date or yyyy-mm-dd format"},"startsAt":{"type":"number"},"priority":{"type":"number"},"fieldLabel":{"type":"string","maxLength":200,"description":"For source=application only — the applicationData field this milestone slot lives in (used as a stable rendering key)."},"formData":{"type":"object","additionalProperties":{},"description":"For source=application only — applicant-filled fields beyond the core (deliverables, fundingRequested, etc.)."},"completed":{"type":"object","additionalProperties":{},"description":"Latest completion payload when present"},"verified":{"type":"object","additionalProperties":{},"description":"Latest verification payload when present (single object)"}},"required":["source","currentStatus","grantUID","chainID","title"],"additionalProperties":false},"maxItems":200,"description":"Every milestone the application detail page should render — both applicant-added (source=application) and project-inherited (source=project), UID-deduped (application wins) and sorted (done at bottom, then due date ascending)."}},"required":["id","programId","chainID","applicantEmail","ownerAddress","applicationData","status","statusHistory","referenceNumber","postApprovalCompleted","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/program/{programId}/statistics":{"get":{"summary":"Get Application Statistics (programId only)","tags":["Funding Applications"],"description":"Get application statistics for a specific program including counts by status (programId only)","parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/program/{programId}/{chainId}/statistics":{"get":{"summary":"Get Application Statistics","tags":["Funding Applications"],"description":"Get application statistics for a specific program including counts by status","parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}},{"in":"path","name":"chainId","required":true,"schema":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}]}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/{programId}/evaluate-realtime":{"post":{"summary":"AI Evaluate Application (programId only)","tags":["Funding Applications"],"description":"Perform real-time AI evaluation of application data using configured AI models (offchain compatible)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"applicationData":{"type":"object","additionalProperties":{}}},"required":["applicationData"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/{programId}/{chainId}/evaluate-realtime":{"post":{"summary":"AI Evaluate Application","tags":["Funding Applications"],"description":"Perform real-time AI evaluation of application data using configured AI models","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"applicationData":{"type":"object","additionalProperties":{}}},"required":["applicationData"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}},{"in":"path","name":"chainId","required":true,"schema":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}]}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/{referenceNumber}/evaluate":{"post":{"summary":"Evaluate Application by Reference Number","tags":["Funding Applications"],"description":"Run AI evaluation on an existing funding application and update the aiEvaluation field. Requires APPLICATION_REVIEW permission.","parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/{referenceNumber}/evaluate-internal":{"post":{"summary":"Trigger Internal AI Evaluation","tags":["Funding Applications"],"description":"Manually trigger internal AI evaluation on an existing funding application. Requires APPLICATION_REVIEW permission.","parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/{referenceNumber}/evaluate-karma-profile":{"post":{"summary":"Trigger Karma Profile (Track-Record) AI Evaluation","tags":["Funding Applications"],"description":"Manually trigger the Karma Profile (track-record) AI evaluation on an existing funding application. Independent of the Internal evaluation — judges delivery history across the applicant's linked Karma project. Requires APPLICATION_REVIEW permission.","parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"referenceNumber":{"type":"string","maxLength":200},"status":{"type":"string","enum":["pending","in_progress","completed","failed","skipped"],"description":"Evaluation status"},"evaluation":{"type":"string","maxLength":100000,"description":"Raw LLM JSON output (free-form; rendered by the generic EvaluationDisplay walker)"},"promptId":{"type":"string","maxLength":500,"description":"Langfuse prompt ID used"},"evaluatedAt":{"type":"string","maxLength":64,"description":"Timestamp when the evaluation last ran (or last verified inputs were unchanged via fingerprint short-circuit). Optional because the controller maps `result.evaluatedAt?.toISOString()` — new evaluations always populate it, but the service-layer return type allows undefined, so the response contract matches."},"context":{"type":"string","maxLength":250000,"description":"Raw Karma profile markdown used as the audit trail for any LLM claim"},"contextHash":{"type":"string","maxLength":64,"description":"SHA-256 fingerprint of {projectUID, context, promptId} — used to short-circuit unchanged re-runs"},"skipReason":{"type":"string","enum":["no_field_configured","uid_empty","uid_invalid","prompt_not_configured","project_not_found","aggregator_failed"],"description":"Present only when status === skipped"}},"required":["success","referenceNumber","status","evaluation","promptId","context","contextHash"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/admin/{programId}/export":{"get":{"summary":"Export Admin Applications CSV (programId only)","tags":["Funding Applications"],"description":"Export complete applications data as CSV file with all fields. Requires APPLICATION_VIEW_ALL permission.","parameters":[{"in":"query","name":"status","required":false,"schema":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"]}},{"in":"query","name":"search","required":false,"schema":{"type":"string"}},{"in":"query","name":"dateFrom","required":false,"schema":{"type":"string"}},{"in":"query","name":"dateTo","required":false,"schema":{"type":"string"}},{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"CSV file content with complete application data including private fields","content":{"application/json":{"schema":{"type":"string","description":"CSV file content with complete application data including private fields"}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/admin/{programId}/{chainId}/export":{"get":{"summary":"Export Admin Applications CSV","tags":["Funding Applications"],"description":"Export complete applications data as CSV file with all fields. Requires APPLICATION_VIEW_ALL permission.","parameters":[{"in":"query","name":"status","required":false,"schema":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"]}},{"in":"query","name":"search","required":false,"schema":{"type":"string"}},{"in":"query","name":"dateFrom","required":false,"schema":{"type":"string"}},{"in":"query","name":"dateTo","required":false,"schema":{"type":"string"}},{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}},{"in":"path","name":"chainId","required":true,"schema":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"number"}]}}],"responses":{"200":{"description":"CSV file content with complete application data including private fields","content":{"application/json":{"schema":{"type":"string","description":"CSV file content with complete application data including private fields"}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/user/my-applications":{"get":{"summary":"Get My Applications","tags":["Funding Applications"],"description":"Get applications submitted by the authenticated user with pagination and filtering options","parameters":[{"in":"query","name":"communitySlug","required":false,"schema":{"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"limit","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"status","required":false,"schema":{"type":"string","enum":["pending","under_review","approved","rejected","revision_requested","resubmitted","withdrawn"]}},{"in":"query","name":"search","required":false,"schema":{"type":"string"}},{"in":"query","name":"dateFrom","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"in":"query","name":"dateTo","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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)"},"karmaProfileEvaluation":{"type":"object","properties":{"evaluation":{"type":"string","description":"Raw LLM JSON output"},"promptId":{"type":"string","description":"Prompt fingerprint used"},"evaluatedAt":{"type":"string","description":"When the evaluation last ran or last verified inputs unchanged"},"status":{"type":"string","enum":["pending","in_progress","completed","failed","skipped"],"description":"Evaluation status"},"context":{"type":"string","description":"Raw Karma profile markdown — audit trail for AI claims"},"contextHash":{"type":"string","description":"SHA-256 fingerprint of {projectUID, context, promptFingerprint}"},"skipReason":{"type":"string","enum":["no_field_configured","uid_empty","uid_invalid","project_not_found","aggregator_failed"],"description":"Present only when status === skipped"}},"required":["evaluation","promptId","status","context","contextHash"],"additionalProperties":false,"description":"Track-record AI evaluation (admin-only, never shown to applicants). Stripped from non-admin responses by the same sanitizer that hides internalAIEvaluation."},"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 the program reviewer approved for THIS application at intake. This is an intake-time approval value — it is NOT the amount actually disbursed and NOT the administrator-configured allocation in the disbursement system. Do NOT sum this field across applications to estimate \"program funding\" or \"total disbursed\" — that produces misleading numbers because: (a) approvals can be revised in the disbursement system, (b) applications without a corresponding payout configuration are not part of the funding flow, and (c) disbursements are tracked on-chain separately. For authoritative program funding totals call GET /v2/programs/{programId}/financials."},"approvedCurrency":{"type":"string","description":"Currency of the intake-time approved amount (e.g., \"OP\", \"USD\"). Paired with `approvedAmount` — same caveats apply."},"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"},"resolvedProjectName":{"type":"string","description":"Display name resolved server-side: prefers a project/title field from the submitted form data, falls back to the linked Karma project title when the application has a projectUID, omitted when neither source yields a value."},"milestoneStatuses":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["application","project"],"description":"Origin of this milestone: 'application' = added by the applicant via applicationData; 'project' = inherited from the project's grant for this program (not in applicationData)."},"milestoneUID":{"type":"string","maxLength":200,"description":"On-chain milestone UID. Omitted for application-source slots that have not been anchored on-chain yet."},"currentStatus":{"type":"string","maxLength":64,"description":"Milestone current status (pending, completed, verified)"},"grantUID":{"type":"string","maxLength":200,"description":"Parent grant UID — needed by clients submitting completion attestations"},"chainID":{"type":"number","description":"Chain on which this milestone lives — application.chainID is null for off-chain programs, so the milestone's actual chain has to come from the grant"},"title":{"type":"string","maxLength":500,"description":"Display title for the milestone"},"description":{"type":"string","maxLength":10000,"description":"Display description for the milestone"},"dueDate":{"type":"string","maxLength":64,"description":"ISO date or yyyy-mm-dd format"},"startsAt":{"type":"number"},"priority":{"type":"number"},"fieldLabel":{"type":"string","maxLength":200,"description":"For source=application only — the applicationData field this milestone slot lives in (used as a stable rendering key)."},"formData":{"type":"object","additionalProperties":{},"description":"For source=application only — applicant-filled fields beyond the core (deliverables, fundingRequested, etc.)."},"completed":{"type":"object","additionalProperties":{},"description":"Latest completion payload when present"},"verified":{"type":"object","additionalProperties":{},"description":"Latest verification payload when present (single object)"}},"required":["source","currentStatus","grantUID","chainID","title"],"additionalProperties":false},"maxItems":200,"description":"Every milestone the application detail page should render — both applicant-added (source=application) and project-inherited (source=project), UID-deduped (application wins) and sorted (done at bottom, then due date ascending)."}},"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/{referenceNumber}/post-approval":{"put":{"summary":"Update Post-Approval Form","tags":["Funding Applications"],"description":"Update post-approval form responses. Only available for approved applications and only the application owner can update","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"postApprovalData":{"type":"object","additionalProperties":{}}},"required":["postApprovalData"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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)"},"karmaProfileEvaluation":{"type":"object","properties":{"evaluation":{"type":"string","description":"Raw LLM JSON output"},"promptId":{"type":"string","description":"Prompt fingerprint used"},"evaluatedAt":{"type":"string","description":"When the evaluation last ran or last verified inputs unchanged"},"status":{"type":"string","enum":["pending","in_progress","completed","failed","skipped"],"description":"Evaluation status"},"context":{"type":"string","description":"Raw Karma profile markdown — audit trail for AI claims"},"contextHash":{"type":"string","description":"SHA-256 fingerprint of {projectUID, context, promptFingerprint}"},"skipReason":{"type":"string","enum":["no_field_configured","uid_empty","uid_invalid","project_not_found","aggregator_failed"],"description":"Present only when status === skipped"}},"required":["evaluation","promptId","status","context","contextHash"],"additionalProperties":false,"description":"Track-record AI evaluation (admin-only, never shown to applicants). Stripped from non-admin responses by the same sanitizer that hides internalAIEvaluation."},"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 the program reviewer approved for THIS application at intake. This is an intake-time approval value — it is NOT the amount actually disbursed and NOT the administrator-configured allocation in the disbursement system. Do NOT sum this field across applications to estimate \"program funding\" or \"total disbursed\" — that produces misleading numbers because: (a) approvals can be revised in the disbursement system, (b) applications without a corresponding payout configuration are not part of the funding flow, and (c) disbursements are tracked on-chain separately. For authoritative program funding totals call GET /v2/programs/{programId}/financials."},"approvedCurrency":{"type":"string","description":"Currency of the intake-time approved amount (e.g., \"OP\", \"USD\"). Paired with `approvedAmount` — same caveats apply."},"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"},"resolvedProjectName":{"type":"string","description":"Display name resolved server-side: prefers a project/title field from the submitted form data, falls back to the linked Karma project title when the application has a projectUID, omitted when neither source yields a value."},"milestoneStatuses":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["application","project"],"description":"Origin of this milestone: 'application' = added by the applicant via applicationData; 'project' = inherited from the project's grant for this program (not in applicationData)."},"milestoneUID":{"type":"string","maxLength":200,"description":"On-chain milestone UID. Omitted for application-source slots that have not been anchored on-chain yet."},"currentStatus":{"type":"string","maxLength":64,"description":"Milestone current status (pending, completed, verified)"},"grantUID":{"type":"string","maxLength":200,"description":"Parent grant UID — needed by clients submitting completion attestations"},"chainID":{"type":"number","description":"Chain on which this milestone lives — application.chainID is null for off-chain programs, so the milestone's actual chain has to come from the grant"},"title":{"type":"string","maxLength":500,"description":"Display title for the milestone"},"description":{"type":"string","maxLength":10000,"description":"Display description for the milestone"},"dueDate":{"type":"string","maxLength":64,"description":"ISO date or yyyy-mm-dd format"},"startsAt":{"type":"number"},"priority":{"type":"number"},"fieldLabel":{"type":"string","maxLength":200,"description":"For source=application only — the applicationData field this milestone slot lives in (used as a stable rendering key)."},"formData":{"type":"object","additionalProperties":{},"description":"For source=application only — applicant-filled fields beyond the core (deliverables, fundingRequested, etc.)."},"completed":{"type":"object","additionalProperties":{},"description":"Latest completion payload when present"},"verified":{"type":"object","additionalProperties":{},"description":"Latest verification payload when present (single object)"}},"required":["source","currentStatus","grantUID","chainID","title"],"additionalProperties":false},"maxItems":200,"description":"Every milestone the application detail page should render — both applicant-added (source=application) and project-inherited (source=project), UID-deduped (application wins) and sorted (done at bottom, then due date ascending)."}},"required":["id","programId","chainID","applicantEmail","ownerAddress","applicationData","status","statusHistory","referenceNumber","postApprovalCompleted","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/{referenceNumber}/reviewers":{"put":{"summary":"Assign Reviewers to Application","tags":["Funding Applications"],"description":"Assign or update reviewers for a specific funding application. Admins (PROGRAM_MANAGE_REVIEWERS) can change any reviewer; configured program/milestone reviewers (APPLICATION_REVIEW) can self-assign or self-unassign on the matching list.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"appReviewerAddresses":{"type":"array","items":{"type":"string"}},"milestoneReviewerAddresses":{"type":"array","items":{"$ref":"#/properties/appReviewerAddresses/items"}}},"additionalProperties":false}}}},"parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"get":{"summary":"Get Assigned Reviewers","tags":["Funding Applications"],"description":"Get all reviewers currently assigned to a specific funding application. Requires APPLICATION_VIEW_ALL, APPLICATION_VIEW_ASSIGNED, or APPLICATION_READ permission.","parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"appReviewers":{"type":"array","items":{"type":"string"}},"milestoneReviewers":{"type":"array","items":{"type":"string"}}},"required":["appReviewers","milestoneReviewers"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/{referenceNumber}/versions/timeline":{"get":{"summary":"Get Application Version Timeline","tags":["Funding Application Versions"],"description":"Get the version history timeline for a funding application, including all changes made across versions","parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/contributors/profiles":{"get":{"summary":"Get Contributor Profiles","tags":["Contributors"],"description":"Get contributor profiles by wallet addresses","parameters":[{"in":"query","name":"addresses","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-program-configs/{programId}/reviewers":{"post":{"summary":"Add Program Reviewer","tags":["Program Reviewers"],"description":"Add a reviewer to a funding program. Requires PROGRAM_MANAGE_REVIEWERS permission","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"allOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"string","minLength":1}]},"email":{"type":"string","format":"email"},"telegram":{"allOf":[{"type":"string","maxLength":200},{"anyOf":[{"type":"string","pattern":"^@?[a-zA-Z0-9_]{5,32}$"},{"type":"string","enum":[""]}]}],"description":"Telegram handle"},"slack":{"allOf":[{"type":"string","maxLength":254},{"anyOf":[{"type":"string","minLength":2},{"type":"string","enum":[""]}]}],"description":"Slack member ID, email, or display name"}},"required":["name","email"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"publicAddress":{"type":"string","description":"Public wallet address of the reviewer"},"programId":{"type":"string","description":"Program identifier"},"chainID":{"type":"number","nullable":true,"description":"Blockchain chain ID (null for off-chain programs)"},"userProfile":{"type":"object","properties":{"id":{"type":"string","description":"User profile ID"},"publicAddress":{"type":"string","description":"Public wallet address"},"name":{"type":"string","description":"User name"},"email":{"type":"string","description":"User email address"},"telegram":{"type":"string","description":"User telegram handle"},"slack":{"type":"string","description":"User slack handle"},"createdAt":{"type":"string","description":"Profile creation date"},"updatedAt":{"type":"string","description":"Profile update date"}},"required":["publicAddress","name","email","createdAt","updatedAt"],"additionalProperties":false,"description":"User profile information"},"assignedAt":{"type":"string","description":"Date when reviewer was assigned"},"success":{"type":"boolean","description":"Whether the operation was successful"},"message":{"type":"string","description":"Success or error message"}},"required":["publicAddress","programId","chainID","userProfile","assignedAt","success","message"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"get":{"summary":"Get Program Reviewers","tags":["Program Reviewers"],"description":"Get list of reviewers for a funding program. Requires PROGRAM_VIEW permission. Returns one row per reviewer (newest wallet when multiple wallets share an email).","parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"reviewers":{"type":"array","items":{"type":"object","properties":{"publicAddress":{"type":"string","description":"Public wallet address of the reviewer"},"programId":{"type":"string","description":"Program identifier"},"chainID":{"type":"number","nullable":true,"description":"Blockchain chain ID (null for off-chain programs)"},"userProfile":{"type":"object","properties":{"id":{"type":"string","description":"User profile ID"},"publicAddress":{"type":"string","description":"Public wallet address"},"name":{"type":"string","description":"User name"},"email":{"type":"string","description":"User email address"},"telegram":{"type":"string","description":"User telegram handle"},"slack":{"type":"string","description":"User slack handle"},"createdAt":{"type":"string","description":"Profile creation date"},"updatedAt":{"type":"string","description":"Profile update date"}},"required":["publicAddress","name","email","createdAt","updatedAt"],"additionalProperties":false,"description":"User profile information"},"assignedAt":{"type":"string","description":"Date when reviewer was assigned"}},"required":["publicAddress","programId","chainID","userProfile","assignedAt"],"additionalProperties":false},"description":"List of program reviewers"},"total":{"type":"number","description":"Total number of reviewers"}},"required":["reviewers","total"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-program-configs/{programId}/reviewers/{publicAddress}":{"delete":{"summary":"Remove Program Reviewer (Deprecated)","tags":["Program Reviewers"],"description":"DEPRECATED: Use DELETE /funding-program-configs/:programId/reviewers/by-email instead. Remove a reviewer from a funding program by wallet address.","parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}},{"in":"path","name":"publicAddress","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"message":{"type":"string","description":"Success or error message"}},"required":["success","message"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-program-configs/{programId}/reviewers/by-email":{"delete":{"summary":"Remove Program Reviewer by Email","tags":["Program Reviewers"],"description":"Remove a reviewer from a funding program by email. Resolves email to wallet address server-side. Requires PROGRAM_MANAGE_REVIEWERS permission","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"}},"required":["email"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"204":{"description":"Reviewer removed successfully"},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"patch":{"summary":"Update Program Reviewer Contact by Email","tags":["Program Reviewers"],"description":"Update contact fields (telegram and/or slack) for a reviewer matched by email. Requires PROGRAM_MANAGE_REVIEWERS permission","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"telegram":{"allOf":[{"type":"string","maxLength":200},{"anyOf":[{"type":"string","pattern":"^@?[a-zA-Z0-9_]{5,32}$"},{"type":"string","enum":[""]}]}]},"slack":{"allOf":[{"type":"string","maxLength":254},{"anyOf":[{"type":"string","minLength":2},{"type":"string","enum":[""]}]}]}},"required":["email"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"reviewers":{"type":"array","items":{"type":"object","properties":{"publicAddress":{"type":"string","description":"Public wallet address of the reviewer"},"programId":{"type":"string","description":"Program identifier"},"chainID":{"type":"number","nullable":true,"description":"Blockchain chain ID (null for off-chain programs)"},"userProfile":{"type":"object","properties":{"id":{"type":"string","description":"User profile ID"},"publicAddress":{"type":"string","description":"Public wallet address"},"name":{"type":"string","description":"User name"},"email":{"type":"string","description":"User email address"},"telegram":{"type":"string","description":"User telegram handle"},"slack":{"type":"string","description":"User slack handle"},"createdAt":{"type":"string","description":"Profile creation date"},"updatedAt":{"type":"string","description":"Profile update date"}},"required":["publicAddress","name","email","createdAt","updatedAt"],"additionalProperties":false,"description":"User profile information"},"assignedAt":{"type":"string","description":"Date when reviewer was assigned"}},"required":["publicAddress","programId","chainID","userProfile","assignedAt"],"additionalProperties":false},"description":"Updated reviewer records with fresh user profile"},"total":{"type":"number","description":"Number of reviewer records updated"}},"required":["reviewers","total"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-program-configs/{programId}/check-permission":{"get":{"summary":"Check Program Permission","tags":["Program Reviewers"],"description":"Check if the authenticated user has permission for a specific action on a funding program","parameters":[{"in":"query","name":"action","required":false,"schema":{"type":"string"},"description":"Specific action to check permission for (e.g., read, comment)"},{"in":"path","name":"programId","required":true,"schema":{"type":"string"},"description":"Program identifier"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"hasPermission":{"type":"boolean","description":"Whether the user has the requested permission"},"permissions":{"type":"array","items":{"type":"string"},"description":"List of all permissions the user has for this resource"}},"required":["hasPermission","permissions"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/programs/{programId}/milestone-reviewers":{"post":{"summary":"Add Milestone Reviewer","tags":["Milestone Reviewers"],"description":"Add a milestone reviewer to a program. Requires PROGRAM_MANAGE_REVIEWERS permission","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"allOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"string","minLength":1}]},"email":{"type":"string","format":"email"},"telegram":{"allOf":[{"type":"string","maxLength":200},{"anyOf":[{"type":"string","pattern":"^@?[a-zA-Z0-9_]{5,32}$"},{"type":"string","enum":[""]}]}]},"slack":{"allOf":[{"type":"string","maxLength":254},{"anyOf":[{"type":"string","minLength":2},{"type":"string","enum":[""]}]}]}},"required":["name","email"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"get":{"summary":"Get Milestone Reviewers","tags":["Milestone Reviewers"],"description":"Get all milestone reviewers for a program. Requires PROGRAM_VIEW permission","parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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"},"slack":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/programs/{programId}/milestone-reviewers/{walletAddress}":{"delete":{"summary":"Remove Milestone Reviewer (Deprecated)","tags":["Milestone Reviewers"],"description":"DEPRECATED: Use DELETE /programs/:programId/milestone-reviewers/by-email instead. Remove a milestone reviewer by wallet address.","parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}},{"in":"path","name":"walletAddress","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"204":{"description":"Milestone reviewer removed successfully"},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/programs/{programId}/milestone-reviewers/by-email":{"delete":{"summary":"Remove Milestone Reviewer by Email","tags":["Milestone Reviewers"],"description":"Remove a milestone reviewer by email. Resolves email to wallet address server-side. Requires PROGRAM_MANAGE_REVIEWERS permission","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"}},"required":["email"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"204":{"description":"Milestone reviewer removed successfully"},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"patch":{"summary":"Update Milestone Reviewer Contact by Email","tags":["Milestone Reviewers"],"description":"Update contact fields (telegram and/or slack) for a milestone reviewer matched by email. Requires PROGRAM_MANAGE_REVIEWERS permission","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"telegram":{"allOf":[{"type":"string","maxLength":200},{"anyOf":[{"type":"string","pattern":"^@?[a-zA-Z0-9_]{5,32}$"},{"type":"string","enum":[""]}]}]},"slack":{"allOf":[{"type":"string","maxLength":254},{"anyOf":[{"type":"string","minLength":2},{"type":"string","enum":[""]}]}]}},"required":["email"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"reviewers":{"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"},"slack":{"type":"string"}},"required":["publicAddress"],"additionalProperties":false,"nullable":true,"description":"User profile information (null if profile not set)"}},"required":["publicAddress","programId","chainID","userProfile"],"additionalProperties":false},"description":"Updated milestone reviewer records with fresh user profile"},"total":{"type":"number","description":"Number of milestone reviewer records updated"}},"required":["reviewers","total"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{communityUID}/reviewers":{"get":{"summary":"Get Community Reviewers","tags":["Community Reviewers"],"description":"Get a deduped, recency-sorted, paginated list of all reviewers in a community. Requires PROGRAM_MANAGE_REVIEWERS on at least one program in the community.","parameters":[{"in":"query","name":"programId","required":false,"schema":{"type":"string","maxLength":200}},{"in":"query","name":"search","required":false,"schema":{"type":"string","maxLength":200}},{"in":"query","name":"cursor","required":false,"schema":{"type":"string","maxLength":2000}},{"in":"query","name":"limit","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"path","name":"communityUID","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"publicAddress":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"telegram":{"type":"string"},"slack":{"type":"string"},"picture":{"type":"string"},"roles":{"type":"array","items":{"type":"string","enum":["program-reviewer","milestone-reviewer"]},"maxItems":2},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["publicAddress","name","email","roles","lastSeenAt"],"additionalProperties":false},"maxItems":100},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{communityUID}/reviewer-programs":{"get":{"summary":"Get Programs With Reviewers","tags":["Community Reviewers"],"description":"Get distinct programs in a community that have at least one reviewer assigned, with reviewer counts. Used to power the program filter in the reviewer picker. Requires PROGRAM_MANAGE_REVIEWERS on at least one program in the community.","parameters":[{"in":"path","name":"communityUID","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"programId":{"type":"string"},"name":{"type":"string"},"reviewerCount":{"type":"integer","minimum":0}},"required":["programId","name","reviewerCount"],"additionalProperties":false},"maxItems":1000}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{communityId}/regions":{"get":{"summary":"Get Community Regions","tags":["Regions"],"description":"Get all regions for a community","parameters":[{"in":"path","name":"communityId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"post":{"summary":"Create Region","tags":["Regions"],"description":"Create a new region for a community. Requires community admin access","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"communityId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/regions/{regionId}":{"get":{"summary":"Get Region by ID","tags":["Regions"],"description":"Get a specific region by ID","parameters":[{"in":"path","name":"regionId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{communityId}/regions/{regionId}":{"put":{"summary":"Update Region","tags":["Regions"],"description":"Update an existing region. Requires community admin access","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"communityId","required":true,"schema":{"type":"string","minLength":1}},{"in":"path","name":"regionId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"delete":{"summary":"Delete Region","tags":["Regions"],"description":"Soft delete a region. Requires community admin access","parameters":[{"in":"path","name":"communityId","required":true,"schema":{"type":"string","minLength":1}},{"in":"path","name":"regionId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"204":{"description":"Region successfully deleted"},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/faucet/check-eligibility/{chainId}":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/v2/faucet/history":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v2/faucet/stats":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v2/faucet/balance/{chainId}":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v2/faucet/balances":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v2/faucet/request/{requestId}":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v2/faucet/request":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/v2/faucet/claim":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/v2/faucet/expire":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/v2/admin/faucet/whitelist":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"responses":{"200":{"description":"Default Response"}}}},"/v2/admin/faucet/blocked":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v2/admin/faucet/config":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v2/admin/faucet/requests":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v2/admin/faucet/whitelist/{chainId}/{contractAddress}":{"delete":{"responses":{"200":{"description":"Default Response"}}}},"/v2/admin/faucet/block":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/v2/admin/faucet/block/{address}":{"delete":{"responses":{"200":{"description":"Default Response"}}}},"/v2/admin/faucet/config/{chainId}":{"put":{"responses":{"200":{"description":"Default Response"}}}},"/v2/admin/faucet/expire":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/v2/admin/faucet/emergency-stop/{chainId}":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/v2/admin/faucet/resume/{chainId}":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/v2/admin/faucet/settings/{chainId}":{"put":{"responses":{"200":{"description":"Default Response"}}},"delete":{"responses":{"200":{"description":"Default Response"}}}},"/v2/admin/faucet/global-config":{"put":{"responses":{"200":{"description":"Default Response"}}}},"/v2/admin/faucet/settings":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/v2/admin/chains":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"responses":{"200":{"description":"Default Response"}}}},"/v2/admin/chains/{chainId}":{"get":{"responses":{"200":{"description":"Default Response"}}},"put":{"responses":{"200":{"description":"Default Response"}}},"delete":{"responses":{"200":{"description":"Default Response"}}}},"/v2/applications/{referenceNumber}/comments/public":{"get":{"summary":"Get Application Comments (Public)","tags":["Application Comments"],"description":"Get all comments for a specific funding application (public endpoint). Only works if showCommentsOnPublicPage flag is enabled for the program.","parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"post":{"summary":"Create Public Comment","tags":["Application Comments"],"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\".","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":10000},"authorName":{"type":"string","maxLength":100}},"required":["content"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/applications/{referenceNumber}/comments":{"get":{"summary":"Get Application Comments","tags":["Application Comments"],"description":"Get all comments for a specific funding application. Requires APPLICATION_VIEW_ALL, APPLICATION_VIEW_ASSIGNED, or APPLICATION_READ permission","parameters":[{"in":"query","name":"admin","required":false,"schema":{"type":"string","enum":["true","false"]}},{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"post":{"summary":"Create Application Comment","tags":["Application Comments"],"description":"Create a new comment on a funding application. Requires APPLICATION_COMMENT permission","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":10000},"authorName":{"type":"string","maxLength":100}},"required":["content"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/comments/{commentId}":{"put":{"summary":"Update Application Comment","tags":["Application Comments"],"description":"Update an existing comment. Requires COMMENT_EDIT_OWN permission. Only the comment author can edit their own comment.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1}},"required":["content"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"commentId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"delete":{"summary":"Delete Application Comment","tags":["Application Comments"],"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.","parameters":[{"in":"path","name":"commentId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Success message confirming comment deletion"}},"required":["message"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/grants/{projectUID}/{programId}/comments":{"get":{"summary":"Get Grant Comments","tags":["Grant Comments"],"description":"Get all comments for a specific grant. Only accessible by admins and reviewers.","parameters":[{"in":"path","name":"projectUID","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"post":{"summary":"Create Grant Comment","tags":["Grant Comments"],"description":"Create a new comment on a grant. Only accessible by admins and reviewers.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":10000}},"required":["content"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"projectUID","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/grant-comments/{commentId}":{"put":{"summary":"Update Grant Comment","tags":["Grant Comments"],"description":"Update an existing grant comment. Only the comment author or admins/reviewers can edit.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":10000}},"required":["content"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"commentId","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"delete":{"summary":"Delete Grant Comment","tags":["Grant Comments"],"description":"Delete a grant comment. Authors can delete their own comments. Admins can soft-delete any comment.","parameters":[{"in":"path","name":"commentId","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Success message confirming comment deletion"}},"required":["message"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/program-scores/{programId}":{"get":{"summary":"Get Program Scores","tags":["Program Scores"],"description":"Get program scores by program ID","parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/program-scores/bulk-create-from-csv":{"post":{"summary":"Bulk Create Program Scores from CSV","tags":["Program Scores"],"description":"Bulk create program scores from CSV data","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"communityUID":{"type":"string","minLength":1,"maxLength":256},"programId":{"type":"string","minLength":1,"maxLength":256},"chainId":{"type":"integer","minimum":1},"csvData":{"type":"array","items":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":5000},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true}]}},"maxItems":10000}},"required":["communityUID","programId","chainId","csvData"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/impact-segments/{communityUIDOrSlug}":{"get":{"summary":"Get Impact Segments for Community","tags":["ImpactSegment"],"description":"Get impact segments by community UID or slug","parameters":[{"in":"path","name":"communityUIDOrSlug","required":true,"schema":{"type":"string","minLength":1},"description":"Community UID or slug identifier"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/indicators/aggregate":{"get":{"summary":"Get Aggregated Indicator Data","tags":["Indicators"],"description":"Get aggregated indicator data filtered by community, program, and/or project","parameters":[{"in":"query","name":"indicatorIds","required":true,"schema":{"type":"string","minLength":1},"description":"Comma-separated list of indicator IDs"},{"in":"query","name":"communityUID","required":true,"schema":{"type":"string","minLength":1},"description":"Community UID to filter by"},{"in":"query","name":"programId","required":false,"schema":{"type":"string"},"description":"Optional program ID to filter projects by program"},{"in":"query","name":"projectUID","required":false,"schema":{"type":"string"},"description":"Optional project UID to filter by"},{"in":"query","name":"startDate","required":false,"schema":{"type":"string"},"description":"Optional start date to filter datapoints (ISO string)"},{"in":"query","name":"endDate","required":false,"schema":{"type":"string"},"description":"Optional end date to filter datapoints (ISO string)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/indicators/":{"get":{"summary":"List Indicators","tags":["Indicators V2"],"description":"List indicators with pagination and filtering","parameters":[{"in":"query","name":"communityUID","required":false,"schema":{"type":"string"},"description":"Filter indicators by community UID"},{"in":"query","name":"programId","required":false,"schema":{"type":"string","pattern":"^\\d+$"},"description":"Filter indicators by program ID"},{"in":"query","name":"chainId","required":false,"schema":{"type":"string","pattern":"^\\d+$"},"description":"Filter indicators by chain ID (required with programId)"},{"in":"query","name":"syncType","required":false,"schema":{"type":"string","enum":["auto","manual"]},"description":"Filter by sync type"},{"in":"query","name":"page","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]},"description":"Page number (1-indexed)"},{"in":"query","name":"limit","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]},"description":"Items per page (max 100)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"post":{"summary":"Create or Update Indicator","tags":["Indicators V2"],"description":"Create or update an indicator. Community indicators require community admin permissions.","requestBody":{"content":{"application/json":{"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}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/indicators/unlinked":{"get":{"summary":"List Unlinked Indicators","tags":["Indicators V2"],"description":"List indicators without a communityUID (global/unlinked) with optional name search","parameters":[{"in":"query","name":"search","required":false,"schema":{"type":"string"},"description":"Filter indicators by name (case-insensitive)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/indicators/{indicatorId}":{"get":{"summary":"Get Indicator","tags":["Indicators V2"],"description":"Get a specific indicator by ID","parameters":[{"in":"path","name":"indicatorId","required":true,"schema":{"type":"string"},"description":"Indicator ID (UUID)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"delete":{"summary":"Delete Indicator","tags":["Indicators V2"],"description":"Delete an indicator. Cannot delete indicators with associated datapoints. Community indicators require community admin permissions.","parameters":[{"in":"path","name":"indicatorId","required":true,"schema":{"type":"string","minLength":1},"description":"Indicator ID to delete"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Deletion confirmation message"}},"required":["message"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/indicators/{indicatorId}/datapoints":{"get":{"summary":"List Indicator Datapoints","tags":["Indicators V2"],"description":"List datapoints for a specific indicator with pagination","parameters":[{"in":"query","name":"projectUID","required":false,"schema":{"type":"string"},"description":"Filter by project UID"},{"in":"query","name":"startDate","required":false,"schema":{"type":"string"},"description":"Filter datapoints from this date (ISO 8601)"},{"in":"query","name":"endDate","required":false,"schema":{"type":"string"},"description":"Filter datapoints to this date (ISO 8601)"},{"in":"query","name":"period","required":false,"schema":{"type":"string","enum":["30d","90d","180d","1y","monthly"]},"description":"Filter by period"},{"in":"query","name":"source","required":false,"schema":{"type":"string","enum":["manual","auto","silvi_api"]},"description":"Filter by data source"},{"in":"query","name":"page","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]},"description":"Page number (1-indexed)"},{"in":"query","name":"limit","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]},"description":"Items per page (max 100)"},{"in":"path","name":"indicatorId","required":true,"schema":{"type":"string"},"description":"Indicator ID (UUID)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/indicators/projects/{projectUID}":{"get":{"summary":"Get Project Indicators","tags":["Indicators V2"],"description":"Get all indicators with their datapoints for a specific project","parameters":[{"in":"query","name":"indicatorIds","required":false,"schema":{"type":"string"},"description":"Comma-separated list of indicator IDs to filter by"},{"in":"query","name":"startDate","required":false,"schema":{"type":"string"},"description":"Filter datapoints from this date (ISO 8601)"},{"in":"query","name":"endDate","required":false,"schema":{"type":"string"},"description":"Filter datapoints to this date (ISO 8601)"},{"in":"query","name":"period","required":false,"schema":{"type":"string","enum":["30d","90d","180d","1y","monthly"]},"description":"Filter by datapoint period"},{"in":"path","name":"projectUID","required":true,"schema":{"type":"string"},"description":"Project UID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/indicators/projects/{projectUID}/dashboard-metrics":{"get":{"summary":"Get Project Dashboard Metrics","tags":["Indicators V2"],"description":"Get dashboard metrics (transactions, commits, PRs, users) for a project","parameters":[{"in":"query","name":"period","required":false,"schema":{"type":"string","enum":["30d","90d","180d","1y"],"default":"30d"},"description":"Time period for metrics aggregation"},{"in":"path","name":"projectUID","required":true,"schema":{"type":"string"},"description":"Project UID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/indicators/milestones/{milestoneUID}":{"get":{"summary":"Get Milestone Indicators","tags":["Indicators V2"],"description":"Get all indicators with their datapoints for a specific milestone","parameters":[{"in":"path","name":"milestoneUID","required":true,"schema":{"type":"string"},"description":"Milestone UID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/indicators/communities/{communityUID}/aggregate":{"get":{"summary":"Get Community Aggregated Indicators","tags":["Indicators V2"],"description":"Get aggregated indicator data for a community with weekly/monthly granularity","parameters":[{"in":"query","name":"indicatorIds","required":false,"schema":{"type":"string"},"description":"Comma-separated list of indicator IDs to filter by"},{"in":"query","name":"programId","required":false,"schema":{"type":"string","pattern":"^\\d+$"},"description":"Filter by program ID"},{"in":"query","name":"projectUID","required":false,"schema":{"type":"string"},"description":"Filter by project UID"},{"in":"query","name":"startDate","required":false,"schema":{"type":"string"},"description":"Start date for aggregation (ISO 8601)"},{"in":"query","name":"endDate","required":false,"schema":{"type":"string"},"description":"End date for aggregation (ISO 8601)"},{"in":"query","name":"granularity","required":false,"schema":{"type":"string","enum":["weekly","monthly"],"default":"monthly"},"description":"Aggregation granularity"},{"in":"path","name":"communityUID","required":true,"schema":{"type":"string"},"description":"Community UID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/{referenceNumber}/milestone-completions":{"get":{"summary":"Get Milestone Completions by Application","tags":["Milestone Completions (Deprecated)"],"description":"DEPRECATED. Returns historical off-chain milestone completions for a funding application. New code should read on-chain MilestoneStatus attestations via the grant aggregate.","parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1}}],"deprecated":true,"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"post":{"summary":"Create Milestone Completion (410 Gone)","tags":["Milestone Completions (Deprecated)"],"description":"DEPRECATED. Off-chain completion writes are no longer accepted. Returns 410 Gone. Use the on-chain MilestoneStatus attestation flow.","deprecated":true,"responses":{"200":{"description":"Default Response"}}},"put":{"summary":"Update Milestone Completion (410 Gone)","tags":["Milestone Completions (Deprecated)"],"description":"DEPRECATED. Off-chain completion writes are no longer accepted. Returns 410 Gone. Use the on-chain MilestoneStatus attestation flow.","deprecated":true,"responses":{"200":{"description":"Default Response"}}}},"/v2/funding-applications/{referenceNumber}/milestone-completions/{milestoneFieldLabel}/{milestoneTitle}":{"get":{"summary":"Get Milestone Completion by Field and Title","tags":["Milestone Completions (Deprecated)"],"description":"DEPRECATED. Returns a specific historical off-chain milestone completion. New code should read on-chain MilestoneStatus attestations via the grant aggregate.","parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1}},{"in":"path","name":"milestoneFieldLabel","required":true,"schema":{"type":"string","minLength":1}},{"in":"path","name":"milestoneTitle","required":true,"schema":{"type":"string","minLength":1}}],"deprecated":true,"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/milestones/{milestoneUID}/attest-completion":{"post":{"summary":"Attest Milestone Completion as Reviewer","tags":["Milestone Attestations"],"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.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"completionComment":{"type":"string"},"programId":{"type":"string","minLength":1},"chainID":{"type":"integer","minimum":1}},"required":["completionComment","programId","chainID"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"milestoneUID","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"txHash":{"type":"string"},"attestationUID":{"type":"string"}},"required":["txHash","attestationUID"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/{referenceNumber}/milestones":{"delete":{"summary":"Delete Milestone","tags":["Milestone Deletion"],"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.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"milestoneFieldLabel":{"type":"string","minLength":1},"milestoneTitle":{"type":"string","minLength":1}},"required":["milestoneFieldLabel","milestoneTitle"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/{referenceNumber}/milestones/{milestoneIndex}":{"put":{"summary":"Edit Milestone Definition","tags":["Milestone Edit"],"description":"Edit a milestone definition in a funding application. Only the application owner or team members can edit milestones. Verified milestones cannot be edited.","requestBody":{"content":{"application/json":{"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}}}},"parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1}},{"in":"path","name":"milestoneIndex","required":true,"schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/milestones/{milestoneUID}/evaluation":{"get":{"summary":"Get Milestone Evaluation","tags":["Milestone Evaluations"],"description":"Get AI evaluations for a milestone","parameters":[{"in":"path","name":"milestoneUID","required":true,"schema":{"type":"string","minLength":1,"pattern":"^0x[a-fA-F0-9]+$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/{referenceNumber}/milestones/{milestoneTitle}/evaluation":{"get":{"summary":"Get Application Milestone Evaluation","tags":["Milestone Evaluations"],"description":"Get AI evaluations for a specific application milestone by reference number and title","parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1,"maxLength":50}},{"in":"path","name":"milestoneTitle","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/milestones/{milestoneUID}/on-chain-edit":{"put":{"summary":"Edit Milestone On-Chain","tags":["Milestone On-Chain Edit"],"description":"Edit an on-chain milestone attestation. Creates a new attestation with updated data and revokes the old one. Only milestone reviewers can use this endpoint.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"chainID":{"type":"integer","minimum":1},"programId":{"type":"string","minLength":1,"maxLength":256},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","minLength":1,"maxLength":5000},"endsAt":{"type":"integer"},"priority":{"type":"integer","minimum":0,"maximum":10}},"required":["chainID","programId"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"milestoneUID","required":true,"schema":{"type":"string","minLength":1,"maxLength":66,"pattern":"^0x[a-fA-F0-9]+$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"txHash":{"type":"string","maxLength":66},"newMilestoneUID":{"type":"string","maxLength":66},"revokedMilestoneUID":{"type":"string","maxLength":66},"revocationSuccess":{"type":"boolean"},"revocationTxHash":{"type":"string","maxLength":66}},"required":["txHash","newMilestoneUID","revokedMilestoneUID","revocationSuccess"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/milestones/{milestoneUID}/on-chain-delete":{"delete":{"summary":"Delete Milestone On-Chain","tags":["Milestone On-Chain Delete"],"description":"Revoke an on-chain milestone attestation. Only staff or admins of the grant's community can call this endpoint. Cannot delete milestones that already have a completion attestation.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"chainID":{"type":"integer","minimum":1}},"required":["chainID"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"milestoneUID","required":true,"schema":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"milestoneUID":{"type":"string","maxLength":66},"revocationSuccess":{"type":"boolean"},"revocationTxHash":{"type":"string","maxLength":66}},"required":["milestoneUID","revocationSuccess"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/indicator-datapoints/partner/{source}":{"post":{"summary":"Create Partner Datapoints","tags":["Indicator 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).","requestBody":{"content":{"application/json":{"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}}},"required":true},"parameters":[{"in":"path","name":"source","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/roles/{name}":{"get":{"summary":"Get Role by Name","tags":["Roles"],"description":"Get role by name","parameters":[{"in":"path","name":"name","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/roles/":{"get":{"summary":"Get All Roles","tags":["Roles"],"description":"Get all roles","responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"post":{"summary":"Create Role","tags":["Roles"],"description":"Create a new role","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Role name"},"description":{"type":"string","description":"Role description"}},"required":["name"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/roles/{id}":{"put":{"summary":"Update Role","tags":["Roles"],"description":"Update role by ID","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Role name"},"description":{"type":"string","description":"Role description"}},"additionalProperties":false}}}},"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"delete":{"summary":"Delete Role","tags":["Roles"],"description":"Delete role by ID","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"204":{"description":"Role deleted successfully"},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/permissions/{name}":{"get":{"summary":"Get Permission by Name","tags":["Permissions"],"description":"Get permission by name","parameters":[{"in":"path","name":"name","required":true,"schema":{"type":"string","minLength":1},"description":"Permission name"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/permissions/":{"get":{"summary":"Get All Permissions","tags":["Permissions"],"description":"Get all permissions","responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"post":{"summary":"Create Permission","tags":["Permissions"],"description":"Create a new permission","requestBody":{"content":{"application/json":{"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}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/permissions/{id}":{"put":{"summary":"Update Permission","tags":["Permissions"],"description":"Update permission by ID","requestBody":{"content":{"application/json":{"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}}}},"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1},"description":"Permission ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"delete":{"summary":"Delete Permission","tags":["Permissions"],"description":"Delete permission by ID","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1},"description":"Permission ID"}],"responses":{"204":{"description":"Permission deleted successfully"},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/permissions/attach":{"post":{"summary":"Attach Permission to Role","tags":["Permissions"],"description":"Attach permission to role","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"permissionId":{"type":"string","description":"Permission ID"},"roleId":{"type":"string","description":"Role ID"}},"required":["permissionId","roleId"],"additionalProperties":false}}},"required":true},"responses":{"204":{"description":"Permission attached to role successfully"},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/permissions/detach":{"post":{"summary":"Detach Permission from Role","tags":["Permissions"],"description":"Detach permission from role","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"permissionId":{"type":"string","description":"Permission ID"},"roleId":{"type":"string","description":"Role ID"}},"required":["permissionId","roleId"],"additionalProperties":false}}},"required":true},"responses":{"204":{"description":"Permission detached from role successfully"},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/users/{userId}/permissions":{"get":{"summary":"Get User Permissions","tags":["User Resource Permissions"],"description":"Get user permissions for resources","parameters":[{"in":"query","name":"resourceId","required":false,"schema":{"type":"string"},"description":"Resource ID"},{"in":"query","name":"resourceType","required":false,"schema":{"type":"string","enum":["PROGRAM","PROJECT","COMMUNITY","GRANT","MILESTONE","APPLICATION","WILDCARD"]},"description":"Resource type"},{"in":"path","name":"userId","required":true,"schema":{"type":"string","minLength":1},"description":"User ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/grant":{"post":{"summary":"Grant Role","tags":["User Resource Permissions"],"description":"Grant role to user for a specific resource","requestBody":{"content":{"application/json":{"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}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/revoke":{"post":{"summary":"Revoke Role","tags":["User Resource Permissions"],"description":"Revoke role from user for a specific resource","requestBody":{"content":{"application/json":{"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}}},"required":true},"responses":{"204":{"description":"Role revoked successfully"},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/auth/permissions":{"get":{"summary":"Get User Permissions","tags":["Authorization"],"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.","parameters":[{"in":"query","name":"communityId","required":false,"schema":{"type":"string"}},{"in":"query","name":"programId","required":false,"schema":{"type":"string"}},{"in":"query","name":"applicationId","required":false,"schema":{"type":"string"}},{"in":"query","name":"milestoneId","required":false,"schema":{"type":"string"}},{"in":"query","name":"chainId","required":false,"schema":{"type":"number"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/donations/me":{"get":{"summary":"Get My Donations","tags":["Donations"],"description":"Get all donations for the authenticated user. Resolves donations by both wallet address and email.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/donations/{uid}/{chainId}/status":{"get":{"summary":"Get Donation Status (Public)","tags":["Donations"],"description":"Get donation status by UID and chain ID using a polling token (X-Polling-Token header). Public endpoint for anonymous donation polling.","parameters":[{"in":"path","name":"uid","required":true,"schema":{"type":"string","minLength":1}},{"in":"path","name":"chainId","required":true,"schema":{"type":"integer","minimum":1}},{"in":"header","name":"x-polling-token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/donations/{uid}/{chainId}":{"get":{"summary":"Get Donation by UID","tags":["Donations"],"description":"Get a single donation by UID and chain ID. Only the donor can access their own donation.","parameters":[{"in":"path","name":"uid","required":true,"schema":{"type":"string","minLength":1}},{"in":"path","name":"chainId","required":true,"schema":{"type":"integer","minimum":1}}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/donations/user/{address}":{"get":{"summary":"Get User Donations","tags":["Donations"],"description":"Get all donations by user wallet address","parameters":[{"in":"path","name":"address","required":true,"schema":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/donations/project/{projectUID}":{"get":{"summary":"Get Project Donations","tags":["Donations"],"description":"Get all donations received by a project","parameters":[{"in":"path","name":"projectUID","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/donations/":{"post":{"summary":"Create Donation from Transaction","tags":["Donations"],"description":"Create a new donation record from a blockchain transaction. Verifies the transaction on-chain and extracts donation details.","requestBody":{"content":{"application/json":{"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}}},"required":true},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/settings/available-ai-models":{"get":{"summary":"Get Available AI Models","tags":["Settings"],"description":"Get list of available AI models for funding program configuration. This is a public endpoint.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"models":{"type":"array","items":{"type":"string","minLength":1}}},"required":["models"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/program-registry/search":{"get":{"summary":"Search Programs","tags":["Program Registry"],"description":"Search programs with advanced filters (categories, ecosystems, networks, grant types, etc.)","parameters":[{"in":"query","name":"page","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"limit","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"name","required":false,"schema":{"type":"string","maxLength":256}},{"in":"query","name":"isValid","required":false,"schema":{"type":"string","enum":["accepted","rejected","pending","all"],"default":"accepted"}},{"in":"query","name":"status","required":false,"schema":{"type":"string","enum":["active","inactive"]}},{"in":"query","name":"categories","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"in":"query","name":"ecosystems","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"in":"query","name":"networks","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"in":"query","name":"grantTypes","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"in":"query","name":"communities","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"in":"query","name":"minGrantSize","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"maxGrantSize","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"sortField","required":false,"schema":{"type":"string","enum":["createdAt","updatedAt","startsAt","endsAt","name"],"default":"updatedAt"}},{"in":"query","name":"sortOrder","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"in":"query","name":"onlyOnKarma","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"boolean"}]}},{"in":"query","name":"communityUid","required":false,"schema":{"type":"string"}},{"in":"query","name":"organization","required":false,"schema":{"type":"string"}},{"in":"query","name":"type","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"in":"query","name":"isActiveFilter","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"boolean"}]}},{"in":"query","name":"deadlineBefore","required":false,"schema":{"type":"string"}},{"in":"query","name":"deadlineAfter","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/program-registry/types":{"get":{"summary":"Get Program Type Counts","tags":["Program Registry"],"description":"Get count of programs per opportunity type with active counts","parameters":[{"in":"query","name":"onlyOnKarma","required":false,"schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"count":{"type":"number"},"activeCount":{"type":"number"}},"required":["type","count","activeCount"],"additionalProperties":false}}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/program-registry/filters":{"get":{"summary":"Get Filter Options","tags":["Program Registry"],"description":"Get organization/community filter options for dropdowns","responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/program-registry/{programId}":{"get":{"summary":"Get Program Registry Entry by ProgramId","tags":["Program Registry"],"description":"Get a program registry entry by programId (programId may include chainId suffix for duplicates)","parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"MongoDB unique identifier"},"programId":{"type":"string","description":"Domain identifier (globally unique)"},"chainID":{"type":"number","nullable":true,"description":"Chain ID (null for off-chain programs)"},"createdByAddress":{"type":"string","description":"Creator wallet address"},"offChain":{"type":"boolean","description":"Program type (true for off-chain, false for on-chain legacy)"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"profileId":{"type":"string","nullable":true,"description":"Profile ID (null for off-chain programs)"},"name":{"type":"string","nullable":true,"description":"Program name"},"isValid":{"type":"boolean","nullable":true,"description":"Validation status (null = pending, true = approved, false = rejected)"},"createdAtBlock":{"type":"number","nullable":true,"description":"Block number when created"},"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"},"twitter":{"type":"string"},"discord":{"type":"string"},"github":{"type":"string"},"logoUrl":{"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,"description":"Program metadata"},"updatedAtBlock":{"type":"number","nullable":true,"description":"Block number when updated"},"projectNumber":{"type":"string","nullable":true,"description":"Project number"},"projectType":{"type":"string","nullable":true,"description":"Project type"},"registryAddress":{"type":"string","nullable":true,"description":"Registry contract address"},"anchorAddress":{"type":"string","nullable":true,"description":"Anchor contract address"},"txHash":{"type":"string","nullable":true,"description":"Transaction hash"},"langfusePromptId":{"type":"string","nullable":true,"description":"Langfuse prompt ID"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp"},"approvedAt":{"type":"string","format":"date-time","nullable":true,"description":"Approval timestamp"},"isOnKarma":{"type":"boolean","description":"Whether program is on Karma platform"},"communities":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"imageUrl":{"type":"string"}},"required":["uid"],"additionalProperties":false},"description":"Associated communities"},"type":{"type":"string","description":"Opportunity type (grant, hackathon, bounty, etc.)"},"deadline":{"type":"string","nullable":true,"description":"Program deadline as ISO date string"},"isActive":{"type":"boolean","description":"Whether program is currently active"},"submissionUrl":{"type":"string","nullable":true,"description":"Submission URL"},"source":{"type":"string","nullable":true,"description":"Ingestion source"},"hackathonMetadata":{"type":"object","additionalProperties":{},"nullable":true,"description":"Hackathon-specific metadata"},"bountyMetadata":{"type":"object","additionalProperties":{},"nullable":true,"description":"Bounty-specific metadata"},"acceleratorMetadata":{"type":"object","additionalProperties":{},"nullable":true,"description":"Accelerator-specific metadata"},"vcFundMetadata":{"type":"object","additionalProperties":{},"nullable":true,"description":"VC fund-specific metadata"},"rfpMetadata":{"type":"object","additionalProperties":{},"nullable":true,"description":"RFP-specific metadata"}},"required":["id","programId","chainID","createdByAddress","offChain","createdAt","profileId","name","isValid","createdAtBlock","metadata","updatedAtBlock","projectNumber","projectType","registryAddress","anchorAddress","txHash","langfusePromptId","updatedAt","approvedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"put":{"summary":"Update Program Registry Entry","tags":["Program Registry"],"description":"Update program registry metadata by programId (programId may include chainId suffix for duplicates)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"shortDescription":{"type":"string","maxLength":100},"communityRef":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"socialLinks":{"type":"object","properties":{"grantsSite":{"type":"string"}},"required":["grantsSite"],"additionalProperties":true},"currency":{"type":"string"},"programBudget":{"anyOf":[{"type":"string"},{"type":"number"}]},"startsAt":{"anyOf":[{"type":"string"},{"type":"number"}]},"endsAt":{"anyOf":[{"type":"string"},{"type":"number"}]},"anyoneCanJoin":{"type":"boolean"},"invoiceRequired":{"type":"boolean"},"adminEmails":{"type":"array","items":{"type":"string","format":"email"}},"financeEmails":{"type":"array","items":{"type":"string","format":"email"}}},"required":["title","description"],"additionalProperties":true},"type":{"type":"string","enum":["grant","hackathon","bounty","accelerator","vc_fund","rfp"]},"deadline":{"type":"string","nullable":true},"submissionUrl":{"type":"string","format":"uri","nullable":true},"hackathonMetadata":{"type":"object","properties":{"startDate":{"type":"string"},"endDate":{"type":"string"},"location":{"type":"string"},"tracks":{"type":"array","items":{"type":"string"}},"prizes":{"type":"array","items":{"type":"object","properties":{"track":{"type":"string"},"amount":{"anyOf":[{"type":"string"},{"type":"number"}]},"currency":{"type":"string"}},"required":["amount","currency"],"additionalProperties":true}},"registrationDeadline":{"type":"string"},"submissionDeadline":{"type":"string"},"teamSize":{"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"}},"required":["min","max"],"additionalProperties":false}},"additionalProperties":true,"nullable":true},"bountyMetadata":{"type":"object","properties":{"reward":{"type":"object","properties":{"amount":{"$ref":"#/properties/hackathonMetadata/properties/prizes/items/properties/amount"},"currency":{"type":"string"}},"required":["amount","currency"],"additionalProperties":true},"difficulty":{"type":"string","enum":["beginner","intermediate","advanced"]},"skills":{"type":"array","items":{"type":"string"}},"platform":{"type":"string"}},"additionalProperties":true,"nullable":true},"acceleratorMetadata":{"type":"object","properties":{"applicationDeadline":{"type":"string"},"programDuration":{"type":"number"},"batchSize":{"type":"number"},"equity":{"type":"string"},"funding":{"$ref":"#/properties/bountyMetadata/properties/reward"},"stage":{"type":"string","enum":["pre-seed","seed","series-a"]},"location":{"type":"string"}},"additionalProperties":true,"nullable":true},"vcFundMetadata":{"type":"object","properties":{"checkSize":{"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"},"currency":{"type":"string"}},"required":["min","max","currency"],"additionalProperties":false},"stage":{"type":"string","enum":["pre-seed","seed","series-a","series-b+"]},"thesis":{"type":"string"},"portfolio":{"type":"array","items":{"type":"string"}},"contactMethod":{"type":"string","enum":["email","form","intro-only"]},"activelyInvesting":{"type":"boolean"}},"additionalProperties":true,"nullable":true},"rfpMetadata":{"type":"object","properties":{"issuingOrganization":{"type":"string"},"budget":{"$ref":"#/properties/bountyMetadata/properties/reward"},"scope":{"type":"string"},"requirements":{"type":"array","items":{"type":"string"}}},"additionalProperties":true,"nullable":true}},"required":["metadata"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/program-registry":{"get":{"summary":"Get All Program Registry Entries","tags":["Program Registry"],"description":"Get all program registry entries with optional filters","parameters":[{"in":"query","name":"page","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"limit","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"isValid","required":false,"schema":{"type":"string","enum":["true","false","null"]}},{"in":"query","name":"offChain","required":false,"schema":{"type":"string","enum":["true","false"]}},{"in":"query","name":"chainID","required":false,"schema":{"type":"integer","minimum":1}},{"in":"query","name":"name","required":false,"schema":{"type":"string","maxLength":256}},{"in":"query","name":"networks","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}}]}},{"in":"query","name":"ecosystems","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"in":"query","name":"grantTypes","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"in":"query","name":"type","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"in":"query","name":"sortField","required":false,"schema":{"type":"string","enum":["createdAt","updatedAt","name","programId"],"default":"updatedAt"}},{"in":"query","name":"sortOrder","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"in":"query","name":"owners","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"MongoDB unique identifier"},"programId":{"type":"string","description":"Domain identifier (globally unique)"},"chainID":{"type":"number","nullable":true,"description":"Chain ID (null for off-chain programs)"},"createdByAddress":{"type":"string","description":"Creator wallet address"},"offChain":{"type":"boolean","description":"Program type (true for off-chain, false for on-chain legacy)"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"profileId":{"type":"string","nullable":true,"description":"Profile ID (null for off-chain programs)"},"name":{"type":"string","nullable":true,"description":"Program name"},"isValid":{"type":"boolean","nullable":true,"description":"Validation status (null = pending, true = approved, false = rejected)"},"createdAtBlock":{"type":"number","nullable":true,"description":"Block number when created"},"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"},"twitter":{"type":"string"},"discord":{"type":"string"},"github":{"type":"string"},"logoUrl":{"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,"description":"Program metadata"},"updatedAtBlock":{"type":"number","nullable":true,"description":"Block number when updated"},"projectNumber":{"type":"string","nullable":true,"description":"Project number"},"projectType":{"type":"string","nullable":true,"description":"Project type"},"registryAddress":{"type":"string","nullable":true,"description":"Registry contract address"},"anchorAddress":{"type":"string","nullable":true,"description":"Anchor contract address"},"txHash":{"type":"string","nullable":true,"description":"Transaction hash"},"langfusePromptId":{"type":"string","nullable":true,"description":"Langfuse prompt ID"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp"},"approvedAt":{"type":"string","format":"date-time","nullable":true,"description":"Approval timestamp"},"isOnKarma":{"type":"boolean","description":"Whether program is on Karma platform"},"communities":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"imageUrl":{"type":"string"}},"required":["uid"],"additionalProperties":false},"description":"Associated communities"},"type":{"type":"string","description":"Opportunity type (grant, hackathon, bounty, etc.)"},"deadline":{"type":"string","nullable":true,"description":"Program deadline as ISO date string"},"isActive":{"type":"boolean","description":"Whether program is currently active"},"submissionUrl":{"type":"string","nullable":true,"description":"Submission URL"},"source":{"type":"string","nullable":true,"description":"Ingestion source"},"hackathonMetadata":{"type":"object","additionalProperties":{},"nullable":true,"description":"Hackathon-specific metadata"},"bountyMetadata":{"type":"object","additionalProperties":{},"nullable":true,"description":"Bounty-specific metadata"},"acceleratorMetadata":{"type":"object","additionalProperties":{},"nullable":true,"description":"Accelerator-specific metadata"},"vcFundMetadata":{"type":"object","additionalProperties":{},"nullable":true,"description":"VC fund-specific metadata"},"rfpMetadata":{"type":"object","additionalProperties":{},"nullable":true,"description":"RFP-specific metadata"}},"required":["id","programId","chainID","createdByAddress","offChain","createdAt","profileId","name","isValid","createdAtBlock","metadata","updatedAtBlock","projectNumber","projectType","registryAddress","anchorAddress","txHash","langfusePromptId","updatedAt","approvedAt"],"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"post":{"summary":"Create Program Registry Entry","tags":["Program Registry"],"description":"Create a new program registry entry (off-chain)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"chainID":{"type":"number"},"metadata":{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"shortDescription":{"type":"string","maxLength":100},"communityRef":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"socialLinks":{"type":"object","properties":{"grantsSite":{"type":"string"}},"required":["grantsSite"],"additionalProperties":true},"currency":{"type":"string"},"programBudget":{"anyOf":[{"type":"string"},{"type":"number"}]},"startsAt":{"anyOf":[{"type":"string"},{"type":"number"}]},"endsAt":{"anyOf":[{"type":"string"},{"type":"number"}]},"anyoneCanJoin":{"type":"boolean"},"invoiceRequired":{"type":"boolean"},"adminEmails":{"type":"array","items":{"type":"string","format":"email"},"default":[]},"financeEmails":{"type":"array","items":{"type":"string","format":"email"},"default":[]}},"required":["title","description"],"additionalProperties":true},"type":{"type":"string","enum":["grant","hackathon","bounty","accelerator","vc_fund","rfp"],"default":"grant"},"deadline":{"type":"string"},"submissionUrl":{"type":"string","format":"uri"},"hackathonMetadata":{"type":"object","additionalProperties":{}},"bountyMetadata":{"type":"object","additionalProperties":{}},"acceleratorMetadata":{"type":"object","additionalProperties":{}},"vcFundMetadata":{"type":"object","additionalProperties":{}},"rfpMetadata":{"type":"object","additionalProperties":{}}},"required":["metadata"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/program-registry/pending":{"get":{"summary":"Get Pending Programs","tags":["Program Registry"],"description":"Get pending (unapproved) program registry entries","parameters":[{"in":"query","name":"limit","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"offset","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"MongoDB unique identifier"},"programId":{"type":"string","description":"Domain identifier (globally unique)"},"chainID":{"type":"number","nullable":true,"description":"Chain ID (null for off-chain programs)"},"createdByAddress":{"type":"string","description":"Creator wallet address"},"offChain":{"type":"boolean","description":"Program type (true for off-chain, false for on-chain legacy)"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"profileId":{"type":"string","nullable":true,"description":"Profile ID (null for off-chain programs)"},"name":{"type":"string","nullable":true,"description":"Program name"},"isValid":{"type":"boolean","nullable":true,"description":"Validation status (null = pending, true = approved, false = rejected)"},"createdAtBlock":{"type":"number","nullable":true,"description":"Block number when created"},"metadata":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"ecosystems":{"type":"array","items":{"type":"string"}},"grantTypes":{"type":"array","items":{"type":"string"}},"website":{"type":"string"},"twitter":{"type":"string"},"discord":{"type":"string"},"github":{"type":"string"},"logoUrl":{"type":"string"}},"additionalProperties":false,"description":"Program metadata"},"updatedAtBlock":{"type":"number","nullable":true,"description":"Block number when updated"},"projectNumber":{"type":"string","nullable":true,"description":"Project number"},"projectType":{"type":"string","nullable":true,"description":"Project type"},"registryAddress":{"type":"string","nullable":true,"description":"Registry contract address"},"anchorAddress":{"type":"string","nullable":true,"description":"Anchor contract address"},"txHash":{"type":"string","nullable":true,"description":"Transaction hash"},"langfusePromptId":{"type":"string","nullable":true,"description":"Langfuse prompt ID"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp"},"approvedAt":{"type":"string","format":"date-time","nullable":true,"description":"Approval timestamp"}},"required":["id","programId","chainID","createdByAddress","offChain","createdAt","profileId","name","isValid","createdAtBlock","metadata","updatedAtBlock","projectNumber","projectType","registryAddress","anchorAddress","txHash","langfusePromptId","updatedAt","approvedAt"],"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/program-registry/approve":{"post":{"summary":"Approve/Reject Program Registry Entry","tags":["Program Registry"],"description":"Approve or reject a program registry entry using programId (programId may include chainId suffix for duplicates)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"programId":{"type":"string","minLength":1},"isValid":{"type":"string","enum":["accepted","rejected","pending"]}},"required":["programId","isValid"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/search":{"get":{"summary":"Unified Search","tags":["Search"],"description":"Search across projects and communities. Returns matching projects and communities based on the query string. Searches by title/name, slug, and description.","parameters":[{"in":"query","name":"q","required":true,"schema":{"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."},{"in":"query","name":"limit","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]},"description":"Maximum number of results to return per type (1-50, default: 10)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/user/communities/admin":{"get":{"summary":"Get Admin Communities","tags":["User"],"description":"Get communities where the authenticated user is an admin. Requires authentication.","responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/user/projects":{"get":{"summary":"Get User Projects","tags":["User"],"description":"Get projects owned by or where the authenticated user is a member. Requires authentication.","parameters":[{"in":"query","name":"page","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"limit","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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","description":"Legacy per-grant amount carried over from the original attestation. The Karma UI still displays this on the individual grant overview page for context. NOT the authoritative figure for program funding totals and NOT kept in sync with the disbursement/control-center flow. Do NOT sum this across grants — use GET /v2/programs/{programId}/financials for accurate program-level totals."},"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":"Legacy per-grant amount stored on the attestation when the grant was created. NOT updated by the current disbursement/control-center flow and NOT the authoritative source for funding totals. Do NOT sum this field across grants to compute program funding — use GET /v2/programs/{programId}/financials instead, which is what the Karma UI displays."},"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"},"attester":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/user/profiles":{"get":{"summary":"Get User Profiles by Addresses","tags":["User"],"description":"Get user profiles (name, email) for a batch of wallet addresses. Returns only profiles that exist.","parameters":[{"in":"query","name":"addresses","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/user/profiles/public":{"get":{"summary":"Get Public User Profiles by Addresses","tags":["User"],"description":"Get public user profiles (name, email, picture) for a batch of wallet addresses (max 20). Profiles are lazily synced from Privy when missing or stale. Requires authentication. No admin permission required.","parameters":[{"in":"query","name":"addresses","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"publicAddress":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Wallet address"},"name":{"type":"string","maxLength":256,"description":"Display name"},"email":{"type":"string","maxLength":254,"description":"Email address (may be absent)"},"picture":{"type":"string","maxLength":2048,"description":"Profile picture URL (may be absent)"}},"required":["publicAddress","name"],"additionalProperties":false},"maxItems":20}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/user/resolve-email":{"post":{"summary":"Resolve Email to Wallet Address","tags":["User"],"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.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"name":{"type":"string","minLength":1}},"required":["email"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/tracks":{"get":{"summary":"List Tracks","tags":["Tracks"],"description":"Get all tracks for a community. Optionally include archived tracks.","parameters":[{"in":"query","name":"communityUID","required":true,"schema":{"type":"string","minLength":1}},{"in":"query","name":"includeArchived","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"post":{"summary":"Create Track","tags":["Tracks"],"description":"Create a new track for a community. Requires authentication.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"communityUID":{"type":"string","minLength":1}},"required":["name","communityUID"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/tracks/{id}":{"get":{"summary":"Get Track by ID","tags":["Tracks"],"description":"Get a track by its ID.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"put":{"summary":"Update Track","tags":["Tracks"],"description":"Update a track. Requires authentication.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"}},"additionalProperties":false}}}},"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"delete":{"summary":"Archive Track","tags":["Tracks"],"description":"Archive (soft delete) a track. Requires authentication.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/programs/{programId}/tracks":{"get":{"summary":"Get Program Tracks","tags":["Tracks"],"description":"Get all tracks assigned to a program.","parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"post":{"summary":"Assign Tracks to Program","tags":["Tracks"],"description":"Assign tracks to a program. Requires authentication.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"trackIds":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["trackIds"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response"}}}},"/v2/programs/{programId}/tracks/{trackId}":{"delete":{"summary":"Unassign Track from Program","tags":["Tracks"],"description":"Remove a track from a program. Requires authentication.","parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}},{"in":"path","name":"trackId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response"}}}},"/v2/projects/{projectId}/programs/{programId}/tracks":{"get":{"summary":"Get Project Tracks","tags":["Tracks"],"description":"Get tracks assigned to a project for a specific program.","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"type":"string","minLength":1}},{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/projects/{projectId}/tracks":{"post":{"summary":"Assign Tracks to Project","tags":["Tracks"],"description":"Assign tracks to a project for a specific program. Requires authentication.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"programId":{"type":"string","minLength":1},"trackIds":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["programId","trackIds"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"projectId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response"}}}},"/v2/programs/{programId}/projects/{projectId}/tracks":{"delete":{"summary":"Unassign Tracks from Project","tags":["Tracks"],"description":"Remove tracks from a project for a specific program. Requires authentication.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"trackIds":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["trackIds"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}},{"in":"path","name":"projectId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response"}}}},"/v2/communities/{communityId}/programs/{programId}/projects":{"get":{"summary":"Get Projects by Track","tags":["Tracks"],"description":"Get projects by track for a community and program. Optionally filter by track ID.","parameters":[{"in":"query","name":"trackId","required":false,"schema":{"type":"string"}},{"in":"path","name":"communityId","required":true,"schema":{"type":"string","minLength":1}},{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/registry/":{"get":{"summary":"Search Registry Programs","tags":["Registry"],"description":"Search and list registry programs (funding map). Supports filtering by status, categories, ecosystems, networks, grant types, and more.","parameters":[{"in":"query","name":"page","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]},"description":"Page number (default: 1)"},{"in":"query","name":"limit","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]},"description":"Number of results per page (1-100, default: 12)"},{"in":"query","name":"name","required":false,"schema":{"type":"string"},"description":"Search by program name/title"},{"in":"query","name":"isValid","required":false,"schema":{"type":"string","enum":["accepted","rejected","pending","all"],"default":"accepted"},"description":"Filter by validity status (default: accepted)"},{"in":"query","name":"status","required":false,"schema":{"type":"string","enum":["active","inactive"]},"description":"Filter by program status based on dates"},{"in":"query","name":"categories","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"description":"Filter by categories (comma-separated)"},{"in":"query","name":"ecosystems","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"description":"Filter by ecosystems (comma-separated)"},{"in":"query","name":"networks","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"description":"Filter by networks (comma-separated)"},{"in":"query","name":"grantTypes","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"description":"Filter by grant types (comma-separated)"},{"in":"query","name":"communities","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"description":"Filter by communities (comma-separated)"},{"in":"query","name":"minGrantSize","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]},"description":"Minimum grant size"},{"in":"query","name":"maxGrantSize","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]},"description":"Maximum grant size"},{"in":"query","name":"sortField","required":false,"schema":{"type":"string","enum":["createdAt","updatedAt","startsAt","endsAt","name"],"default":"updatedAt"},"description":"Field to sort by (default: updatedAt)"},{"in":"query","name":"sortOrder","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Sort order (default: desc)"},{"in":"query","name":"onlyOnKarma","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"boolean"}]},"description":"Filter to only show programs that are on Karma (have a funding config)"},{"in":"query","name":"communityUid","required":false,"schema":{"type":"string"},"description":"Filter by community UID (from communityRef)"},{"in":"query","name":"organization","required":false,"schema":{"type":"string"},"description":"Filter by organization name (from metadata.organizations)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/registry/filters":{"get":{"summary":"Get Organization Filters","tags":["Registry"],"description":"Get available organization/community filters for the funding map. Returns a list of communities and organizations that have programs, sorted by program count.","responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/registry/{programId}/{chainId}":{"get":{"summary":"Get Registry Program by ID","tags":["Registry"],"description":"Get a single registry program by program ID and chain ID","parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}},{"in":"path","name":"chainId","required":true,"schema":{"allOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"integer","minimum":1}]}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-opportunities":{"get":{"summary":"List Funding Opportunities","tags":["Funding Opportunities"],"description":"List funding opportunities from grants.gov with optional filters. Supports full-text search, status, date range, award amount, and array containment filters.","parameters":[{"in":"query","name":"page","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"limit","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"status","required":false,"schema":{"type":"string","maxLength":200}},{"in":"query","name":"categories","required":false,"schema":{"type":"string","maxLength":500}},{"in":"query","name":"eligibility","required":false,"schema":{"type":"string","maxLength":500}},{"in":"query","name":"fundingInstruments","required":false,"schema":{"type":"string","maxLength":500}},{"in":"query","name":"issuingOrgCode","required":false,"schema":{"type":"string","maxLength":50}},{"in":"query","name":"topLevelOrgCode","required":false,"schema":{"type":"string","maxLength":50}},{"in":"query","name":"closeDateFrom","required":false,"schema":{"type":"string","maxLength":30}},{"in":"query","name":"closeDateTo","required":false,"schema":{"type":"string","maxLength":30}},{"in":"query","name":"awardCeilingMin","required":false,"schema":{"type":"number","minimum":0}},{"in":"query","name":"awardCeilingMax","required":false,"schema":{"type":"number","minimum":0}},{"in":"query","name":"search","required":false,"schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Internal database UUID"},"externalId":{"type":"string","maxLength":200,"description":"Source-system identifier (grants.gov opportunity UUID)"},"opportunityNumber":{"type":"string","maxLength":100,"nullable":true,"description":"Human-readable opportunity number"},"title":{"type":"string","maxLength":500,"description":"Opportunity title"},"status":{"type":"string","maxLength":50,"description":"Current status (posted | forecasted | closed | archived)"},"issuingOrgName":{"type":"string","maxLength":300,"nullable":true,"description":"Issuing agency name"},"issuingOrgCode":{"type":"string","maxLength":50,"nullable":true,"description":"Issuing agency code"},"topLevelOrgName":{"type":"string","maxLength":300,"nullable":true,"description":"Top-level agency name"},"topLevelOrgCode":{"type":"string","maxLength":50,"nullable":true,"description":"Top-level agency code"},"categories":{"type":"array","items":{"type":"string","maxLength":100},"maxItems":50,"description":"Funding categories"},"eligibility":{"type":"array","items":{"type":"string","maxLength":100},"maxItems":20,"description":"Eligible applicant types"},"fundingInstruments":{"type":"array","items":{"type":"string","maxLength":100},"maxItems":20,"description":"Funding instruments"},"openDate":{"type":"string","format":"date-time","nullable":true,"description":"Application open date (ISO 8601)"},"closeDate":{"type":"string","format":"date-time","nullable":true,"description":"Application close date (ISO 8601)"},"awardFloor":{"type":"number","nullable":true,"description":"Minimum award amount (USD)"},"awardCeiling":{"type":"number","nullable":true,"description":"Maximum award amount (USD)"},"totalFundingAvailable":{"type":"number","nullable":true,"description":"Total funding pool (USD)"},"externalUrl":{"type":"string","maxLength":2048,"nullable":true,"description":"Link to the opportunity on the source system"},"isActive":{"type":"boolean","description":"Whether the record is currently active"},"isForecast":{"type":"boolean","description":"Whether this is a forecast (pre-announcement)"},"sourceId":{"type":"string","maxLength":50,"description":"Source system identifier (grants_gov)"}},"required":["id","externalId","opportunityNumber","title","status","issuingOrgName","issuingOrgCode","topLevelOrgName","topLevelOrgCode","categories","eligibility","fundingInstruments","openDate","closeDate","awardFloor","awardCeiling","totalFundingAvailable","externalUrl","isActive","isForecast","sourceId"],"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-opportunities/{id}":{"get":{"summary":"Get Funding Opportunity by ID","tags":["Funding Opportunities"],"description":"Get a single funding opportunity by id. Accepts either the grants.gov external UUID or the internal database UUID.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"},"description":"Opportunity id — either the grants.gov external UUID or the internal database UUID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Internal database UUID"},"sourceId":{"type":"string","description":"Source system identifier (grants_gov)"},"externalId":{"type":"string","description":"Source-system opportunity identifier"},"legacyExternalId":{"type":"number","nullable":true,"description":"Legacy numeric opportunity ID"},"opportunityNumber":{"type":"string","nullable":true,"description":"Human-readable opportunity number"},"externalUrl":{"type":"string","nullable":true,"description":"Canonical URL on the source system"},"organizationId":{"type":"string","nullable":true,"description":"Internal organization UUID"},"issuingOrgName":{"type":"string","nullable":true,"description":"Issuing agency name"},"issuingOrgCode":{"type":"string","nullable":true,"description":"Issuing agency code"},"topLevelOrgName":{"type":"string","nullable":true,"description":"Top-level department/agency name"},"topLevelOrgCode":{"type":"string","nullable":true,"description":"Top-level department/agency code"},"title":{"type":"string","maxLength":500,"description":"Opportunity title"},"description":{"type":"string","maxLength":20000,"nullable":true,"description":"Full opportunity description"},"status":{"type":"string","maxLength":50,"description":"Current status (posted | forecasted | closed | archived)"},"opportunityCategory":{"type":"string","maxLength":100,"nullable":true,"description":"Category: discretionary | mandatory | continuation | earmark | other"},"isForecast":{"type":"boolean","description":"Whether this is a forecast (pre-announcement)"},"isActive":{"type":"boolean","description":"Whether the record is currently active"},"categories":{"type":"array","items":{"type":"string","maxLength":100},"maxItems":50,"description":"Funding categories"},"eligibility":{"type":"array","items":{"type":"string","maxLength":100},"maxItems":20,"description":"Eligible applicant types"},"fundingInstruments":{"type":"array","items":{"type":"string","maxLength":100},"maxItems":20,"description":"Funding instruments"},"assistanceListings":{"type":"array","items":{"type":"string","maxLength":50},"maxItems":10,"description":"ALN/CFDA numbers, e.g. [\"93.217\"]"},"openDate":{"type":"string","format":"date-time","nullable":true,"description":"Application open date"},"closeDate":{"type":"string","format":"date-time","nullable":true,"description":"Application close date"},"archiveDate":{"type":"string","format":"date-time","nullable":true,"description":"Archive date"},"currency":{"type":"string","nullable":true,"description":"Currency code (typically USD)"},"awardFloor":{"type":"number","nullable":true,"description":"Minimum award amount"},"awardCeiling":{"type":"number","nullable":true,"description":"Maximum award amount"},"totalFundingAvailable":{"type":"number","nullable":true,"description":"Total funding pool"},"expectedAwards":{"type":"number","nullable":true,"description":"Expected number of awards"},"isCostSharing":{"type":"boolean","nullable":true,"description":"Whether cost sharing is required"},"fiscalYear":{"type":"number","nullable":true,"description":"Fiscal year"},"metadata":{"type":"object","additionalProperties":{},"description":"Source-specific overflow fields (JSONB)"},"sourceUpdatedAt":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp from the source system"},"detailFetchedAt":{"type":"string","format":"date-time","nullable":true,"description":"When we last fetched the detail endpoint"},"ingestedAt":{"type":"string","format":"date-time","description":"When we first ingested this record"},"createdAt":{"type":"string","format":"date-time","description":"Database creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Database last-update timestamp"}},"required":["id","sourceId","externalId","legacyExternalId","opportunityNumber","externalUrl","organizationId","issuingOrgName","issuingOrgCode","topLevelOrgName","topLevelOrgCode","title","description","status","opportunityCategory","isForecast","isActive","categories","eligibility","fundingInstruments","assistanceListings","openDate","closeDate","archiveDate","currency","awardFloor","awardCeiling","totalFundingAvailable","expectedAwards","isCostSharing","fiscalYear","metadata","sourceUpdatedAt","detailFetchedAt","ingestedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/philanthropy/agent-query":{"post":{"summary":"Agentic Philanthropy Query","tags":["Philanthropy"],"description":"Agentic philanthropy search that plans bounded registry tool calls, executes them through the headless tool boundary, and returns public-safe evidence.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":4000},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string","maxLength":20000}},"required":["role","content"],"additionalProperties":false},"maxItems":40},"includeNarrative":{"type":"boolean"},"includePlan":{"type":"boolean"},"includeEvidence":{"type":"boolean"},"page":{"anyOf":[{"type":"string"},{"type":"number"}]},"limit":{"anyOf":[{"type":"string"},{"type":"number"}]},"options":{"type":"object","properties":{"dateScope":{"type":"object","properties":{"basis":{"type":"string","enum":["filing_year","tax_period_end_year","action_date_year","return_timestamp_year"]},"year":{"type":"integer","minimum":1900,"maximum":2100},"from":{"type":"string"},"to":{"type":"string"}},"additionalProperties":false},"entityResolution":{"type":"object","properties":{"matchMode":{"type":"string","enum":["exact","alias","related"]},"rollupAffiliates":{"type":"boolean"}},"additionalProperties":false},"aggregation":{"type":"object","properties":{"mode":{"type":"string","enum":["none","sum","count","group_by_grantor","group_by_recipient","trend"]}},"additionalProperties":false},"explain":{"type":"boolean"}},"additionalProperties":false}},"required":["message"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"answer":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"plan":{"type":"object","properties":{"objective":{"type":"string"},"assumptions":{"type":"array","items":{"type":"string"}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tool":{"type":"string"},"args":{"type":"object","additionalProperties":{}},"dependsOn":{"type":"array","items":{"type":"string"}},"outputAlias":{"type":"string"},"rationale":{"type":"string"}},"required":["id","tool","args","outputAlias","rationale"],"additionalProperties":false}}},"required":["objective","assumptions","steps"],"additionalProperties":false,"nullable":true},"evidence":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"sourceId":{"type":"string"},"stepId":{"type":"string"},"alias":{"type":"string"},"tool":{"type":"string"},"summary":{"type":"string"},"data":{},"identifiers":{"type":"object","additionalProperties":{}}},"required":["id","stepId","alias","tool"],"additionalProperties":false}},"citations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"title":{"type":"string"},"sourceUrl":{"type":"string"},"excerpt":{"type":"string"}},"required":["id"],"additionalProperties":false}},"traceId":{"type":"string","nullable":true},"execution":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":0},"durationMs":{"type":"number","minimum":0},"partial":{"type":"boolean"},"stoppedReason":{"type":"string","nullable":true}},"required":["toolCalls","durationMs","partial","stoppedReason"],"additionalProperties":false},"entities":{"type":"array","items":{}},"assumptions":{"type":"object","properties":{"dateBasis":{"type":"string","nullable":true},"matchedEntityIds":{"type":"array","items":{"type":"string"}},"matchedEntityNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"attachments":{"type":"array","items":{"type":"object","properties":{"handle":{"type":"string"},"filename":{"type":"string"},"contentType":{"type":"string"},"base64":{"type":"string"},"rowCount":{"type":"integer","minimum":0}},"required":["handle","filename","contentType","base64","rowCount"],"additionalProperties":false}}},"required":["answer","summary","plan","evidence","citations","traceId","execution","entities","assumptions","attachments"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/philanthropy/agent-query/stream":{"post":{"summary":"Agentic Philanthropy Query (stream)","tags":["Philanthropy"],"description":"Streaming variant of /v2/philanthropy/agent-query. Emits interpreted query, matched entity, assumption, step progress, evidence progress, and final answer events.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":4000},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string","maxLength":20000}},"required":["role","content"],"additionalProperties":false},"maxItems":40},"includeNarrative":{"type":"boolean"},"includePlan":{"type":"boolean"},"includeEvidence":{"type":"boolean"},"page":{"anyOf":[{"type":"string"},{"type":"number"}]},"limit":{"anyOf":[{"type":"string"},{"type":"number"}]},"options":{"type":"object","properties":{"dateScope":{"type":"object","properties":{"basis":{"type":"string","enum":["filing_year","tax_period_end_year","action_date_year","return_timestamp_year"]},"year":{"type":"integer","minimum":1900,"maximum":2100},"from":{"type":"string"},"to":{"type":"string"}},"additionalProperties":false},"entityResolution":{"type":"object","properties":{"matchMode":{"type":"string","enum":["exact","alias","related"]},"rollupAffiliates":{"type":"boolean"}},"additionalProperties":false},"aggregation":{"type":"object","properties":{"mode":{"type":"string","enum":["none","sum","count","group_by_grantor","group_by_recipient","trend"]}},"additionalProperties":false},"explain":{"type":"boolean"}},"additionalProperties":false}},"required":["message"],"additionalProperties":false}}},"required":true},"responses":{"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/philanthropy/foundations/{id}":{"get":{"summary":"Get Foundation by ID","tags":["Philanthropy"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"ein":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"totalAssets":{"type":"number","nullable":true},"location":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","ein","name","description","totalAssets","location","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/philanthropy/foundations/{id}/grants":{"get":{"summary":"List Foundation Grants","tags":["Philanthropy"],"description":"Returns grants made by a foundation. Accepts optional `sortBy` (`amount`, `filingYear`, `actionDate`) and `sortOrder` (`asc`, `desc`) query params. Defaults to `actionDate desc`.","parameters":[{"in":"query","name":"sortBy","required":false,"schema":{"type":"string","enum":["amount","filingYear","actionDate"]}},{"in":"query","name":"sortOrder","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filingId":{"type":"string"},"foundationId":{"type":"string"},"nonprofitId":{"type":"string","nullable":true},"recipientName":{"type":"string","nullable":true},"amount":{"type":"number","nullable":true},"date":{"type":"string","nullable":true},"purposeText":{"type":"string","nullable":true},"filingYear":{"type":"number"},"sourceRowHash":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","filingId","foundationId","nonprofitId","amount","date","purposeText","filingYear","sourceRowHash","createdAt","updatedAt"],"additionalProperties":false},"maxItems":500}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/philanthropy/foundations/{id}/officers":{"get":{"summary":"List Foundation Officers","tags":["Philanthropy"],"description":"Returns officers/directors for a foundation. Accepts optional `sortBy` (`name`, `filingYear`, `compensation`, `benefits`) and `sortOrder` (`asc`, `desc`). Default: `filingYear desc, name asc`.","parameters":[{"in":"query","name":"sortBy","required":false,"schema":{"type":"string","enum":["name","filingYear","compensation","benefits"]}},{"in":"query","name":"sortOrder","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"foundationId":{"type":"string"},"name":{"type":"string"},"title":{"type":"string","nullable":true},"compensation":{"type":"number","nullable":true},"benefits":{"type":"number","nullable":true},"expenseAccount":{"type":"number","nullable":true},"filingYear":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","foundationId","name","title","compensation","benefits","expenseAccount","filingYear","createdAt","updatedAt"],"additionalProperties":false},"maxItems":500}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/philanthropy/foundations/{id}/financials":{"get":{"summary":"List Foundation Financial Snapshots","tags":["Philanthropy"],"description":"Returns annual financial snapshots for a foundation. Accepts optional `sortBy` (`filingYear`, `totalRevenue`, `totalExpenses`, `totalAssets`, `netAssets`, `qualifyingDistributions`) and `sortOrder` (`asc`, `desc`). Default: `filingYear desc`.","parameters":[{"in":"query","name":"sortBy","required":false,"schema":{"type":"string","enum":["filingYear","totalRevenue","totalExpenses","totalAssets","netAssets","qualifyingDistributions"]}},{"in":"query","name":"sortOrder","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"foundationId":{"type":"string"},"filingYear":{"type":"number"},"totalRevenue":{"type":"number","nullable":true},"totalExpenses":{"type":"number","nullable":true},"totalAssets":{"type":"number","nullable":true},"netAssets":{"type":"number","nullable":true},"minimumInvestmentReturn":{"type":"number","nullable":true},"distributableAmount":{"type":"number","nullable":true},"qualifyingDistributions":{"type":"number","nullable":true},"undistributedIncome":{"type":"number","nullable":true},"excessDistributions":{"type":"number","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","foundationId","filingYear","totalRevenue","totalExpenses","totalAssets","netAssets","minimumInvestmentReturn","distributableAmount","qualifyingDistributions","undistributedIncome","excessDistributions","createdAt","updatedAt"],"additionalProperties":false},"maxItems":500}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/philanthropy/foundations/{id}/filings/{year}":{"get":{"summary":"Get Foundation IRS Filing by Year","tags":["Philanthropy"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"in":"path","name":"year","required":true,"schema":{"type":"integer","minimum":1900,"maximum":2100}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"foundationId":{"type":"string"},"filingYear":{"type":"number"},"ein":{"type":"string"},"formType":{"type":"string","nullable":true},"taxPeriod":{"type":"string","nullable":true},"returnTimestamp":{"type":"string","nullable":true},"objectId":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","foundationId","filingYear","ein","formType","taxPeriod","returnTimestamp","objectId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/philanthropy/nonprofits/{id}":{"get":{"summary":"Get Nonprofit by ID","tags":["Philanthropy"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"ein":{"type":"string","nullable":true},"name":{"type":"string"},"description":{"type":"string","nullable":true},"location":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","ein","name","description","location","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/philanthropy/nonprofits/{id}/grants":{"get":{"summary":"List Nonprofit Grants","tags":["Philanthropy"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filingId":{"type":"string"},"foundationId":{"type":"string"},"nonprofitId":{"type":"string","nullable":true},"recipientName":{"type":"string","nullable":true},"amount":{"type":"number","nullable":true},"date":{"type":"string","nullable":true},"purposeText":{"type":"string","nullable":true},"filingYear":{"type":"number"},"sourceRowHash":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","filingId","foundationId","nonprofitId","amount","date","purposeText","filingYear","sourceRowHash","createdAt","updatedAt"],"additionalProperties":false},"maxItems":500}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/philanthropy/grants/{id}":{"get":{"summary":"Get Grant by ID","tags":["Philanthropy"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"filingId":{"type":"string"},"foundationId":{"type":"string"},"nonprofitId":{"type":"string","nullable":true},"recipientName":{"type":"string","nullable":true},"amount":{"type":"number","nullable":true},"date":{"type":"string","nullable":true},"purposeText":{"type":"string","nullable":true},"filingYear":{"type":"number"},"sourceRowHash":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","filingId","foundationId","nonprofitId","amount","date","purposeText","filingYear","sourceRowHash","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/search-history/":{"get":{"summary":"List Search History","tags":["Search History"],"description":"Get search history for the authenticated user","parameters":[{"in":"query","name":"limit","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":20}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"query":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","userId","query","createdAt"],"additionalProperties":false}}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"post":{"summary":"Create Search History Entry","tags":["Search History"],"description":"Add a search query to history","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":500}},"required":["query"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"query":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","userId","query","createdAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"delete":{"summary":"Clear Search History","tags":["Search History"],"description":"Delete all search history for the authenticated user","responses":{"204":{"description":"All history deleted successfully"},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/search-history/{id}":{"get":{"summary":"Get Search History Entry","tags":["Search History"],"description":"Get a single search history entry by ID","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"query":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","userId","query","createdAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"delete":{"summary":"Delete Search History Entry","tags":["Search History"],"description":"Delete a single search history entry","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"204":{"description":"Entry deleted successfully"},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/research-tray/":{"get":{"summary":"List Research Tray","tags":["Research Tray"],"description":"Get all bookmarked items for the authenticated user","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"entityType":{"type":"string"},"entityId":{"type":"string"},"name":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":{},"nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","userId","entityType","entityId","name","metadata","createdAt"],"additionalProperties":false}}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"post":{"summary":"Add to Research Tray","tags":["Research Tray"],"description":"Add an entity to the research tray (bookmarks)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entityType":{"type":"string","minLength":1,"maxLength":100},"entityId":{"type":"string","minLength":1,"maxLength":500},"name":{"type":"string","maxLength":500},"metadata":{"type":"object","additionalProperties":{}}},"required":["entityType","entityId"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"entityType":{"type":"string"},"entityId":{"type":"string"},"name":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":{},"nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","userId","entityType","entityId","name","metadata","createdAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"delete":{"summary":"Clear Research Tray","tags":["Research Tray"],"description":"Clear the entire research tray for the authenticated user","responses":{"204":{"description":"All research tray items cleared successfully"},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/research-tray/{id}":{"delete":{"summary":"Remove Research Tray Item","tags":["Research Tray"],"description":"Remove a single item from the research tray","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"204":{"description":"Item removed successfully"},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/evaluate/sessions/":{"get":{"summary":"List my evaluation sessions","tags":["Evaluator"],"parameters":[{"in":"query","name":"limit","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"offset","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"programDescription":{"type":"string"},"evaluationCriteria":{"type":"string"},"evaluationStyle":{"type":"string","enum":["RUBRIC","NARRATIVE","QUICK_SCORE"]},"basePrompt":{"type":"string"},"currentPrompt":{"type":"string"},"feedbackHistory":{"type":"array","items":{"type":"string"}},"sampleApplication":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","ITERATING","READY_FOR_BULK","COMPLETED"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","userId","programDescription","evaluationCriteria","evaluationStyle","basePrompt","currentPrompt","feedbackHistory","sampleApplication","status","createdAt","updatedAt"],"additionalProperties":false}},"total":{"type":"integer","minimum":0}},"required":["items","total"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"post":{"summary":"Create an evaluation session","tags":["Evaluator"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"programDescription":{"type":"string","minLength":1,"maxLength":5000},"evaluationCriteria":{"type":"string","minLength":1,"maxLength":10000},"evaluationStyle":{"type":"string","enum":["RUBRIC","NARRATIVE","QUICK_SCORE"]}},"required":["programDescription","evaluationCriteria","evaluationStyle"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"programDescription":{"type":"string"},"evaluationCriteria":{"type":"string"},"evaluationStyle":{"type":"string","enum":["RUBRIC","NARRATIVE","QUICK_SCORE"]},"basePrompt":{"type":"string"},"currentPrompt":{"type":"string"},"feedbackHistory":{"type":"array","items":{"type":"string"}},"sampleApplication":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","ITERATING","READY_FOR_BULK","COMPLETED"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","userId","programDescription","evaluationCriteria","evaluationStyle","basePrompt","currentPrompt","feedbackHistory","sampleApplication","status","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/evaluate/sessions/{id}":{"get":{"summary":"Get a single evaluation session","tags":["Evaluator"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"programDescription":{"type":"string"},"evaluationCriteria":{"type":"string"},"evaluationStyle":{"type":"string","enum":["RUBRIC","NARRATIVE","QUICK_SCORE"]},"basePrompt":{"type":"string"},"currentPrompt":{"type":"string"},"feedbackHistory":{"type":"array","items":{"type":"string"}},"sampleApplication":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","ITERATING","READY_FOR_BULK","COMPLETED"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","userId","programDescription","evaluationCriteria","evaluationStyle","basePrompt","currentPrompt","feedbackHistory","sampleApplication","status","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"delete":{"summary":"Delete an evaluation session","tags":["Evaluator"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"204":{"description":"Session deleted"},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/evaluate/sessions/{id}/results":{"get":{"summary":"List session evaluation results","tags":["Standalone Evaluation"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sessionId":{"type":"string"},"applicationText":{"type":"string"},"score":{"type":"number","nullable":true},"summary":{"type":"string","nullable":true},"fullEvaluation":{"type":"object","additionalProperties":{}},"iterationNumber":{"type":"integer","minimum":0},"model":{"type":"string"},"tokenUsage":{"type":"object","properties":{"promptTokens":{"type":"integer","minimum":0},"completionTokens":{"type":"integer","minimum":0}},"required":["promptTokens","completionTokens"],"additionalProperties":false,"nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","sessionId","applicationText","score","summary","fullEvaluation","iterationNumber","model","tokenUsage","createdAt"],"additionalProperties":false}}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/evaluate/sessions/{id}/evaluate":{"post":{"summary":"Run a single evaluation (deducts 1 credit)","tags":["Evaluator"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"applicationText":{"type":"string","minLength":1,"maxLength":50000}},"required":["applicationText"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"sessionId":{"type":"string"},"applicationText":{"type":"string"},"score":{"type":"number","nullable":true},"summary":{"type":"string","nullable":true},"fullEvaluation":{"type":"object","additionalProperties":{}},"iterationNumber":{"type":"integer","minimum":0},"model":{"type":"string"},"tokenUsage":{"type":"object","properties":{"promptTokens":{"type":"integer","minimum":0},"completionTokens":{"type":"integer","minimum":0}},"required":["promptTokens","completionTokens"],"additionalProperties":false,"nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","sessionId","applicationText","score","summary","fullEvaluation","iterationNumber","model","tokenUsage","createdAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/evaluate/sessions/{id}/feedback":{"post":{"summary":"Append feedback to a session and re-evaluate (deducts 1 credit)","tags":["Evaluator"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"feedback":{"type":"string","minLength":1,"maxLength":2000}},"required":["feedback"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"sessionId":{"type":"string"},"applicationText":{"type":"string"},"score":{"type":"number","nullable":true},"summary":{"type":"string","nullable":true},"fullEvaluation":{"type":"object","additionalProperties":{}},"iterationNumber":{"type":"integer","minimum":0},"model":{"type":"string"},"tokenUsage":{"type":"object","properties":{"promptTokens":{"type":"integer","minimum":0},"completionTokens":{"type":"integer","minimum":0}},"required":["promptTokens","completionTokens"],"additionalProperties":false,"nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","sessionId","applicationText","score","summary","fullEvaluation","iterationNumber","model","tokenUsage","createdAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/evaluate/sessions/{id}/sample":{"post":{"summary":"Set the sample application text on a session","tags":["Evaluator"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sampleApplication":{"type":"string","minLength":1,"maxLength":50000}},"required":["sampleApplication"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"programDescription":{"type":"string"},"evaluationCriteria":{"type":"string"},"evaluationStyle":{"type":"string","enum":["RUBRIC","NARRATIVE","QUICK_SCORE"]},"basePrompt":{"type":"string"},"currentPrompt":{"type":"string"},"feedbackHistory":{"type":"array","items":{"type":"string"}},"sampleApplication":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","ITERATING","READY_FOR_BULK","COMPLETED"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","userId","programDescription","evaluationCriteria","evaluationStyle","basePrompt","currentPrompt","feedbackHistory","sampleApplication","status","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/evaluate/sessions/{id}/prompt":{"patch":{"summary":"Replace the assembled system prompt baseline. Resets feedbackHistory.","tags":["Evaluator"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":20,"maxLength":50000}},"required":["prompt"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"programDescription":{"type":"string"},"evaluationCriteria":{"type":"string"},"evaluationStyle":{"type":"string","enum":["RUBRIC","NARRATIVE","QUICK_SCORE"]},"basePrompt":{"type":"string"},"currentPrompt":{"type":"string"},"feedbackHistory":{"type":"array","items":{"type":"string"}},"sampleApplication":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","ITERATING","READY_FOR_BULK","COMPLETED"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","userId","programDescription","evaluationCriteria","evaluationStyle","basePrompt","currentPrompt","feedbackHistory","sampleApplication","status","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/evaluate/sessions/{id}/ready-for-bulk":{"post":{"summary":"Mark a session as ready for bulk evaluation","tags":["Evaluator"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"programDescription":{"type":"string"},"evaluationCriteria":{"type":"string"},"evaluationStyle":{"type":"string","enum":["RUBRIC","NARRATIVE","QUICK_SCORE"]},"basePrompt":{"type":"string"},"currentPrompt":{"type":"string"},"feedbackHistory":{"type":"array","items":{"type":"string"}},"sampleApplication":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","ITERATING","READY_FOR_BULK","COMPLETED"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","userId","programDescription","evaluationCriteria","evaluationStyle","basePrompt","currentPrompt","feedbackHistory","sampleApplication","status","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/evaluate/sessions/{id}/bulk":{"post":{"summary":"Start a bulk evaluation job for a session (CSV body, max 10MB)","tags":["Evaluator"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"csvContent":{"type":"string","minLength":1,"maxLength":10485760},"notificationEmail":{"type":"string","format":"email","maxLength":254}},"required":["csvContent"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"sessionId":{"type":"string"},"userId":{"type":"string"},"status":{"type":"string","enum":["PENDING","RUNNING","COMPLETED","FAILED"]},"totalApplications":{"type":"integer","minimum":0},"completedApplications":{"type":"integer","minimum":0},"failedApplications":{"type":"integer","minimum":0},"hasResult":{"type":"boolean"},"emailSentAt":{"type":"string","format":"date-time","nullable":true},"startedAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","sessionId","userId","status","totalApplications","completedApplications","failedApplications","hasResult","emailSentAt","startedAt","completedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/evaluate/sessions/{id}/bulks":{"get":{"summary":"List all bulk evaluation jobs for a session","tags":["Evaluator"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Array of bulk-job summaries newest-first","content":{"application/json":{"schema":{"description":"Array of bulk-job summaries newest-first","type":"array","items":{}}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/evaluate/sessions/{id}/bulk/{jobId}":{"get":{"summary":"Get the status of a bulk evaluation job","tags":["Evaluator"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"in":"path","name":"jobId","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"sessionId":{"type":"string"},"userId":{"type":"string"},"status":{"type":"string","enum":["PENDING","RUNNING","COMPLETED","FAILED"]},"totalApplications":{"type":"integer","minimum":0},"completedApplications":{"type":"integer","minimum":0},"failedApplications":{"type":"integer","minimum":0},"hasResult":{"type":"boolean"},"emailSentAt":{"type":"string","format":"date-time","nullable":true},"startedAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","sessionId","userId","status","totalApplications","completedApplications","failedApplications","hasResult","emailSentAt","startedAt","completedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/evaluate/sessions/{id}/bulk/{jobId}/progress":{"get":{"summary":"SSE stream of bulk evaluation job progress","tags":["Evaluator"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"in":"path","name":"jobId","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"SSE stream of progress events","content":{"application/json":{"schema":{"description":"SSE stream of progress events","type":"string"}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/evaluate/sessions/{id}/bulk/{jobId}/result":{"get":{"summary":"Get the structured result rows for a completed bulk job (FE inline rendering)","tags":["Evaluator"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"in":"path","name":"jobId","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"string"}},"rows":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["columns","rows"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/evaluate/sessions/{id}/bulk/{jobId}/download":{"get":{"summary":"Download the result CSV for a completed bulk job","tags":["Evaluator"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"in":"path","name":"jobId","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Result CSV (text/csv attachment)","content":{"application/json":{"schema":{"description":"Result CSV (text/csv attachment)","type":"string"}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/evaluate/templates/built-in":{"get":{"summary":"Public list of built-in style templates (Rubric, Narrative, Quick Score)","tags":["Evaluator"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"programDescription":{"type":"string"},"evaluationCriteria":{"type":"string"},"evaluationStyle":{"type":"string","enum":["RUBRIC","NARRATIVE","QUICK_SCORE"]},"feedbackInstructions":{"type":"array","items":{"type":"string"}},"exampleOutput":{"type":"object","additionalProperties":{}}},"required":["id","name","description","programDescription","evaluationCriteria","evaluationStyle","feedbackInstructions","exampleOutput"],"additionalProperties":false}}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/evaluate/templates/":{"get":{"summary":"List my evaluation templates","tags":["Evaluator"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string"},"programDescription":{"type":"string"},"evaluationCriteria":{"type":"string"},"evaluationStyle":{"type":"string","enum":["RUBRIC","NARRATIVE","QUICK_SCORE"]},"feedbackInstructions":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","userId","name","programDescription","evaluationCriteria","evaluationStyle","feedbackInstructions","createdAt","updatedAt"],"additionalProperties":false}}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"post":{"summary":"Create a new template","tags":["Evaluator"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"programDescription":{"type":"string","minLength":1,"maxLength":5000},"evaluationCriteria":{"type":"string","minLength":1,"maxLength":10000},"evaluationStyle":{"type":"string","enum":["RUBRIC","NARRATIVE","QUICK_SCORE"]},"feedbackInstructions":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":50,"default":[]}},"required":["name","programDescription","evaluationCriteria","evaluationStyle"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string"},"programDescription":{"type":"string"},"evaluationCriteria":{"type":"string"},"evaluationStyle":{"type":"string","enum":["RUBRIC","NARRATIVE","QUICK_SCORE"]},"feedbackInstructions":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","userId","name","programDescription","evaluationCriteria","evaluationStyle","feedbackInstructions","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/evaluate/templates/{id}":{"delete":{"summary":"Delete a template","tags":["Evaluator"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"204":{"description":"Template deleted"},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/evaluate/credits/":{"get":{"summary":"Get my evaluator credit balance and recent transactions","tags":["Evaluator"],"parameters":[{"in":"query","name":"limit","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"offset","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"balance":{"type":"integer","minimum":0},"totalPurchased":{"type":"integer","minimum":0},"totalUsed":{"type":"integer","minimum":0},"updatedAt":{"type":"string","format":"date-time"},"recentTransactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"amount":{"type":"integer"},"type":{"type":"string","enum":["SIGNUP_BONUS","PURCHASE","EVALUATION","BULK_EVALUATION","REFUND"]},"referenceId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","userId","amount","type","referenceId","createdAt"],"additionalProperties":false}}},"required":["balance","totalPurchased","totalUsed","updatedAt","recentTransactions"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/evaluate/credits/purchase":{"post":{"summary":"Create a Stripe Checkout session for a credit pack","tags":["Evaluator"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"pack":{"type":"string","enum":["PACK_50","PACK_100","PACK_500"]},"successUrl":{"type":"string","format":"uri","maxLength":2048},"cancelUrl":{"type":"string","format":"uri","maxLength":2048}},"required":["pack","successUrl","cancelUrl"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"sessionId":{"type":"string"}},"required":["url","sessionId"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/onramp/transactions/{provider}/{orderId}":{"get":{"tags":["Onramp"],"description":"Get transaction status for an onramp session","parameters":[{"in":"path","name":"provider","required":true,"schema":{"type":"string","enum":["stripe"]}},{"in":"path","name":"orderId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/onramp/session":{"post":{"tags":["Onramp"],"description":"Create an onramp session for fiat-to-crypto donation","requestBody":{"content":{"application/json":{"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}}},"required":true},"security":[{"bearerAuth":[]},{}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/webhooks/stripe":{"head":{"tags":["Webhooks"],"description":"Stripe webhook URL verification","responses":{"200":{"description":"Default Response"}}},"post":{"tags":["Webhooks"],"description":"Unified Stripe webhook ingestion (onramp donations + evaluator credits)","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"received":{"type":"boolean"}},"required":["received"],"additionalProperties":false}}}}}}},"/v2/onramp/webhook/stripe":{"head":{"tags":["Webhooks"],"description":"Stripe webhook URL verification","responses":{"200":{"description":"Default Response"}}},"post":{"tags":["Webhooks"],"description":"Unified Stripe webhook ingestion (onramp donations + evaluator credits)","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"received":{"type":"boolean"}},"required":["received"],"additionalProperties":false}}}}}}},"/v2/payouts/disburse":{"post":{"summary":"Create Disbursements","tags":["Payout Disbursements"],"description":"Create payout disbursement records for multiple grants","requestBody":{"content":{"application/json":{"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}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/payouts/{disbursementId}/record-safe-tx":{"post":{"summary":"Record Safe Transaction","tags":["Payout Disbursements"],"description":"Record Safe transaction hash for a disbursement","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"safeTransactionHash":{"type":"string","minLength":1},"nonce":{"type":"integer","minimum":0}},"required":["safeTransactionHash"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"disbursementId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/payouts/grant/{grantUID}/history":{"get":{"summary":"Get Grant Payout History","tags":["Payout Disbursements"],"description":"Get payout history for a specific grant","parameters":[{"in":"query","name":"page","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"in":"query","name":"limit","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"in":"path","name":"grantUID","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/payouts/grant/{grantUID}/total-disbursed":{"get":{"summary":"Get Total Disbursed (per grant)","tags":["Payout Disbursements"],"description":"Returns the per-grant sum of on-chain payouts with status=DISBURSED. Per-grant figure only — for program-level totals across all grants, call GET /v2/programs/{programId}/financials instead.","parameters":[{"in":"path","name":"grantUID","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"totalDisbursed":{"type":"string"}},"required":["totalDisbursed"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/payouts/community/{communityUID}/pending":{"get":{"summary":"Get Pending Disbursements","tags":["Payout Disbursements"],"description":"Get pending disbursements for a community","parameters":[{"in":"query","name":"page","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"in":"query","name":"limit","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"in":"path","name":"communityUID","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/payouts/{disbursementId}/status":{"patch":{"summary":"Update Disbursement Status","tags":["Payout Disbursements"],"description":"Update disbursement status (for Safe execution confirmation)","requestBody":{"content":{"application/json":{"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}}},"required":true},"parameters":[{"in":"path","name":"disbursementId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/payouts/safe/{safeAddress}/awaiting":{"get":{"summary":"Get Awaiting Signatures","tags":["Payout Disbursements"],"description":"Get disbursements awaiting signatures for a Safe address","parameters":[{"in":"query","name":"page","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"in":"query","name":"limit","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"in":"path","name":"safeAddress","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/payouts/grant/{grantUID}/milestone":{"delete":{"summary":"Delete Disbursement by Milestone","tags":["Payout Disbursements"],"description":"Delete a disbursement record associated with a specific milestone","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"communityUID":{"type":"string","minLength":1},"milestoneUID":{"type":"string","minLength":1}},"required":["communityUID","milestoneUID"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"grantUID","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"204":{"description":"Disbursement deleted"},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/payouts/record-payment":{"post":{"summary":"Record Historical Payment","tags":["Payout Disbursements"],"description":"Record a historical payment directly as disbursed (no Safe required)","requestBody":{"content":{"application/json":{"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}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/payout-config/":{"post":{"summary":"Save Payout Configs","tags":["Payout Grant Config"],"description":"Save payout configurations for grants (batch upsert)","requestBody":{"content":{"application/json":{"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}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/payout-config/bulk-import/validate":{"post":{"summary":"Validate Bulk Import","tags":["Payout Grant Config"],"description":"Validate and match bulk import rows against all community grants","requestBody":{"content":{"application/json":{"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}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/payout-config/community/{communityUID}/public":{"get":{"summary":"Get Community Configs (Public)","tags":["Payout Grant Config"],"description":"Get all payout configurations for a community (public read-only)","parameters":[{"in":"path","name":"communityUID","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/payout-config/community/{communityUID}":{"get":{"summary":"Get Community Configs","tags":["Payout Grant Config"],"description":"Get all payout configurations for a community","parameters":[{"in":"path","name":"communityUID","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/payout-config/grant/{grantUID}/public":{"get":{"summary":"Get Grant Config (Public)","tags":["Payout Grant Config"],"description":"Get payout configuration for a specific grant (public read-only)","parameters":[{"in":"path","name":"grantUID","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/payout-config/grant/{grantUID}":{"get":{"summary":"Get Grant Config","tags":["Payout Grant Config"],"description":"Get payout configuration for a specific grant (returns null config if none exists)","parameters":[{"in":"path","name":"grantUID","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"delete":{"summary":"Delete Grant Config","tags":["Payout Grant Config"],"description":"Delete payout configuration for a grant","parameters":[{"in":"path","name":"grantUID","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"204":{"description":"Default Response"},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/payout-config/grant/{grantUID}/line-items/{allocationId}":{"put":{"summary":"Update Line Item","tags":["Payout Grant Config"],"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.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":200},"amount":{"type":"string","maxLength":50,"pattern":"^(0|[1-9]\\d*)(\\.\\d+)?$"}},"additionalProperties":false}}}},"parameters":[{"in":"path","name":"grantUID","required":true,"schema":{"type":"string","minLength":1,"maxLength":100}},{"in":"path","name":"allocationId","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"delete":{"summary":"Delete Line Item","tags":["Payout Grant Config"],"description":"Delete a single line item from a grant payout config. Blocked when the allocation is part of an active or completed disbursement.","parameters":[{"in":"path","name":"grantUID","required":true,"schema":{"type":"string","minLength":1,"maxLength":100}},{"in":"path","name":"allocationId","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-program-configs/{programId}/prompts":{"get":{"summary":"Get Program Prompts","tags":["Program Prompts"],"description":"Get all prompts (external and internal) for a program. Requires PROGRAM_VIEW permission","parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-program-configs/{programId}/prompts/{promptType}":{"put":{"summary":"Save Program Prompt","tags":["Program Prompts"],"description":"Save or update a prompt for a program. Requires PROGRAM_EDIT permission. Name cannot be changed after creation.","requestBody":{"content":{"application/json":{"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}}},"required":true},"parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}},{"in":"path","name":"promptType","required":true,"schema":{"type":"string","enum":["external","internal"]}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-program-configs/{programId}/prompts/{promptType}/test":{"post":{"summary":"Test Program Prompt","tags":["Program Prompts"],"description":"Test a prompt with a specific application. Requires PROGRAM_EDIT permission","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"applicationId":{"type":"string","minLength":1}},"required":["applicationId"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}},{"in":"path","name":"promptType","required":true,"schema":{"type":"string","enum":["external","internal"]}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"result":{"type":"string"},"rawResponse":{},"compiledPrompt":{"type":"string"},"error":{"type":"string"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-program-configs/{programId}/evaluate-all":{"post":{"summary":"Trigger Bulk Evaluation","tags":["Program Prompts"],"description":"Trigger bulk re-evaluation of all applications for a program. Requires PROGRAM_EDIT permission","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"promptType":{"type":"string","enum":["external","internal"]}},"required":["promptType"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string"},"totalApplications":{"type":"number"}},"required":["jobId","totalApplications"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-program-configs/{programId}/evaluate-all/{jobId}":{"get":{"summary":"Get Bulk Evaluation Job Status","tags":["Program Prompts"],"description":"Get the status of a bulk evaluation job. Requires PROGRAM_VIEW permission","parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}},{"in":"path","name":"jobId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/projects/{projectUID}/communities/{communityUID}/kyc-status":{"get":{"summary":"Get KYC Status","tags":["KYC"],"description":"Get KYC verification status for a project in a specific community","parameters":[{"in":"path","name":"projectUID","required":true,"schema":{"type":"string","minLength":1},"description":"The project UID"},{"in":"path","name":"communityUID","required":true,"schema":{"type":"string","minLength":1},"description":"The community UID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/{referenceNumber}/kyc-status":{"get":{"summary":"Get KYC Status by Application Reference","tags":["KYC"],"description":"Get KYC verification status for a funding application by its reference number","parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1,"pattern":"^APP-[A-Z0-9]+-[A-Z0-9]+$"},"description":"The funding application reference number (e.g., APP-FUPIOMKO-KBKLSQ)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{communityIdOrSlug}/kyc-config":{"get":{"summary":"Get KYC Config","tags":["KYC"],"description":"Get KYC provider configuration for a community (form URLs, validity, etc.)","parameters":[{"in":"path","name":"communityIdOrSlug","required":true,"schema":{"type":"string","minLength":1},"description":"The community UID or slug"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"put":{"summary":"Upsert KYC Config","tags":["KYC Admin"],"description":"Create or update KYC provider configuration for a community. Requires admin authentication.","requestBody":{"content":{"application/json":{"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}}},"required":true},"parameters":[{"in":"path","name":"communityIdOrSlug","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{communityIdOrSlug}/kyc/batch-status/by-project-uid/public":{"post":{"summary":"Get Batch KYC Statuses by Project UID (Public)","tags":["KYC"],"description":"Get KYC verification statuses for multiple projects in a community (public, read-only)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectUIDs":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":100}},"required":["projectUIDs"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"communityIdOrSlug","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{communityIdOrSlug}/kyc/batch-status/by-project-uid":{"post":{"summary":"Get Batch KYC Statuses by Project UID","tags":["KYC"],"description":"Get KYC verification statuses for multiple projects in a community","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectUIDs":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":100}},"required":["projectUIDs"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"communityIdOrSlug","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{communityIdOrSlug}/kyc/batch-status/by-application-reference":{"post":{"summary":"Get Batch KYC Statuses by Application Reference","tags":["KYC"],"description":"Get KYC verification statuses for multiple funding applications in a community","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"applicationReferences":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["applicationReferences"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"communityIdOrSlug","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{communityIdOrSlug}/kyc-form-url":{"post":{"summary":"Get KYC Form URL","tags":["KYC"],"description":"Get KYC form URL for a project with application reference","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectUID":{"type":"string","minLength":1},"verificationType":{"type":"string","enum":["KYC","KYB"]},"walletAddress":{"type":"string"}},"required":["projectUID","verificationType"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"communityIdOrSlug","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"formUrl":{"type":"string"},"applicationReference":{"type":"string"}},"required":["formUrl","applicationReference"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/admin/kyc/verification-status":{"put":{"summary":"Admin KYC Status Override","tags":["KYC Admin"],"description":"Override KYC/KYB verification status for a project. Requires staff authentication.","requestBody":{"content":{"application/json":{"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}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/webhooks/kyc/treova":{"post":{"summary":"Treova Webhook","tags":["KYC Webhooks"],"description":"Webhook endpoint for Treova KYC status updates. Signature verification required.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}}}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/programs/{programId}/financials":{"get":{"summary":"Get Program Financials (authoritative funding totals)","tags":["Program Financials"],"description":"AUTHORITATIVE source for program funding totals. Public endpoint — no authentication required. Returns the same numbers the Karma UI displays: administrator-configured allocations (`totalAllocated`), actual on-chain disbursements (`totalDisbursed`), and the difference (`totalRemaining`), plus a per-project breakdown. Use this endpoint to answer \"how much has program X funded / paid out?\". Do NOT sum funding application `approvedAmount` values to estimate program totals — that field is intake-time approvals and does not reflect actual funding. Do NOT sum legacy grant `amount` fields either; they are stale per-grant attestation values not tracked in the current disbursement system. Grants without administrator-configured payout amounts are intentionally excluded from these totals, matching the Karma UI behaviour (they are not yet part of the funding flow).","parameters":[{"in":"query","name":"page","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]},"description":"Page number"},{"in":"query","name":"limit","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]},"description":"Items per page"},{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1},"description":"Program ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"object","properties":{"programId":{"type":"string","description":"Program identifier (matches the path parameter)."},"programName":{"type":"string","description":"Human-readable program name."},"primaryCurrency":{"type":"string","description":"Currency used for the top-level totals (totalAllocated / totalDisbursed / totalRemaining). Picked as the currency with the most grants. When multiple currencies are present, see `currencyBreakdown` for per-currency figures."},"primaryTokenAddress":{"type":"string","nullable":true,"description":"On-chain contract address of the primary currency. Null when no disbursements have been recorded yet."},"primaryChainID":{"type":"number","nullable":true,"description":"EVM chain ID of the primary currency. Null when no grants have on-chain configuration yet."},"totalAllocated":{"type":"string","description":"AUTHORITATIVE program-level \"allocated\" total, in `primaryCurrency`. Sum of administrator-configured grant amounts (payout_grant_config.totalGrantAmount). Use this for \"how much has program X committed?\". Do NOT sum funding application `approvedAmount` values to estimate this — that field is intake-time approvals, not allocations. When the program has grants in multiple currencies, this only reflects the primary currency; see `currencyBreakdown` for the full picture."},"totalDisbursed":{"type":"string","description":"AUTHORITATIVE program-level \"disbursed\" total, in `primaryCurrency`. Sum of on-chain payout records with status=DISBURSED. Use this for \"how much has program X actually paid out?\". This is the same number the Karma UI displays. When the program has grants in multiple currencies, this only reflects the primary currency; see `currencyBreakdown` for the full picture."},"totalRemaining":{"type":"string","description":"totalAllocated minus totalDisbursed, in `primaryCurrency`, floored at 0. The amount the program has committed but not yet paid out."},"projectCount":{"type":"number","description":"Number of grants/projects counted in these totals. Grants without administrator-configured payout amounts are excluded — they are not yet part of the funding flow and are intentionally not counted, matching the Karma UI."},"currencyBreakdown":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","description":"Token ticker (e.g. \"USDC\", \"USDT\"). Use together with chainID to identify a unique on-chain currency — the same ticker can exist on multiple chains."},"tokenAddress":{"type":"string","nullable":true,"description":"On-chain contract address of the token. Null only when no disbursements have been recorded yet for this currency bucket."},"chainID":{"type":"number","description":"EVM chain ID where this currency was disbursed (e.g. 10 = Optimism, 8453 = Base)."},"allocated":{"type":"string","description":"Human-readable allocated amount in this currency. Sum of payout configurations administrators set for each grant. Stored as a string to preserve precision. NOT the number of tokens transferred — that is `disbursed`."},"disbursed":{"type":"string","description":"Human-readable amount actually paid out on-chain in this currency. Sum of disbursement records with status=DISBURSED. This is the authoritative \"money out\" figure."},"remaining":{"type":"string","description":"Human-readable amount still to be paid in this currency (allocated minus disbursed, floored at 0)."},"grantCount":{"type":"number","description":"Number of grants in this program that have allocations denominated in this currency."}},"required":["currency","tokenAddress","chainID","allocated","disbursed","remaining","grantCount"],"additionalProperties":false},"description":"Per-currency breakdown of allocated/disbursed/remaining. Present only when the program has grants in more than one currency. When present, prefer summing across this array over reading the top-level totals, since the top-level totals only reflect the primary currency."}},"required":["programId","programName","primaryCurrency","primaryTokenAddress","primaryChainID","totalAllocated","totalDisbursed","totalRemaining","projectCount"],"additionalProperties":false,"description":"Program-level rollup. Use these fields when answering \"total funding\" questions about the program."},"projects":{"type":"array","items":{"type":"object","properties":{"projectUID":{"type":"string","description":"Project UID (the canonical 0x… identifier)."},"projectName":{"type":"string","description":"Human-readable project name."},"projectSlug":{"type":"string","description":"Project slug used in URLs."},"logoUrl":{"type":"string","nullable":true,"description":"Project logo URL, or null if none uploaded."},"grantUID":{"type":"string","description":"Grant UID — the grant this project received within the program."},"currency":{"type":"string","description":"Token ticker for this grant (e.g. \"USDC\")."},"tokenAddress":{"type":"string","nullable":true,"description":"On-chain contract address of the token, or null if not yet configured."},"chainID":{"type":"number","description":"EVM chain ID where the grant lives."},"approved":{"type":"string","description":"Human-readable amount the program administrator configured for this grant. Source of truth for \"what this grant is supposed to pay out\". This is per-grant — to get the program total, use `summary.totalAllocated` or sum `currencyBreakdown[].allocated`."},"disbursed":{"type":"string","description":"Human-readable amount actually paid out on-chain for this grant (sum of DISBURSED payout records). Per-grant figure."},"remaining":{"type":"string","description":"approved minus disbursed, floored at 0. Per-grant figure."},"disbursementPercentage":{"type":"number","description":"disbursed / approved × 100, rounded to one decimal. 0 when nothing approved."},"disbursementStatus":{"type":"string","enum":["NOT_STARTED","IN_PROGRESS","COMPLETED"],"description":"Aggregated disbursement status for this grant: NOT_STARTED, IN_PROGRESS, or FULLY_DISBURSED. Derived from the approved-vs-disbursed comparison."},"milestoneCompletion":{"type":"number","description":"Percentage of milestones marked complete for this grant (0–100, integer). Independent of disbursement — a grant can have all milestones complete but still owe disbursements, or vice versa."}},"required":["projectUID","projectName","projectSlug","logoUrl","grantUID","currency","tokenAddress","chainID","approved","disbursed","remaining","disbursementPercentage","disbursementStatus","milestoneCompletion"],"additionalProperties":false},"description":"Per-project (per-grant) financial rows for the current page. Paginated; see `pagination` for totals."},"pagination":{"type":"object","properties":{"totalCount":{"type":"number","description":"Total number of projects across all pages."},"page":{"type":"number","description":"Current page number (1-based)."},"limit":{"type":"number","description":"Number of projects per page."},"totalPages":{"type":"number","description":"Total number of pages available."},"nextPage":{"type":"number","nullable":true,"description":"Next page number, or null if on the last page."},"prevPage":{"type":"number","nullable":true,"description":"Previous page number, or null if on the first page."},"hasNextPage":{"type":"boolean","description":"Whether more pages exist after the current one."},"hasPrevPage":{"type":"boolean","description":"Whether pages exist before the current one."}},"required":["totalCount","page","limit","totalPages","nextPage","prevPage","hasNextPage","hasPrevPage"],"additionalProperties":false,"description":"Pagination metadata for the `projects` array."}},"required":["summary","projects","pagination"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hedgey-campaign-mappings":{"get":{"summary":"Get Campaign Mappings","tags":["Hedgey Campaign Mappings"],"description":"Get all Hedgey campaign name mappings","parameters":[{"in":"query","name":"tenantId","required":false,"schema":{"type":"string"},"description":"Filter mappings by tenant ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/hedgey-campaign-mappings/{uuid}":{"get":{"summary":"Get Campaign Mapping by UUID","tags":["Hedgey Campaign Mappings"],"description":"Get a specific Hedgey campaign mapping by UUID","parameters":[{"in":"path","name":"uuid","required":true,"schema":{"type":"string"},"description":"Hedgey campaign UUID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/{referenceNumber}/team-members":{"get":{"summary":"Get Team Members","tags":["Application Team Members"],"description":"Get all team members for a funding application. Requires authentication.","parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"post":{"summary":"Add Team Member","tags":["Application Team Members"],"description":"Add a team member to a funding application. The application owner, staff, community admin of the program's community, program reviewer, or milestone reviewer can add team members. The member email is resolved via Privy to get their wallet address.","requestBody":{"content":{"application/json":{"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}}},"required":true},"parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/{referenceNumber}/team-members/{memberAddress}":{"delete":{"summary":"Remove Team Member","tags":["Application Team Members"],"description":"Remove a team member from a funding application. Only the application owner can remove team members.","parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1}},{"in":"path","name":"memberAddress","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"204":{"description":"Team member removed"},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/{referenceNumber}/grantee-contacts":{"get":{"summary":"Get Grantee Contacts","tags":["Application Team Members"],"description":"Get grantee contacts (application owner and team members) for an application. Used to populate @-mention dropdowns in comments. Requires authentication.","parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1},"description":"Application reference number"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"contacts":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["applicant","member"],"description":"Contact kind"},"role":{"type":"string","enum":["Owner","Member"],"description":"Display role label"},"email":{"type":"string","description":"Contact email address (may be empty)"},"name":{"type":"string","description":"Display name or truncated wallet address"},"address":{"type":"string","description":"Wallet address"}},"required":["kind","role","email","name","address"],"additionalProperties":false},"description":"List of grantee contacts for the application"}},"required":["contacts"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/user/api-keys":{"post":{"summary":"Generate API Key","tags":["API Keys"],"description":"Generate a new API key for the authenticated user. If a key already exists, it will be revoked and a new one created.","requestBody":{"content":{"application/json":{"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","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"get":{"summary":"Get API Key Info","tags":["API Keys"],"description":"Get the current API key info for the authenticated user. Returns null if no active key exists.","responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"delete":{"summary":"Revoke API Key","tags":["API Keys"],"description":"Revoke the active API key. Can be authenticated via JWT or API key (self-revoke).","responses":{"204":{"description":"Key revoked successfully"},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/user/me":{"get":{"summary":"Get Current User","tags":["User"],"description":"Get current user info. Works with both JWT and API key authentication.","responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/api-keys/auth/init":{"post":{"summary":"Initiate Email Verification","tags":["API Keys"],"description":"Initiate email verification for programmatic API key generation.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Email address to send verification code to"}},"required":["email"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/api-keys/auth/verify":{"post":{"summary":"Verify OTP and Generate Key","tags":["API Keys"],"description":"Verify email OTP and generate an API key. Only works if no active key exists.","requestBody":{"content":{"application/json":{"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}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Plaintext API key (shown once)"}},"required":["key"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/agent/execute":{"post":{"summary":"Execute Agent Action","tags":["Agent"],"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.","requestBody":{"content":{"application/json":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"transactionHash":{"type":"string"},"chainId":{"type":"number"},"smartAccountAddress":{"type":"string"}},"required":["transactionHash","chainId","smartAccountAddress"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/agent/info":{"get":{"summary":"Get Agent Info","tags":["Agent"],"description":"Get the server-side wallet address, supported chains, and available actions for the authenticated API key.","responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/agent/register":{"post":{"summary":"Register Agent","tags":["Agent"],"description":"Register a new agent without authentication. Creates a server wallet and API key. Rate limited to 5 requests per minute per IP.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"additionalProperties":false}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"type":"string"},"walletAddress":{"type":"string"},"smartAccountAddress":{"type":"string"}},"required":["apiKey","walletAddress","smartAccountAddress"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/agent/stream":{"post":{"requestBody":{"content":{"application/json":{"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"}}}}},"required":true},"responses":{"200":{"description":"Default Response"}}}},"/v2/agent/rating":{"post":{"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["traceId","value"],"properties":{"traceId":{"type":"string","minLength":1,"maxLength":200},"value":{"type":"number","enum":[1,-1]},"comment":{"type":"string","maxLength":1000}}}}},"required":true},"responses":{"200":{"description":"Default Response"}}}},"/v2/mcp/":{"options":{"responses":{"200":{"description":"Default Response"}}},"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"responses":{"200":{"description":"Default Response"}}}},"/mcp/":{"options":{"responses":{"200":{"description":"Default Response"}}},"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"responses":{"200":{"description":"Default Response"}}}},"/v2/mcp/info":{"options":{"responses":{"200":{"description":"Default Response"}}},"get":{"responses":{"200":{"description":"Default Response"}}}},"/v2/mcp/tools":{"options":{"responses":{"200":{"description":"Default Response"}}},"get":{"responses":{"200":{"description":"Default Response"}}}},"/.well-known/mcp-tools.json":{"options":{"responses":{"200":{"description":"Default Response"}}},"get":{"responses":{"200":{"description":"Default Response"}}}},"/.well-known/oauth-protected-resource/mcp":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/.well-known/oauth-protected-resource":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v2/grant-agreements/{grantUID}":{"post":{"summary":"Toggle Grant Agreement","tags":["Grant Agreements"],"description":"Toggle agreement signed status for a grant","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"signed":{"type":"boolean"},"communityUID":{"type":"string","minLength":1},"signedAt":{"type":"string","format":"date-time"}},"required":["signed","communityUID"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"grantUID","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"get":{"summary":"Get Grant Agreement","tags":["Grant Agreements"],"description":"Get agreement status for a grant","parameters":[{"in":"path","name":"grantUID","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/milestone-invoices/{grantUID}":{"put":{"summary":"Batch Save Milestone Invoices","tags":["Milestone Invoices"],"description":"Batch update invoice statuses for milestones of a grant","requestBody":{"content":{"application/json":{"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}}},"required":true},"parameters":[{"in":"path","name":"grantUID","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/milestone-invoices/presigned":{"post":{"summary":"Generate Invoice Upload URL","tags":["Milestone Invoices"],"description":"Generate presigned URL for invoice file upload","requestBody":{"content":{"application/json":{"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},"grantUID":{"type":"string","minLength":1}},"required":["fileName","fileType","fileSize","grantUID"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"uploadUrl":{"type":"string"},"finalUrl":{"type":"string"},"key":{"type":"string"}},"required":["uploadUrl","finalUrl","key"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/milestone-invoices/download":{"get":{"summary":"Get Invoice Download URL","tags":["Milestone Invoices"],"description":"Generate a temporary download URL for an invoice file (15 min TTL)","parameters":[{"in":"query","name":"key","required":true,"schema":{"type":"string","minLength":1,"maxLength":500}},{"in":"query","name":"grantUID","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"downloadUrl":{"type":"string"}},"required":["downloadUrl"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/milestone-invoices/{grantUID}/payment-status":{"patch":{"summary":"Update Payment Status","tags":["Milestone Invoices"],"description":"Update payment status override for a milestone invoice (admin)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"communityUID":{"type":"string","minLength":1},"milestoneUID":{"type":"string","maxLength":200},"milestoneLabel":{"type":"string","minLength":1,"maxLength":500},"paymentStatus":{"type":"string","enum":["pending"]}},"required":["communityUID","milestoneUID","milestoneLabel","paymentStatus"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"grantUID","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/milestone-invoices/grant/{grantUID}":{"get":{"summary":"Get Grant Invoices","tags":["Milestone Invoices"],"description":"Get all milestone invoices for a grant","parameters":[{"in":"path","name":"grantUID","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/milestone-invoices/grantee/presigned":{"post":{"summary":"Generate Invoice Upload URL (Grantee)","tags":["Milestone Invoices - Grantee"],"description":"Generate presigned URL for grantee invoice file upload","requestBody":{"content":{"application/json":{"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}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"uploadUrl":{"type":"string"},"finalUrl":{"type":"string"},"key":{"type":"string"}},"required":["uploadUrl","finalUrl","key"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/grants/{grantUID}/invoice-requirement":{"get":{"summary":"Get Invoice Requirement","tags":["Grants"],"description":"Check if invoice is required for a grant and get existing invoice status","parameters":[{"in":"query","name":"milestoneLabel","required":false,"schema":{"type":"string","maxLength":500}},{"in":"path","name":"grantUID","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/grants/{grantUID}/invoice":{"put":{"summary":"Submit Invoice (Grantee)","tags":["Grants"],"description":"Submit an invoice for a milestone as a grantee. Auto-marks as received.","requestBody":{"content":{"application/json":{"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}}},"required":true},"parameters":[{"in":"path","name":"grantUID","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/grants/{grantUID}/invoice/download":{"get":{"summary":"Download Invoice (Authorized Users)","tags":["Grants"],"description":"Get a temporary download URL for an invoice file. Requires authentication and project/community authorization.","parameters":[{"in":"query","name":"key","required":true,"schema":{"type":"string","minLength":1,"maxLength":500}},{"in":"path","name":"grantUID","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"downloadUrl":{"type":"string"}},"required":["downloadUrl"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/funding-applications/{referenceNumber}/invoice-config":{"get":{"summary":"Get Invoice Config by Reference Number","tags":["Funding Applications"],"description":"Resolve a funding application referenceNumber to its linked grant and return invoice configuration","parameters":[{"in":"path","name":"referenceNumber","required":true,"schema":{"type":"string","minLength":1,"maxLength":500}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"grantUID":{"type":"string"},"invoiceRequired":{"type":"boolean"},"milestoneInvoices":{"type":"array","items":{"type":"object","properties":{"milestoneUID":{"type":"string","nullable":true},"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{uidOrSlug}/milestones/pending-verification":{"get":{"summary":"Get Pending Verification Milestones","tags":["Milestone Report"],"description":"Get milestones that are completed but not yet verified for a community","parameters":[{"in":"query","name":"page","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"pageLimit","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"programIds","required":false,"schema":{"type":"string"}},{"in":"query","name":"reviewerAddress","required":false,"schema":{"type":"string"}},{"in":"path","name":"uidOrSlug","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{uidOrSlug}/milestones/report":{"get":{"summary":"Get Milestone Report","tags":["Milestone Report"],"description":"Get milestone report rows + aggregate stats for a community, with team name resolution from funding applications","parameters":[{"in":"query","name":"page","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"pageLimit","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"sortField","required":false,"schema":{"type":"string","enum":["totalMilestones","completedMilestones","pendingMilestones","pastDueMilestones","projectTitle","grantTitle"]}},{"in":"query","name":"sortOrder","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"in":"query","name":"programIds","required":false,"schema":{"type":"string","maxLength":2000}},{"in":"query","name":"reviewerAddress","required":false,"schema":{"type":"string"}},{"in":"path","name":"uidOrSlug","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"grantUid":{"type":"string"},"grantTitle":{"type":"string"},"grantChainID":{"type":"number"},"programId":{"type":"string","nullable":true},"projectUid":{"type":"string"},"projectTitle":{"type":"string"},"projectSlug":{"type":"string"},"resolvedProjectName":{"type":"string"},"totalMilestones":{"type":"number"},"completedMilestones":{"type":"number"},"pendingMilestones":{"type":"number"},"pastDueMilestones":{"type":"number"},"isGrantCompleted":{"type":"boolean"},"proofOfWorkLinks":{"type":"array","items":{"type":"string"}}},"required":["grantUid","grantTitle","grantChainID","programId","projectUid","projectTitle","projectSlug","totalMilestones","completedMilestones","pendingMilestones","pastDueMilestones","isGrantCompleted","proofOfWorkLinks"],"additionalProperties":false}},"pageInfo":{"type":"object","properties":{"totalItems":{"type":"number"},"page":{"type":"number"},"pageLimit":{"type":"number"}},"required":["totalItems","page","pageLimit"],"additionalProperties":false},"stats":{"type":"object","properties":{"totalGrants":{"type":"number"},"totalProjectsWithMilestones":{"type":"number"},"totalMilestones":{"type":"number"},"totalCompletedMilestones":{"type":"number"},"totalPendingMilestones":{"type":"number"},"totalProjects":{"type":"number"},"percentageProjectsWithMilestones":{"type":"number"},"percentageCompletedMilestones":{"type":"number"},"percentagePendingMilestones":{"type":"number"}},"required":["totalGrants","totalProjectsWithMilestones","totalMilestones","totalCompletedMilestones","totalPendingMilestones","totalProjects","percentageProjectsWithMilestones","percentageCompletedMilestones","percentagePendingMilestones"],"additionalProperties":false},"uniqueProjectCount":{"type":"number"}},"required":["data","pageInfo","stats","uniqueProjectCount"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{uidOrSlug}/reports/published":{"get":{"summary":"List Published Reports","tags":["Portfolio Reports"],"description":"List published reports for a community (public)","parameters":[{"in":"path","name":"uidOrSlug","required":true,"schema":{"type":"string","minLength":1,"maxLength":256}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reportConfigId":{"type":"string"},"communityId":{"type":"string"},"runDate":{"type":"string"},"status":{"type":"string","enum":["generating","draft","failed","published"]},"content":{"type":"string"},"dataSnapshot":{"type":"object","additionalProperties":{}},"modelId":{"type":"string"},"tokenUsage":{"type":"object","properties":{"promptTokens":{"type":"number"},"completionTokens":{"type":"number"},"totalTokens":{"type":"number"}},"required":["promptTokens","completionTokens","totalTokens"],"additionalProperties":false,"nullable":true},"generatedAt":{"type":"string"},"generationError":{"type":"string","nullable":true},"publishedAt":{"type":"string","nullable":true},"publishedBy":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"reportConfigName":{"type":"string","nullable":true}},"required":["id","reportConfigId","communityId","runDate","status","content","dataSnapshot","modelId","tokenUsage","generatedAt","generationError","publishedAt","publishedBy","createdAt","updatedAt","reportConfigName"],"additionalProperties":false}}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{uidOrSlug}/reports/published/{runDate}":{"get":{"summary":"Get Published Report by Run Date","tags":["Portfolio Reports"],"description":"Get a published report by run date (public)","parameters":[{"in":"path","name":"uidOrSlug","required":true,"schema":{"type":"string","minLength":1,"maxLength":256}},{"in":"path","name":"runDate","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"reportConfigId":{"type":"string"},"communityId":{"type":"string"},"runDate":{"type":"string"},"status":{"type":"string","enum":["generating","draft","failed","published"]},"content":{"type":"string"},"dataSnapshot":{"type":"object","additionalProperties":{}},"modelId":{"type":"string"},"tokenUsage":{"type":"object","properties":{"promptTokens":{"type":"number"},"completionTokens":{"type":"number"},"totalTokens":{"type":"number"}},"required":["promptTokens","completionTokens","totalTokens"],"additionalProperties":false,"nullable":true},"generatedAt":{"type":"string"},"generationError":{"type":"string","nullable":true},"publishedAt":{"type":"string","nullable":true},"publishedBy":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","reportConfigId","communityId","runDate","status","content","dataSnapshot","modelId","tokenUsage","generatedAt","generationError","publishedAt","publishedBy","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{uidOrSlug}/report-configs":{"post":{"summary":"Create Report Config","tags":["Portfolio Reports"],"description":"Create a report config for a community","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"programIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":256},"minItems":1,"maxItems":50},"modelId":{"type":"string","minLength":1,"maxLength":128},"prompt":{"type":"string","minLength":1,"maxLength":50000},"chartIndicatorIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":50,"default":[]},"schedule":{"type":"object","properties":{"intervalUnit":{"type":"string","enum":["days","weeks","months"]},"intervalCount":{"type":"integer","minimum":1,"maximum":366},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"ends":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["never"]}},"required":["kind"],"additionalProperties":true},{"type":"object","properties":{"kind":{"type":"string","enum":["on_date"]},"date":{"$ref":"#/properties/schedule/properties/startDate"}},"required":["kind","date"],"additionalProperties":true}]}},"required":["intervalUnit","intervalCount","startDate","ends"],"additionalProperties":false},"isActive":{"type":"boolean","default":true}},"required":["name","programIds","modelId","prompt","schedule"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"uidOrSlug","required":true,"schema":{"type":"string","minLength":1,"maxLength":256}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"communityId":{"type":"string"},"name":{"type":"string"},"programIds":{"type":"array","items":{"type":"string"},"maxItems":50},"modelId":{"type":"string"},"prompt":{"type":"string"},"chartIndicatorIds":{"type":"array","items":{"type":"string"},"maxItems":50},"schedule":{"type":"object","properties":{"intervalUnit":{"type":"string","enum":["days","weeks","months"]},"intervalCount":{"type":"integer","minimum":1,"maximum":366},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"ends":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["never"]}},"required":["kind"],"additionalProperties":true},{"type":"object","properties":{"kind":{"type":"string","enum":["on_date"]},"date":{"$ref":"#/properties/schedule/properties/startDate"}},"required":["kind","date"],"additionalProperties":true}]}},"required":["intervalUnit","intervalCount","startDate","ends"],"additionalProperties":false},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"}},"required":["id","communityId","name","programIds","modelId","prompt","chartIndicatorIds","schedule","isActive","createdAt","updatedAt","createdBy","updatedBy"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"get":{"summary":"List Report Configs","tags":["Portfolio Reports"],"description":"List report configs for a community","parameters":[{"in":"path","name":"uidOrSlug","required":true,"schema":{"type":"string","minLength":1,"maxLength":256}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"communityId":{"type":"string"},"name":{"type":"string"},"programIds":{"type":"array","items":{"type":"string"},"maxItems":50},"modelId":{"type":"string"},"prompt":{"type":"string"},"chartIndicatorIds":{"type":"array","items":{"type":"string"},"maxItems":50},"schedule":{"type":"object","properties":{"intervalUnit":{"type":"string","enum":["days","weeks","months"]},"intervalCount":{"type":"integer","minimum":1,"maximum":366},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"ends":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["never"]}},"required":["kind"],"additionalProperties":true},{"type":"object","properties":{"kind":{"type":"string","enum":["on_date"]},"date":{"$ref":"#/items/properties/schedule/properties/startDate"}},"required":["kind","date"],"additionalProperties":true}]}},"required":["intervalUnit","intervalCount","startDate","ends"],"additionalProperties":false},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"}},"required":["id","communityId","name","programIds","modelId","prompt","chartIndicatorIds","schedule","isActive","createdAt","updatedAt","createdBy","updatedBy"],"additionalProperties":false}}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{uidOrSlug}/report-configs/{configId}":{"get":{"summary":"Get Report Config","tags":["Portfolio Reports"],"description":"Get a single report config","parameters":[{"in":"path","name":"uidOrSlug","required":true,"schema":{"type":"string","minLength":1,"maxLength":256}},{"in":"path","name":"configId","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"communityId":{"type":"string"},"name":{"type":"string"},"programIds":{"type":"array","items":{"type":"string"},"maxItems":50},"modelId":{"type":"string"},"prompt":{"type":"string"},"chartIndicatorIds":{"type":"array","items":{"type":"string"},"maxItems":50},"schedule":{"type":"object","properties":{"intervalUnit":{"type":"string","enum":["days","weeks","months"]},"intervalCount":{"type":"integer","minimum":1,"maximum":366},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"ends":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["never"]}},"required":["kind"],"additionalProperties":true},{"type":"object","properties":{"kind":{"type":"string","enum":["on_date"]},"date":{"$ref":"#/properties/schedule/properties/startDate"}},"required":["kind","date"],"additionalProperties":true}]}},"required":["intervalUnit","intervalCount","startDate","ends"],"additionalProperties":false},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"}},"required":["id","communityId","name","programIds","modelId","prompt","chartIndicatorIds","schedule","isActive","createdAt","updatedAt","createdBy","updatedBy"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"put":{"summary":"Update Report Config","tags":["Portfolio Reports"],"description":"Update a report config","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"programIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":256},"minItems":1,"maxItems":50},"modelId":{"type":"string","minLength":1,"maxLength":128},"prompt":{"type":"string","minLength":1,"maxLength":50000},"chartIndicatorIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":50},"schedule":{"type":"object","properties":{"intervalUnit":{"type":"string","enum":["days","weeks","months"]},"intervalCount":{"type":"integer","minimum":1,"maximum":366},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"ends":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["never"]}},"required":["kind"],"additionalProperties":true},{"type":"object","properties":{"kind":{"type":"string","enum":["on_date"]},"date":{"$ref":"#/properties/schedule/properties/startDate"}},"required":["kind","date"],"additionalProperties":true}]}},"required":["intervalUnit","intervalCount","startDate","ends"],"additionalProperties":false},"isActive":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"in":"path","name":"uidOrSlug","required":true,"schema":{"type":"string","minLength":1,"maxLength":256}},{"in":"path","name":"configId","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"communityId":{"type":"string"},"name":{"type":"string"},"programIds":{"type":"array","items":{"type":"string"},"maxItems":50},"modelId":{"type":"string"},"prompt":{"type":"string"},"chartIndicatorIds":{"type":"array","items":{"type":"string"},"maxItems":50},"schedule":{"type":"object","properties":{"intervalUnit":{"type":"string","enum":["days","weeks","months"]},"intervalCount":{"type":"integer","minimum":1,"maximum":366},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"ends":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["never"]}},"required":["kind"],"additionalProperties":true},{"type":"object","properties":{"kind":{"type":"string","enum":["on_date"]},"date":{"$ref":"#/properties/schedule/properties/startDate"}},"required":["kind","date"],"additionalProperties":true}]}},"required":["intervalUnit","intervalCount","startDate","ends"],"additionalProperties":false},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"}},"required":["id","communityId","name","programIds","modelId","prompt","chartIndicatorIds","schedule","isActive","createdAt","updatedAt","createdBy","updatedBy"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"delete":{"summary":"Delete Report Config","tags":["Portfolio Reports"],"description":"Deactivate a report config","parameters":[{"in":"path","name":"uidOrSlug","required":true,"schema":{"type":"string","minLength":1,"maxLength":256}},{"in":"path","name":"configId","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"}}],"responses":{"204":{"description":"Default Response"},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{uidOrSlug}/reports/generate":{"post":{"summary":"Generate Report","tags":["Portfolio Reports"],"description":"Dispatch portfolio report generation for the given configId. Returns 202 with a `generating`-status report; poll GET /reports/:reportId until status is terminal.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"configId":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["configId"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"uidOrSlug","required":true,"schema":{"type":"string","minLength":1,"maxLength":256}}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"reportConfigId":{"type":"string"},"communityId":{"type":"string"},"runDate":{"type":"string"},"status":{"type":"string","enum":["generating","draft","failed","published"]},"content":{"type":"string"},"dataSnapshot":{"type":"object","additionalProperties":{}},"modelId":{"type":"string"},"tokenUsage":{"type":"object","properties":{"promptTokens":{"type":"number"},"completionTokens":{"type":"number"},"totalTokens":{"type":"number"}},"required":["promptTokens","completionTokens","totalTokens"],"additionalProperties":false,"nullable":true},"generatedAt":{"type":"string"},"generationError":{"type":"string","nullable":true},"publishedAt":{"type":"string","nullable":true},"publishedBy":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","reportConfigId","communityId","runDate","status","content","dataSnapshot","modelId","tokenUsage","generatedAt","generationError","publishedAt","publishedBy","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{uidOrSlug}/reports":{"get":{"summary":"List Reports","tags":["Portfolio Reports"],"description":"List all reports for a community","parameters":[{"in":"query","name":"status","required":false,"schema":{"type":"string","enum":["generating","draft","failed","published"]}},{"in":"path","name":"uidOrSlug","required":true,"schema":{"type":"string","minLength":1,"maxLength":256}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reportConfigId":{"type":"string"},"communityId":{"type":"string"},"runDate":{"type":"string"},"status":{"type":"string","enum":["generating","draft","failed","published"]},"content":{"type":"string"},"dataSnapshot":{"type":"object","additionalProperties":{}},"modelId":{"type":"string"},"tokenUsage":{"type":"object","properties":{"promptTokens":{"type":"number"},"completionTokens":{"type":"number"},"totalTokens":{"type":"number"}},"required":["promptTokens","completionTokens","totalTokens"],"additionalProperties":false,"nullable":true},"generatedAt":{"type":"string"},"generationError":{"type":"string","nullable":true},"publishedAt":{"type":"string","nullable":true},"publishedBy":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","reportConfigId","communityId","runDate","status","content","dataSnapshot","modelId","tokenUsage","generatedAt","generationError","publishedAt","publishedBy","createdAt","updatedAt"],"additionalProperties":false}}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{uidOrSlug}/reports/{reportId}":{"get":{"summary":"Get Report","tags":["Portfolio Reports"],"description":"Get a single report","parameters":[{"in":"path","name":"uidOrSlug","required":true,"schema":{"type":"string","minLength":1,"maxLength":256}},{"in":"path","name":"reportId","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"reportConfigId":{"type":"string"},"communityId":{"type":"string"},"runDate":{"type":"string"},"status":{"type":"string","enum":["generating","draft","failed","published"]},"content":{"type":"string"},"dataSnapshot":{"type":"object","additionalProperties":{}},"modelId":{"type":"string"},"tokenUsage":{"type":"object","properties":{"promptTokens":{"type":"number"},"completionTokens":{"type":"number"},"totalTokens":{"type":"number"}},"required":["promptTokens","completionTokens","totalTokens"],"additionalProperties":false,"nullable":true},"generatedAt":{"type":"string"},"generationError":{"type":"string","nullable":true},"publishedAt":{"type":"string","nullable":true},"publishedBy":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","reportConfigId","communityId","runDate","status","content","dataSnapshot","modelId","tokenUsage","generatedAt","generationError","publishedAt","publishedBy","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"put":{"summary":"Update Report Content","tags":["Portfolio Reports"],"description":"Edit report content (HTML body)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","maxLength":500000}},"required":["content"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"uidOrSlug","required":true,"schema":{"type":"string","minLength":1,"maxLength":256}},{"in":"path","name":"reportId","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"reportConfigId":{"type":"string"},"communityId":{"type":"string"},"runDate":{"type":"string"},"status":{"type":"string","enum":["generating","draft","failed","published"]},"content":{"type":"string"},"dataSnapshot":{"type":"object","additionalProperties":{}},"modelId":{"type":"string"},"tokenUsage":{"type":"object","properties":{"promptTokens":{"type":"number"},"completionTokens":{"type":"number"},"totalTokens":{"type":"number"}},"required":["promptTokens","completionTokens","totalTokens"],"additionalProperties":false,"nullable":true},"generatedAt":{"type":"string"},"generationError":{"type":"string","nullable":true},"publishedAt":{"type":"string","nullable":true},"publishedBy":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","reportConfigId","communityId","runDate","status","content","dataSnapshot","modelId","tokenUsage","generatedAt","generationError","publishedAt","publishedBy","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{uidOrSlug}/reports/{reportId}/charts":{"get":{"summary":"Get Report Charts","tags":["Portfolio Reports"],"description":"Charts payload for a report — datapoints live from Postgres, scoped to the snapshot (indicator IDs + project list) frozen at generation time and the date window derived from runDate. Published reports are public; everything else requires community admin.","parameters":[{"in":"path","name":"uidOrSlug","required":true,"schema":{"type":"string","minLength":1,"maxLength":256}},{"in":"path","name":"reportId","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"indicators":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"unit":{"type":"string"},"projects":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string"},"title":{"type":"string"},"points":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"value":{"type":"number"}},"required":["date","value"],"additionalProperties":false},"maxItems":1000}},"required":["uid","title","points"],"additionalProperties":false},"maxItems":500}},"required":["id","name","unit","projects"],"additionalProperties":false},"maxItems":50},"startDate":{"type":"string"},"endDate":{"type":"string"}},"required":["indicators","startDate","endDate"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{uidOrSlug}/reports/{reportId}/publish":{"put":{"summary":"Publish Report","tags":["Portfolio Reports"],"description":"Publish a report","parameters":[{"in":"path","name":"uidOrSlug","required":true,"schema":{"type":"string","minLength":1,"maxLength":256}},{"in":"path","name":"reportId","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"reportConfigId":{"type":"string"},"communityId":{"type":"string"},"runDate":{"type":"string"},"status":{"type":"string","enum":["generating","draft","failed","published"]},"content":{"type":"string"},"dataSnapshot":{"type":"object","additionalProperties":{}},"modelId":{"type":"string"},"tokenUsage":{"type":"object","properties":{"promptTokens":{"type":"number"},"completionTokens":{"type":"number"},"totalTokens":{"type":"number"}},"required":["promptTokens","completionTokens","totalTokens"],"additionalProperties":false,"nullable":true},"generatedAt":{"type":"string"},"generationError":{"type":"string","nullable":true},"publishedAt":{"type":"string","nullable":true},"publishedBy":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","reportConfigId","communityId","runDate","status","content","dataSnapshot","modelId","tokenUsage","generatedAt","generationError","publishedAt","publishedBy","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{uidOrSlug}/reports/{reportId}/unpublish":{"put":{"summary":"Unpublish Report","tags":["Portfolio Reports"],"description":"Unpublish a report (back to draft)","parameters":[{"in":"path","name":"uidOrSlug","required":true,"schema":{"type":"string","minLength":1,"maxLength":256}},{"in":"path","name":"reportId","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"reportConfigId":{"type":"string"},"communityId":{"type":"string"},"runDate":{"type":"string"},"status":{"type":"string","enum":["generating","draft","failed","published"]},"content":{"type":"string"},"dataSnapshot":{"type":"object","additionalProperties":{}},"modelId":{"type":"string"},"tokenUsage":{"type":"object","properties":{"promptTokens":{"type":"number"},"completionTokens":{"type":"number"},"totalTokens":{"type":"number"}},"required":["promptTokens","completionTokens","totalTokens"],"additionalProperties":false,"nullable":true},"generatedAt":{"type":"string"},"generationError":{"type":"string","nullable":true},"publishedAt":{"type":"string","nullable":true},"publishedBy":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","reportConfigId","communityId","runDate","status","content","dataSnapshot","modelId","tokenUsage","generatedAt","generationError","publishedAt","publishedBy","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{uidOrSlug}/reports/{reportId}/regenerate":{"post":{"summary":"Regenerate Report","tags":["Portfolio Reports"],"description":"Dispatch a regeneration for an existing report. Returns 202 with a `generating`-status report; poll GET /reports/:reportId until status is terminal.","parameters":[{"in":"path","name":"uidOrSlug","required":true,"schema":{"type":"string","minLength":1,"maxLength":256}},{"in":"path","name":"reportId","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"}}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"reportConfigId":{"type":"string"},"communityId":{"type":"string"},"runDate":{"type":"string"},"status":{"type":"string","enum":["generating","draft","failed","published"]},"content":{"type":"string"},"dataSnapshot":{"type":"object","additionalProperties":{}},"modelId":{"type":"string"},"tokenUsage":{"type":"object","properties":{"promptTokens":{"type":"number"},"completionTokens":{"type":"number"},"totalTokens":{"type":"number"}},"required":["promptTokens","completionTokens","totalTokens"],"additionalProperties":false,"nullable":true},"generatedAt":{"type":"string"},"generationError":{"type":"string","nullable":true},"publishedAt":{"type":"string","nullable":true},"publishedBy":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","reportConfigId","communityId","runDate","status","content","dataSnapshot","modelId","tokenUsage","generatedAt","generationError","publishedAt","publishedBy","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/email-grantees/program/{programId}/emails":{"get":{"summary":"Get Grantee Emails by Program","tags":["Email Grantees"],"description":"Get all grantee contact emails for a specific program. Requires COMMUNITY_ADMIN role or higher.","parameters":[{"in":"path","name":"programId","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"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":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/email-grantees/send":{"post":{"summary":"Send Email to Grantees","tags":["Email Grantees"],"description":"Send an email to selected grantees. Requires COMMUNITY_ADMIN role or higher.","requestBody":{"content":{"application/json":{"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}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"sentCount":{"type":"number"},"failedCount":{"type":"number"}},"required":["success","sentCount","failedCount"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{communityIdOrSlug}/notification-config/test":{"post":{"summary":"Test Notification Config","tags":["Notification Config"],"description":"Test a notification provider configuration by sending a test message. Caller must be a contract owner, staff, or community admin.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"providerType":{"type":"string","enum":["TELEGRAM","SLACK"]},"chatId":{"type":"string","maxLength":2048,"nullable":true},"chatIds":{"type":"array","items":{"type":"string","maxLength":2048},"maxItems":50},"webhookUrl":{"type":"string","maxLength":2048,"nullable":true},"webhookUrls":{"type":"array","items":{"$ref":"#/properties/webhookUrl"},"maxItems":50}},"required":["providerType"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"communityIdOrSlug","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{communityIdOrSlug}/knowledge-base/sources":{"get":{"summary":"List knowledge sources for a community","tags":["Knowledge Base"],"parameters":[{"in":"query","name":"programId","required":false,"schema":{"type":"string","minLength":1,"maxLength":120}},{"in":"query","name":"scope","required":false,"schema":{"type":"string","enum":["all","community","program"]}},{"in":"path","name":"communityIdOrSlug","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^(0x[a-fA-F0-9]{64}|[a-zA-Z0-9_-]{1,128})$"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"communityId":{"type":"string"},"programId":{"type":"string","nullable":true},"kind":{"type":"string","enum":["gdrive_folder","gdrive_file","url","sitemap","pdf_url"]},"externalId":{"type":"string"},"title":{"type":"string"},"isActive":{"type":"boolean"},"paused":{"type":"boolean"},"goal":{"type":"string","nullable":true},"syncIntervalMin":{"type":"number"},"followLinks":{"type":"boolean"},"citationUrl":{"type":"string","nullable":true},"lastSyncedAt":{"type":"string","nullable":true},"lastSyncStatus":{"type":"string","enum":["syncing","success","partial","failed"],"nullable":true},"lastSyncError":{"type":"string","nullable":true},"lastSyncStats":{"type":"object","properties":{"added":{"type":"number"},"updated":{"type":"number"},"removed":{"type":"number"},"unchanged":{"type":"number"}},"additionalProperties":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","communityId","programId","kind","externalId","title","isActive","paused","goal","syncIntervalMin","followLinks","citationUrl","lastSyncedAt","lastSyncStatus","lastSyncError","lastSyncStats","createdAt","updatedAt"],"additionalProperties":false},"maxItems":100}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"post":{"summary":"Register a new knowledge source","tags":["Knowledge Base"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"programId":{"type":"string","minLength":1,"maxLength":120,"nullable":true,"default":null},"kind":{"type":"string","enum":["gdrive_folder","gdrive_file","url","sitemap","pdf_url"]},"externalId":{"type":"string","minLength":1,"maxLength":2048},"title":{"type":"string","minLength":1,"maxLength":200},"goal":{"type":"string","minLength":1,"maxLength":500,"nullable":true},"syncIntervalMin":{"type":"integer","minimum":15,"maximum":10080},"followLinks":{"type":"boolean"},"citationUrl":{"type":"string","format":"uri","maxLength":2048,"nullable":true}},"required":["kind","externalId","title"],"additionalProperties":false}}},"required":true},"parameters":[{"in":"path","name":"communityIdOrSlug","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^(0x[a-fA-F0-9]{64}|[a-zA-Z0-9_-]{1,128})$"}}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"communityId":{"type":"string"},"programId":{"type":"string","nullable":true},"kind":{"type":"string","enum":["gdrive_folder","gdrive_file","url","sitemap","pdf_url"]},"externalId":{"type":"string"},"title":{"type":"string"},"isActive":{"type":"boolean"},"paused":{"type":"boolean"},"goal":{"type":"string","nullable":true},"syncIntervalMin":{"type":"number"},"followLinks":{"type":"boolean"},"citationUrl":{"type":"string","nullable":true},"lastSyncedAt":{"type":"string","nullable":true},"lastSyncStatus":{"type":"string","enum":["syncing","success","partial","failed"],"nullable":true},"lastSyncError":{"type":"string","nullable":true},"lastSyncStats":{"type":"object","properties":{"added":{"type":"number"},"updated":{"type":"number"},"removed":{"type":"number"},"unchanged":{"type":"number"}},"additionalProperties":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","communityId","programId","kind","externalId","title","isActive","paused","goal","syncIntervalMin","followLinks","citationUrl","lastSyncedAt","lastSyncStatus","lastSyncError","lastSyncStats","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{communityIdOrSlug}/knowledge-base/sources/{sourceId}":{"get":{"summary":"Get a knowledge source by id","tags":["Knowledge Base"],"parameters":[{"in":"path","name":"communityIdOrSlug","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^(0x[a-fA-F0-9]{64}|[a-zA-Z0-9_-]{1,128})$"}},{"in":"path","name":"sourceId","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"communityId":{"type":"string"},"programId":{"type":"string","nullable":true},"kind":{"type":"string","enum":["gdrive_folder","gdrive_file","url","sitemap","pdf_url"]},"externalId":{"type":"string"},"title":{"type":"string"},"isActive":{"type":"boolean"},"paused":{"type":"boolean"},"goal":{"type":"string","nullable":true},"syncIntervalMin":{"type":"number"},"followLinks":{"type":"boolean"},"citationUrl":{"type":"string","nullable":true},"lastSyncedAt":{"type":"string","nullable":true},"lastSyncStatus":{"type":"string","enum":["syncing","success","partial","failed"],"nullable":true},"lastSyncError":{"type":"string","nullable":true},"lastSyncStats":{"type":"object","properties":{"added":{"type":"number"},"updated":{"type":"number"},"removed":{"type":"number"},"unchanged":{"type":"number"}},"additionalProperties":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","communityId","programId","kind","externalId","title","isActive","paused","goal","syncIntervalMin","followLinks","citationUrl","lastSyncedAt","lastSyncStatus","lastSyncError","lastSyncStats","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"patch":{"summary":"Update a knowledge source (title / active / sync interval)","tags":["Knowledge Base"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"goal":{"type":"string","minLength":1,"maxLength":500,"nullable":true},"externalId":{"type":"string","minLength":1,"maxLength":2048},"isActive":{"type":"boolean"},"paused":{"type":"boolean"},"syncIntervalMin":{"type":"integer","minimum":15,"maximum":10080},"followLinks":{"type":"boolean"},"citationUrl":{"type":"string","format":"uri","maxLength":2048,"nullable":true}},"additionalProperties":false}}}},"parameters":[{"in":"path","name":"communityIdOrSlug","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^(0x[a-fA-F0-9]{64}|[a-zA-Z0-9_-]{1,128})$"}},{"in":"path","name":"sourceId","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"communityId":{"type":"string"},"programId":{"type":"string","nullable":true},"kind":{"type":"string","enum":["gdrive_folder","gdrive_file","url","sitemap","pdf_url"]},"externalId":{"type":"string"},"title":{"type":"string"},"isActive":{"type":"boolean"},"paused":{"type":"boolean"},"goal":{"type":"string","nullable":true},"syncIntervalMin":{"type":"number"},"followLinks":{"type":"boolean"},"citationUrl":{"type":"string","nullable":true},"lastSyncedAt":{"type":"string","nullable":true},"lastSyncStatus":{"type":"string","enum":["syncing","success","partial","failed"],"nullable":true},"lastSyncError":{"type":"string","nullable":true},"lastSyncStats":{"type":"object","properties":{"added":{"type":"number"},"updated":{"type":"number"},"removed":{"type":"number"},"unchanged":{"type":"number"}},"additionalProperties":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","communityId","programId","kind","externalId","title","isActive","paused","goal","syncIntervalMin","followLinks","citationUrl","lastSyncedAt","lastSyncStatus","lastSyncError","lastSyncStats","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}},"delete":{"summary":"Delete a knowledge source (cascades to documents and chunks)","tags":["Knowledge Base"],"parameters":[{"in":"path","name":"communityIdOrSlug","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^(0x[a-fA-F0-9]{64}|[a-zA-Z0-9_-]{1,128})$"}},{"in":"path","name":"sourceId","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Source deleted"},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{communityIdOrSlug}/knowledge-base/sources/{sourceId}/resync":{"post":{"summary":"Mark a knowledge source as due for sync immediately","tags":["Knowledge Base"],"parameters":[{"in":"path","name":"communityIdOrSlug","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^(0x[a-fA-F0-9]{64}|[a-zA-Z0-9_-]{1,128})$"}},{"in":"path","name":"sourceId","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"triggered":{"type":"boolean"}},"required":["triggered"]}}}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/communities/{communityIdOrSlug}/knowledge-base/sources/{sourceId}/documents":{"get":{"summary":"List documents under a knowledge source","tags":["Knowledge Base"],"parameters":[{"in":"path","name":"communityIdOrSlug","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^(0x[a-fA-F0-9]{64}|[a-zA-Z0-9_-]{1,128})$"}},{"in":"path","name":"sourceId","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sourceId":{"type":"string"},"externalId":{"type":"string"},"title":{"type":"string"},"sourceUrl":{"type":"string"},"mimeType":{"type":"string"},"lastFetchedAt":{"type":"string"},"byteSize":{"type":"number"},"chunkCount":{"type":"number"},"discoveredFromId":{"type":"string","nullable":true},"deletedAt":{"type":"string","nullable":true}},"required":["id","sourceId","externalId","title","sourceUrl","mimeType","lastFetchedAt","byteSize","chunkCount","discoveredFromId","deletedAt"],"additionalProperties":false},"maxItems":500}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/sitemap/counts":{"get":{"summary":"Get Sitemap Counts","tags":["Sitemap"],"description":"Returns the total number of indexable URLs for each sitemap kind. Counts are computed from cached URL lists (TTL 3600s). Public endpoint — no authentication required.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"projects":{"type":"integer","description":"Total number of project URLs"},"impacts":{"type":"integer","description":"Total number of impact URLs"},"grants":{"type":"integer","description":"Total number of grant URLs"},"milestones":{"type":"integer","description":"Total number of milestone URLs"},"fundingPrograms":{"type":"integer","description":"Total number of funding-program URLs"}},"required":["projects","impacts","grants","milestones","fundingPrograms"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/sitemap/":{"get":{"summary":"Get Sitemap URLs","tags":["Sitemap"],"description":"Returns a paginated list of sitemap URLs for the requested kind (projects | impacts | grants | milestones | funding-programs). Full URL lists are cached in Redis (TTL 3600s); pagination is applied in memory. Public endpoint — no authentication required.","parameters":[{"in":"query","name":"kind","required":true,"schema":{"type":"string","enum":["projects","impacts","grants","milestones","funding-programs"]}},{"in":"query","name":"page","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"in":"query","name":"pageSize","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"number"}]}}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["projects","impacts","grants","milestones","funding-programs"],"description":"The sitemap kind"},"page":{"type":"integer","description":"Current page number"},"pageSize":{"type":"integer","description":"Page size"},"total":{"type":"integer","description":"Total number of URLs for this kind"},"urls":{"type":"array","items":{"type":"string"},"maxItems":5000,"description":"URL list for this page"}},"required":["kind","page","pageSize","total","urls"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}},"/v2/telegram-pair/claim":{"post":{"summary":"Claim Telegram Pairing Token","tags":["Telegram Pair"],"description":"Claim a KARMA-PAIR-* token posted in a Telegram group. Called by karma-telegram-support-bot; the token in the BODY is the only credential.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","pattern":"^KARMA-PAIR-[A-Za-z0-9_-]{10}$"},"chatId":{"type":"string","minLength":1,"maxLength":64},"chatTitle":{"type":"string","maxLength":256},"chatType":{"type":"string","enum":["group","supergroup","channel","private"]}},"required":["token","chatId","chatTitle","chatType"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"boolean","enum":[true]}},"required":["accepted"],"additionalProperties":false}}}},"400":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"404":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}},"500":{"description":"Standard V2 API error envelope returned for all 4xx/5xx responses.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Machine-friendly error category (e.g., \"Not Found\", \"Forbidden\", \"Validation Error\")."},"message":{"type":"string","description":"Human-readable error description suitable for end-user display."}},"required":["error","message"],"additionalProperties":false,"description":"Standard V2 API error envelope returned for all 4xx/5xx responses."}}}}}}}},"servers":[{"url":"https://gapapi.karmahq.xyz","description":"Production"}],"tags":[{"name":"mcp-discovery","description":"Public MCP server discovery endpoints (unauthenticated). AI agent crawlers should hit these first to enumerate available tools."},{"name":"Program Financials","description":"AUTHORITATIVE source for program funding totals. These endpoints return the same numbers the Karma UI displays: administrator-configured allocations + on-chain disbursements. When you need to answer \"how much has program X funded / paid out / has remaining?\" — use the endpoints in this tag. Do NOT compute program funding by summing funding application `approvedAmount` (intake-time approvals, see the Funding Applications tag) or legacy grant `amount` (stale per-grant attestation values)."},{"name":"Payout Disbursements","description":"Per-grant payout / disbursement records — individual on-chain transfer history and totals scoped to ONE grant. For program-level rollups across all grants in a program, use the Program Financials tag instead."},{"name":"Funding Applications","description":"Application intake and review pipeline. The `approvedAmount` field on applications is the intake-time approval value — it is NOT the amount actually allocated by the disbursement system and NOT the amount disbursed on-chain. Do NOT sum it to estimate program funding; use the Program Financials tag for that."}],"externalDocs":{"url":"https://www.karmahq.xyz/agent-setup","description":"Karma API key + MCP setup guide for AI agents and automation."}}