{"openapi":"3.1.0","info":{"title":"Feedback Owner API","version":"1.0.0","description":"Create immutable task sets, issue a separate private review packet for each reviewer, and collect owner-scoped results."},"servers":[{"url":"https://feedback.clavia.ai"}],"security":[{"ownerApiKey":[]}],"paths":{"/api/v1/me":{"get":{"operationId":"getOwner","summary":"Read the authenticated owner","responses":{"200":{"description":"Owner profile"},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/assets":{"post":{"operationId":"uploadAsset","summary":"Upload a private source file","parameters":[{"name":"X-File-Name","in":"header","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","contentEncoding":"binary"}}}},"responses":{"201":{"description":"Uploaded asset","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Asset"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/presentations/suggest":{"post":{"operationId":"suggestPresentation","summary":"Suggest a review presentation from representative data","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sampleInput"],"properties":{"version":{"type":"string"},"sampleInput":{},"sampleOutput":{}}}}}},"responses":{"200":{"description":"Suggested presentation"},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/task-sets":{"get":{"operationId":"listTaskSets","summary":"List task sets owned by the caller","responses":{"200":{"description":"Task-set summaries"},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createTaskSet","summary":"Create an immutable task set","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskSetRequest"}}}},"responses":{"201":{"description":"Task set created"},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/task-sets/{taskSetId}":{"get":{"operationId":"getTaskSet","summary":"Read an owned task-set snapshot","parameters":[{"$ref":"#/components/parameters/TaskSetId"}],"responses":{"200":{"description":"Task set"},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/task-sets/{taskSetId}/review-links":{"post":{"operationId":"createReviewLinks","summary":"Create isolated private reviewer assignments","parameters":[{"$ref":"#/components/parameters/TaskSetId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":1,"maximum":50,"default":1},"expiresAt":{"type":"integer","description":"Unix timestamp in milliseconds"}},"additionalProperties":false}}}},"responses":{"201":{"description":"New review links. Plaintext capability tokens are returned once.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewLinks"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/task-sets/{taskSetId}/packets":{"get":{"operationId":"listTaskSetPackets","summary":"List reviewer assignments for a task set","parameters":[{"$ref":"#/components/parameters/TaskSetId"}],"responses":{"200":{"description":"Packet summaries"},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/packets/{packetId}":{"get":{"operationId":"getPacket","summary":"Read an owned reviewer assignment","parameters":[{"$ref":"#/components/parameters/PacketId"}],"responses":{"200":{"description":"Packet and current drafts"},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/packets/{packetId}/submissions":{"get":{"operationId":"getPacketSubmissions","summary":"Read immutable submitted revisions","parameters":[{"$ref":"#/components/parameters/PacketId"}],"responses":{"200":{"description":"Submissions"},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/packets/{packetId}/checkpoints":{"get":{"operationId":"getPacketCheckpoints","summary":"Read current voice and DOM capture","parameters":[{"$ref":"#/components/parameters/PacketId"}],"responses":{"200":{"description":"Composed checkpoints by item"},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/packets/{packetId}/analysis":{"get":{"operationId":"analyzePacketInteractions","summary":"Reconstruct a compact interaction timeline","parameters":[{"$ref":"#/components/parameters/PacketId"},{"$ref":"#/components/parameters/AnalysisItemId"},{"$ref":"#/components/parameters/TargetTextLimit"}],"responses":{"200":{"description":"Transcript, interaction timeline, file changes, hotspots, and capture diagnostics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewAnalysis"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/packets/{packetId}/revoke":{"post":{"operationId":"revokePacket","summary":"Revoke a reviewer assignment","parameters":[{"$ref":"#/components/parameters/PacketId"}],"responses":{"200":{"description":"Packet revoked"},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"ownerApiKey":{"type":"http","scheme":"bearer","bearerFormat":"fdb_ owner API key"}},"parameters":{"TaskSetId":{"name":"taskSetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},"PacketId":{"name":"packetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},"AnalysisItemId":{"name":"itemId","in":"query","required":false,"description":"Analyze one packet item instead of the full packet.","schema":{"type":"string"}},"TargetTextLimit":{"name":"targetTextLimit","in":"query","required":false,"description":"Maximum characters kept in each reconstructed DOM target preview. Use 0 to omit target text.","schema":{"type":"integer","minimum":0,"maximum":2000,"default":240}}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object","required":["path","message"],"properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}},"Asset":{"type":"object","required":["assetId","name","mediaType","size"],"properties":{"assetId":{"type":"string","format":"uuid"},"name":{"type":"string"},"mediaType":{"type":"string"},"size":{"type":"integer"}}},"TaskSetRequest":{"type":"object","required":["task","job","items"],"properties":{"task":{"type":"object","required":["id","version","name","instructions","inputSchema","outputSchema","presentation","policy"],"properties":{"id":{"type":"string"},"version":{"type":"integer"},"name":{"type":"string"},"instructions":{"type":"string"},"inputSchema":{"type":"object","additionalProperties":true},"outputSchema":{"type":"object","additionalProperties":true},"presentation":{"$ref":"#/components/schemas/Presentation"},"policy":{}}},"job":{"type":"object","required":["id","snapshot"],"properties":{"id":{"type":"string"},"snapshot":{"type":"integer"}}},"items":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/ReviewItem"}},"assetIds":{"type":"array","items":{"type":"string","format":"uuid"}},"expiresAt":{"type":"integer","description":"Default review-link expiration as a Unix timestamp in milliseconds"}},"additionalProperties":false},"Presentation":{"type":"object","required":["version","input","output","actions","reasoning"],"properties":{"version":{"type":"string"},"input":{"type":"array","items":{"type":"object","additionalProperties":true}},"output":{"type":"object","additionalProperties":true},"actions":{"type":"array","items":{"type":"object","additionalProperties":true}},"reasoning":{"type":"object","additionalProperties":true}}},"ReviewItem":{"type":"object","required":["id","revision","input","generated"],"properties":{"id":{"type":"string"},"revision":{"type":"integer"},"input":{},"generated":{"type":"object","required":["value","provenance"],"properties":{"value":{},"provenance":{}}}}},"ReviewLinks":{"type":"object","required":["taskSetId","count","maxPerRequest","reviewLinks"],"properties":{"taskSetId":{"type":"string","format":"uuid"},"count":{"type":"integer"},"maxPerRequest":{"type":"integer"},"reviewLinks":{"type":"array","items":{"type":"object","required":["packetId","reviewUrl"],"properties":{"packetId":{"type":"string","format":"uuid"},"reviewUrl":{"type":"string","format":"uri"},"expiresAt":{"type":["integer","null"]}}}}}},"ReviewAnalysis":{"type":"object","required":["adapter","packetId","packetState","source","taskName","analyzedAt","policy","items"],"properties":{"adapter":{"type":"string","const":"review-interaction-analysis-v1"},"packetId":{"type":"string","format":"uuid"},"packetState":{"type":"string"},"source":{"type":"object","required":["taskId","taskVersion","jobId","jobSnapshot","presentationVersion","taskPolicy"],"properties":{"taskId":{"type":"string"},"taskVersion":{"type":"integer"},"jobId":{"type":"string"},"jobSnapshot":{"type":"integer"},"presentationVersion":{"type":"string"},"taskPolicy":{}}},"taskName":{"type":"string"},"analyzedAt":{"type":"integer"},"policy":{"type":"object","required":["targetTextLimit"],"properties":{"targetTextLimit":{"type":"integer"}}},"items":{"type":"array","items":{"type":"object","required":["itemId","itemRevision","state","generatedProvenance","transcript","utteranceCount","fileSelections","fileEdits","changedFiles","capture","timeline","pointerTargets","mutationTargets"],"properties":{"itemId":{"type":"string"},"itemRevision":{"type":"integer"},"state":{"type":"string"},"generatedProvenance":{},"transcript":{"type":"string"},"utteranceCount":{"type":"integer"},"fileSelections":{"type":"array","items":{"type":"string"}},"fileEdits":{"type":"array","items":{"type":"string"}},"changedFiles":{"type":"array","items":{"type":"object","additionalProperties":true}},"capture":{"type":"object","additionalProperties":true},"timeline":{"type":"array","items":{"type":"object","additionalProperties":true}},"pointerTargets":{"type":"array","items":{"type":"object","additionalProperties":true}},"mutationTargets":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}}}}