{"openapi":"3.1.1","info":{"title":"Notra API","version":"1.0.0","description":"OpenAPI schema for Notra content endpoints. Use GET /v1/status for public reachability. Error responses include recovery guidance."},"servers":[{"url":"https://api.usenotra.com","description":"Production"}],"security":[{"BearerAuth":[]}],"tags":[{"name":"Content","description":"Read content. Organization is inferred from the API key (identity.externalId)."},{"name":"Schedules","description":"Manage scheduled content generation. Organization is inferred from the API key (identity.externalId)."},{"name":"Event Triggers","description":"Manage event-based content generation triggered by GitHub webhooks. Organization is inferred from the API key (identity.externalId)."},{"name":"Chats","description":"Manage chat sessions. Organization is inferred from the API key (identity.externalId)."},{"name":"Skills","description":"Manage reusable writing skills. Organization is inferred from the API key (identity.externalId)."},{"name":"Feedback","description":"Collect and triage feedback submitted by AI agents. Agents post to the organization's feedback URL without credentials; reading and triage require an API key with feedback.read or feedback.write."}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"Send your API key in the Authorization header as Bearer API_KEY."}},"schemas":{"PublicStatusResponse":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"service":{"type":"string","enum":["Notra API"]},"version":{"type":"string"},"public":{"type":"boolean","enum":[true]},"authentication":{"type":"object","properties":{"type":{"type":"string","enum":["bearer"]},"resource_metadata":{"type":"string","format":"uri"},"guide":{"type":"string","format":"uri"}},"required":["type","resource_metadata","guide"]}},"required":["status","service","version","public","authentication"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"recovery":{"type":"string"}},"required":["error"]},"RateLimitErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"limit":{"type":"integer","minimum":1},"remaining":{"type":"integer","minimum":0},"reset":{"type":"integer"}},"required":["error","limit","remaining","reset"]},"PatchScheduleRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"sourceType":{"type":"string","enum":["cron"]},"sourceConfig":{"type":"object","properties":{"cron":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59},"dayOfWeek":{"type":"integer","minimum":0,"maximum":6},"dayOfMonth":{"type":"integer","minimum":1,"maximum":31}},"required":["frequency","hour","minute"]}},"required":["cron"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":"object","properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"]},"brandVoiceId":{"type":"string","minLength":1}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean","default":false},"lookbackWindow":{"type":"string","enum":["current_day","yesterday","last_7_days","last_14_days","last_30_days"],"default":"last_7_days"}},"required":["name","sourceType","sourceConfig","targets","outputType","enabled"]},"PatchEventTriggerRequest":{"type":"object","properties":{"sourceType":{"type":"string","enum":["github_webhook"]},"sourceConfig":{"type":"object","properties":{"eventTypes":{"type":"array","items":{"type":"string","enum":["release","push"]},"minItems":1},"includePreReleases":{"type":"boolean","default":true}},"required":["eventTypes"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":"object","properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"]},"brandVoiceId":{"type":"string","minLength":1}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean","default":false}},"required":["sourceType","sourceConfig","targets","outputType","enabled"]},"GetChatsResponse":{"type":"object","properties":{"chats":{"type":"array","items":{"$ref":"#/components/schemas/ChatSessionSummary"}}},"required":["chats"]},"ChatSessionSummary":{"type":"object","properties":{"chatId":{"type":"string"},"title":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"pinnedAt":{"type":["string","null"]},"externalChannelId":{"$ref":"#/components/schemas/ExternalChannelId"}},"required":["chatId","title","createdAt","updatedAt","pinnedAt"]},"ExternalChannelId":{"type":["object","null"],"properties":{"source":{"type":"string","enum":["discord","slack","dashboard"]},"id":{"type":"string","maxLength":200}},"required":["source"]},"GetChatResponse":{"type":"object","properties":{"chat":{"$ref":"#/components/schemas/ChatSessionSummary"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessage"}}},"required":["chat","messages"]},"ChatMessage":{},"SendChatMessageRequest":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":50000},"model":{"type":"string","enum":["auto","anthropic/claude-opus-5","anthropic/claude-opus-4.8","anthropic/claude-sonnet-5","anthropic/claude-sonnet-4.6","anthropic/claude-haiku-4.5","openai/gpt-5.4","openai/gpt-5.5"]},"enableThinking":{"type":"boolean"},"thinkingLevel":{"type":"string","enum":["off","low","medium","high"]},"timezone":{"type":"string","minLength":1,"maxLength":100},"context":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["github-repo"]},"integrationId":{"type":"string"},"owner":{"type":"string"},"repo":{"type":"string"}},"required":["type","integrationId","owner","repo"]},{"type":"object","properties":{"type":{"type":"string","enum":["linear-team"]},"integrationId":{"type":"string"},"teamName":{"type":"string"}},"required":["type","integrationId"]},{"type":"object","properties":{"type":{"type":"string","enum":["mcp-server"]},"integrationId":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["type","integrationId","name"]}]}},"externalChannelId":{"$ref":"#/components/schemas/ExternalChannelId"}},"required":["message"]},"ListSkillsResponse":{"type":"object","properties":{"skills":{"type":"array","items":{"$ref":"#/components/schemas/SkillSummary"}}},"required":["skills"]},"SkillSummary":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"isSystem":{"type":"boolean"},"updatedAt":{"type":"string"}},"required":["id","name","description","isSystem","updatedAt"]},"SkillResponse":{"type":"object","properties":{"skill":{"$ref":"#/components/schemas/Skill"}},"required":["skill"]},"Skill":{"allOf":[{"$ref":"#/components/schemas/SkillSummary"},{"type":"object","properties":{"content":{"type":"string"},"createdAt":{"type":"string"}},"required":["content","createdAt"]}]},"CreateSkillResponse":{"type":"object","properties":{"skill":{"$ref":"#/components/schemas/Skill"}},"required":["skill"]},"CreateSkillRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$","description":"Skill name. Lowercase letters, digits, and hyphens only.","example":"humanizer"},"description":{"type":"string","minLength":1,"maxLength":1000,"description":"Short description of when the skill should be used.","example":"Polish near-final drafts so they sound natural and specific."},"content":{"type":"string","minLength":1,"maxLength":200000,"description":"Full skill instructions, typically Markdown."}},"required":["name","description","content"]},"PatchSkillResponse":{"type":"object","properties":{"skill":{"$ref":"#/components/schemas/Skill"}},"required":["skill"]},"PatchSkillRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$","description":"Skill name. Lowercase letters, digits, and hyphens only.","example":"humanizer"},"description":{"type":"string","minLength":1,"maxLength":1000,"description":"Short description of when the skill should be used.","example":"Polish near-final drafts so they sound natural and specific."},"content":{"type":"string","minLength":1,"maxLength":200000,"description":"Full skill instructions, typically Markdown."}}},"DeleteSkillResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]},"SubmitFeedbackResponse":{"type":"object","properties":{"feedback":{"$ref":"#/components/schemas/Feedback"},"deduplicated":{"type":"boolean","description":"True when an existing feedback with the same idempotencyKey was returned."}},"required":["feedback","deduplicated"]},"Feedback":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":["string","null"]},"source":{"type":"string","enum":["mcp","api","sdk"],"description":"Channel the feedback arrived through.","example":"mcp"},"kind":{"type":"string","enum":["bug","feature","praise","question","other"],"description":"What kind of feedback this is.","example":"bug"},"sentiment":{"type":["string","null"],"enum":["negative","neutral","positive",null],"description":"Overall sentiment of the feedback.","example":"negative"},"status":{"type":"string","enum":["new","triaged","resolved","archived"],"description":"Triage status.","example":"new"},"title":{"type":["string","null"]},"message":{"type":"string"},"agentClient":{"type":["string","null"]},"agentModel":{"type":["string","null"]},"toolVersion":{"type":["string","null"]},"userAgent":{"type":["string","null"]},"contextUrl":{"type":["string","null"]},"externalId":{"type":["string","null"]},"idempotencyKey":{"type":["string","null"]},"metadata":{"type":["object","null"],"additionalProperties":{}},"resolvedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","projectId","source","kind","sentiment","status","title","message","agentClient","agentModel","toolVersion","userAgent","contextUrl","externalId","idempotencyKey","metadata","resolvedAt","createdAt","updatedAt"]},"SubmitFeedbackRequest":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":4000,"description":"The feedback itself.","example":"The search tool times out when the query has quotes."},"title":{"type":"string","minLength":1,"maxLength":200,"description":"Short summary. When omitted, Notra writes one.","example":"Search times out on quoted queries"},"kind":{"type":"string","enum":["bug","feature","praise","question","other"],"description":"What kind of feedback this is. When omitted, Notra classifies it.","example":"bug"},"sentiment":{"type":"string","enum":["negative","neutral","positive"],"description":"Overall sentiment. When omitted, Notra classifies it from the message.","example":"negative"},"source":{"type":"string","enum":["mcp","api","sdk"],"default":"api","description":"Channel the feedback arrived through.","example":"mcp"},"projectId":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","description":"Project to file the feedback under."},"agentClient":{"type":"string","minLength":1,"maxLength":200,"description":"The agent or client that submitted the feedback.","example":"claude-code"},"agentModel":{"type":"string","minLength":1,"maxLength":200,"example":"claude-opus-5"},"toolVersion":{"type":"string","minLength":1,"maxLength":200,"example":"1.2.0"},"userAgent":{"type":"string","minLength":1,"maxLength":2048},"contextUrl":{"type":"string","maxLength":2048,"format":"uri","description":"Page or resource the feedback is about.","example":"https://docs.example.com/api/search"},"externalId":{"type":"string","minLength":1,"maxLength":200,"description":"Your own identifier for the user or session."},"idempotencyKey":{"type":"string","minLength":1,"maxLength":200,"description":"Submitting the same key twice returns the original feedback instead of creating a duplicate."},"metadata":{"type":"object","additionalProperties":{},"description":"Arbitrary JSON attached to the feedback, up to 8 KB."}},"required":["message"]},"ListFeedbackResponse":{"type":"object","properties":{"feedback":{"type":"array","items":{"$ref":"#/components/schemas/Feedback"}},"pagination":{"type":"object","properties":{"limit":{"type":"integer","minimum":1},"currentPage":{"type":"integer","minimum":1},"nextPage":{"type":["integer","null"],"minimum":1},"previousPage":{"type":["integer","null"],"minimum":1},"totalPages":{"type":"integer","minimum":1},"totalItems":{"type":"integer","minimum":0}},"required":["limit","currentPage","nextPage","previousPage","totalPages","totalItems"]}},"required":["feedback","pagination"]},"FeedbackResponse":{"type":"object","properties":{"feedback":{"$ref":"#/components/schemas/Feedback"}},"required":["feedback"]},"UpdateFeedbackRequest":{"type":"object","properties":{"status":{"type":"string","enum":["new","triaged","resolved","archived"],"description":"Triage status.","example":"new"}},"required":["status"]},"CreateAgentSessionResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"sessionId":{"type":"string"},"continuationToken":{"type":"string"}},"required":["ok","sessionId","continuationToken"]},"CreateAgentSessionRequest":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":200000,"description":"The first user message of the session."}},"required":["message"]},"SendAgentMessageRequest":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":200000,"description":"The next user message. Omit when only answering a pending input request."},"inputResponses":{"type":"array","items":{"type":"object","properties":{"requestId":{"type":"string","minLength":1},"optionId":{"type":"string","minLength":1,"description":"The chosen option id from the input.requested event, e.g. \"approve\" or \"deny\"."}},"required":["requestId","optionId"]},"description":"Answers to pending input.requested events (tool approvals, questions) from the event stream."},"continuationToken":{"type":"string","minLength":1,"description":"The continuation token returned by the previous request for this session."}},"required":["continuationToken"]},"ListAgentChatsResponse":{"type":"object","properties":{"sessions":{"type":"array","items":{"$ref":"#/components/schemas/AgentSessionSummary"}}},"required":["sessions"]},"AgentSessionSummary":{"type":"object","properties":{"sessionId":{"type":"string"},"chatId":{"type":["string","null"]},"surface":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["sessionId","chatId","surface","status","createdAt","updatedAt"]}},"parameters":{}},"paths":{"/v1/status":{"get":{"tags":["Discovery"],"operationId":"getPublicApiStatus","summary":"Check public API reachability","security":[],"responses":{"200":{"description":"Public reachability and authentication discovery metadata for agents.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicStatusResponse"}}}}}}},"/v1/posts":{"get":{"tags":["Content"],"operationId":"listPosts","summary":"List posts","parameters":[{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort by creation date","example":"desc"},"required":false,"description":"Sort by creation date","name":"sort","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"Items per page","example":10},"required":false,"description":"Items per page","name":"limit","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1,"description":"Page number","example":1},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"string","description":"Filter by status using a comma-separated list."},"required":false,"description":"Filter by status using a comma-separated list.","name":"status","in":"query"},{"schema":{"type":"string","description":"Filter by content type using a comma-separated list."},"required":false,"description":"Filter by content type using a comma-separated list.","name":"contentType","in":"query"},{"schema":{"type":"string","description":"Filter by brand identity ID using a comma-separated list."},"required":false,"description":"Filter by brand identity ID using a comma-separated list.","name":"brandIdentityId","in":"query"}],"responses":{"200":{"description":"Posts fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":["string","null"]},"content":{"type":"string","description":"Rendered HTML for text posts. For image posts, this is the public CDN URL of the rendered image."},"htmlUrl":{"type":["string","null"],"description":"Public CDN URL of the generated HTML artifact for image posts. Null for non-image posts."},"markdown":{"type":["string","null"],"description":"Markdown source for text posts. Null for image posts."},"rawHtml":{"type":["string","null"],"description":"Legacy inline generated HTML for image posts. New generated image HTML is stored as htmlUrl. Null for non-image posts."},"recommendations":{"type":["string","null"]},"contentType":{"type":"string","enum":["changelog","linkedin_post","twitter_post","blog_post","investor_update","image"]},"sourceMetadata":{},"status":{"type":"string","enum":["draft","published"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","slug","content","htmlUrl","markdown","rawHtml","recommendations","contentType","status","createdAt","updatedAt"]}},"pagination":{"type":"object","properties":{"limit":{"type":"integer","minimum":1},"currentPage":{"type":"integer","minimum":1},"nextPage":{"type":["integer","null"],"minimum":1},"previousPage":{"type":["integer","null"],"minimum":1},"totalPages":{"type":"integer","minimum":1},"totalItems":{"type":"integer","minimum":0}},"required":["limit","currentPage","nextPage","previousPage","totalPages","totalItems"]}},"required":["organization","posts","pagination"]}}}},"400":{"description":"Invalid path params or query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/posts/{postId}":{"get":{"tags":["Content"],"operationId":"getPost","summary":"Get a single post","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"post_123"},"required":true,"in":"path","name":"postId"}],"responses":{"200":{"description":"Post fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"post":{"type":["object","null"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":["string","null"]},"content":{"type":"string","description":"Rendered HTML for text posts. For image posts, this is the public CDN URL of the rendered image."},"htmlUrl":{"type":["string","null"],"description":"Public CDN URL of the generated HTML artifact for image posts. Null for non-image posts."},"markdown":{"type":["string","null"],"description":"Markdown source for text posts. Null for image posts."},"rawHtml":{"type":["string","null"],"description":"Legacy inline generated HTML for image posts. New generated image HTML is stored as htmlUrl. Null for non-image posts."},"recommendations":{"type":["string","null"]},"contentType":{"type":"string","enum":["changelog","linkedin_post","twitter_post","blog_post","investor_update","image"]},"sourceMetadata":{},"status":{"type":"string","enum":["draft","published"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","slug","content","htmlUrl","markdown","rawHtml","recommendations","contentType","status","createdAt","updatedAt"]}},"required":["organization","post"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Post or organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Content"],"operationId":"deletePost","summary":"Delete a single post","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"post_123"},"required":true,"in":"path","name":"postId"}],"responses":{"200":{"description":"Post deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["id","organization"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Content"],"operationId":"updatePost","summary":"Update a single post","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"post_123"},"required":true,"in":"path","name":"postId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120,"example":"Ship notes for week 11"},"slug":{"type":["string","null"],"minLength":1,"maxLength":160,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","example":"ship-notes-week-11"},"markdown":{"type":"string","minLength":1,"maxLength":100000,"example":"# Ship notes\n\nWe shipped a faster editor."},"status":{"type":"string","enum":["draft","published"],"example":"published"}}}}}},"responses":{"200":{"description":"Post updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"post":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":["string","null"]},"content":{"type":"string","description":"Rendered HTML for text posts. For image posts, this is the public CDN URL of the rendered image."},"htmlUrl":{"type":["string","null"],"description":"Public CDN URL of the generated HTML artifact for image posts. Null for non-image posts."},"markdown":{"type":["string","null"],"description":"Markdown source for text posts. Null for image posts."},"rawHtml":{"type":["string","null"],"description":"Legacy inline generated HTML for image posts. New generated image HTML is stored as htmlUrl. Null for non-image posts."},"recommendations":{"type":["string","null"]},"contentType":{"type":"string","enum":["changelog","linkedin_post","twitter_post","blog_post","investor_update","image"]},"sourceMetadata":{},"status":{"type":"string","enum":["draft","published"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","slug","content","htmlUrl","markdown","rawHtml","recommendations","contentType","status","createdAt","updatedAt"]}},"required":["organization","post"]}}}},"400":{"description":"Invalid path params or request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Post slug already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 60 requests per 1 minute per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/posts/generate":{"post":{"tags":["Content"],"operationId":"createPostGeneration","summary":"Queue async post generation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contentType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"],"example":"blog_post"},"lookbackWindow":{"type":"string","enum":["current_day","yesterday","last_7_days","last_14_days","last_30_days"],"default":"last_7_days","example":"last_7_days"},"brandVoiceId":{"type":"string","minLength":1,"example":"voice_123"},"brandIdentityId":{"type":["string","null"],"minLength":1,"example":"voice_123"},"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"example":["repo_1","repo_2"],"description":"Deprecated. Use integrations.github with GitHub integration IDs instead."},"linearIntegrationIds":{"type":"array","items":{"type":"string","minLength":1},"example":["linear_integration_1"],"description":"Deprecated. Use integrations.linear with Linear integration IDs instead."},"integrations":{"type":"object","properties":{"github":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"example":["integration_1","integration_2"]},"linear":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"example":["linear_integration_1"]}}},"github":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"object","properties":{"owner":{"type":"string","minLength":1},"repo":{"type":"string","minLength":1}},"required":["owner","repo"]},"minItems":1}},"required":["repositories"],"example":{"repositories":[{"owner":"usenotra","repo":"notra"}]}},"dataPoints":{"type":"object","properties":{"includePullRequests":{"type":"boolean","default":true},"includeCommits":{"type":"boolean","default":true},"includeReleases":{"type":"boolean","default":true},"includeLinearData":{"type":"boolean","default":false}},"default":{"includePullRequests":true,"includeCommits":true,"includeReleases":true,"includeLinearData":false}},"selectedItems":{"type":"object","properties":{"commitShas":{"type":"array","items":{"type":"string"}},"pullRequestNumbers":{"type":"array","items":{"type":"object","properties":{"repositoryId":{"type":"string"},"number":{"type":"number"}},"required":["repositoryId","number"]}},"releaseTagNames":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","properties":{"repositoryId":{"type":"string"},"tagName":{"type":"string"}},"required":["repositoryId","tagName"]}]}},"linearIssueIds":{"type":"array","items":{"type":"object","properties":{"integrationId":{"type":"string"},"issueId":{"type":"string"}},"required":["integrationId","issueId"]}}}}},"required":["contentType"]}}}},"responses":{"202":{"description":"Post generation queued successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"job":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"status":{"type":"string","enum":["queued","running","completed","failed","skipped"]},"contentType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"lookbackWindow":{"type":"string","enum":["current_day","yesterday","last_7_days","last_14_days","last_30_days"]},"repositoryIds":{"type":"array","items":{"type":"string"}},"brandVoiceId":{"type":["string","null"]},"workflowRunId":{"type":["string","null"]},"postId":{"type":["string","null"]},"error":{"type":["string","null"]},"source":{"type":"string","enum":["api","dashboard"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","organizationId","status","contentType","lookbackWindow","repositoryIds","brandVoiceId","workflowRunId","postId","error","source","createdAt","updatedAt","completedAt"]}},"required":["organization","job"]}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 10 requests per 1 minute per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"503":{"description":"Content generation is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"jobId":{"type":"string"}},"required":["error"]}}}}}}},"/v1/posts/generate/{jobId}":{"get":{"tags":["Content"],"operationId":"getPostGeneration","summary":"Get async post generation status","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"job_123"},"required":true,"in":"path","name":"jobId"}],"responses":{"200":{"description":"Post generation status fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"status":{"type":"string","enum":["queued","running","completed","failed","skipped"]},"contentType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"lookbackWindow":{"type":"string","enum":["current_day","yesterday","last_7_days","last_14_days","last_30_days"]},"repositoryIds":{"type":"array","items":{"type":"string"}},"brandVoiceId":{"type":["string","null"]},"workflowRunId":{"type":["string","null"]},"postId":{"type":["string","null"]},"error":{"type":["string","null"]},"source":{"type":"string","enum":["api","dashboard"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","organizationId","status","contentType","lookbackWindow","repositoryIds","brandVoiceId","workflowRunId","postId","error","source","createdAt","updatedAt","completedAt"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"type":{"type":"string","enum":["queued","workflow_triggered","running","fetching_repositories","generating_content","post_created","completed","failed","skipped"]},"message":{"type":"string"},"createdAt":{"type":"string"},"metadata":{"type":["object","null"],"additionalProperties":{}}},"required":["id","jobId","type","message","createdAt","metadata"]}}},"required":["job","events"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Generation job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Content generation is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/brand-identities":{"get":{"tags":["Content"],"operationId":"listBrandIdentities","summary":"List available brand identities","responses":{"200":{"description":"Brand identities fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"brandIdentities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isDefault":{"type":"boolean"},"websiteUrl":{"type":"string"},"companyName":{"type":["string","null"]},"companyDescription":{"type":["string","null"]},"toneProfile":{"type":["string","null"]},"customTone":{"type":["string","null"]},"customInstructions":{"type":["string","null"]},"audience":{"type":["string","null"]},"language":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","isDefault","websiteUrl","companyName","companyDescription","toneProfile","customTone","customInstructions","audience","language","createdAt","updatedAt"]}}},"required":["organization","brandIdentities"]}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/brand-identities/generate":{"post":{"tags":["Content"],"operationId":"createBrandIdentity","summary":"Queue async brand identity generation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"example":"Notra"},"websiteUrl":{"type":"string","minLength":1,"example":"https://usenotra.com"}},"required":["websiteUrl"]}}}},"responses":{"202":{"description":"Brand identity generation queued successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"job":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"brandIdentityId":{"type":"string"},"status":{"type":"string","enum":["queued","running","completed","failed"]},"step":{"type":["string","null"],"enum":["scraping","extracting","saving",null]},"currentStep":{"type":"integer","minimum":0},"totalSteps":{"type":"integer","minimum":1},"workflowRunId":{"type":["string","null"]},"error":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","organizationId","brandIdentityId","status","step","currentStep","totalSteps","workflowRunId","error","createdAt","updatedAt","completedAt"]}},"required":["organization","job"]}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Brand identity name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 5 requests per 1 minute per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/brand-identities/generate/{jobId}":{"get":{"tags":["Content"],"operationId":"getBrandIdentityGeneration","summary":"Get async brand identity generation status","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"brand_job_123"},"required":true,"in":"path","name":"jobId"}],"responses":{"200":{"description":"Brand identity generation status fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"job":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"brandIdentityId":{"type":"string"},"status":{"type":"string","enum":["queued","running","completed","failed"]},"step":{"type":["string","null"],"enum":["scraping","extracting","saving",null]},"currentStep":{"type":"integer","minimum":0},"totalSteps":{"type":"integer","minimum":1},"workflowRunId":{"type":["string","null"]},"error":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","organizationId","brandIdentityId","status","step","currentStep","totalSteps","workflowRunId","error","createdAt","updatedAt","completedAt"]}},"required":["organization","job"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Brand identity analysis job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Brand analysis is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/brand-identities/{brandIdentityId}":{"get":{"tags":["Content"],"operationId":"getBrandIdentity","summary":"Get a single brand identity","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"required":true,"in":"path","name":"brandIdentityId"}],"responses":{"200":{"description":"Brand identity fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"brandIdentity":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"isDefault":{"type":"boolean"},"websiteUrl":{"type":"string"},"companyName":{"type":["string","null"]},"companyDescription":{"type":["string","null"]},"toneProfile":{"type":["string","null"]},"customTone":{"type":["string","null"]},"customInstructions":{"type":["string","null"]},"audience":{"type":["string","null"]},"language":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","isDefault","websiteUrl","companyName","companyDescription","toneProfile","customTone","customInstructions","audience","language","createdAt","updatedAt"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["brandIdentity","organization"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Content"],"operationId":"updateBrandIdentity","summary":"Update a single brand identity","description":"Updates brand identity fields. Pass isDefault: true to make the target brand identity the organization's default.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"required":true,"in":"path","name":"brandIdentityId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"example":"Notra"},"websiteUrl":{"type":"string","minLength":1,"example":"https://usenotra.com"},"companyName":{"type":["string","null"],"minLength":1,"maxLength":200,"example":"Notra"},"companyDescription":{"type":["string","null"],"minLength":10,"maxLength":4000,"example":"AI-native content workflows for software teams."},"toneProfile":{"type":["string","null"],"enum":["Conversational","Professional","Casual","Formal",null],"example":"Professional","description":"Set a preset tone profile. When provided without customTone, any saved custom tone is cleared."},"customTone":{"type":["string","null"],"maxLength":1000,"example":"Clear, direct, and technically confident","description":"Provide a custom tone override. Send an empty string or null to clear it."},"customInstructions":{"type":["string","null"],"maxLength":4000,"example":"Avoid hype. Prioritize concrete examples."},"audience":{"type":["string","null"],"minLength":10,"maxLength":1000,"example":"Engineering leaders and developer tooling teams."},"language":{"type":["string","null"],"enum":["English","Spanish","French","German","Portuguese","Dutch","Italian","Japanese","Korean","Chinese","Arabic","Hindi","Russian","Turkish","Polish","Swedish","Danish","Norwegian","Finnish","Czech","Romanian","Hungarian","Greek","Thai","Vietnamese","Indonesian","Ukrainian","Hebrew",null],"example":"English"},"isDefault":{"type":"boolean","enum":[true],"example":true,"description":"Set this brand identity as the organization's default. Only true is accepted."}}},"examples":{"setDefault":{"summary":"Set as default","value":{"isDefault":true}},"updateAndSetDefault":{"summary":"Rename and set as default","value":{"name":"Notra Marketing","isDefault":true}},"switchToPresetTone":{"summary":"Switch custom tone to preset","value":{"toneProfile":"Professional"}},"setCustomTone":{"summary":"Set custom tone","value":{"customTone":"Warm, sharp, and opinionated"}}}}}},"responses":{"200":{"description":"Brand identity updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"brandIdentity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isDefault":{"type":"boolean"},"websiteUrl":{"type":"string"},"companyName":{"type":["string","null"]},"companyDescription":{"type":["string","null"]},"toneProfile":{"type":["string","null"]},"customTone":{"type":["string","null"]},"customInstructions":{"type":["string","null"]},"audience":{"type":["string","null"]},"language":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","isDefault","websiteUrl","companyName","companyDescription","toneProfile","customTone","customInstructions","audience","language","createdAt","updatedAt"]}},"required":["organization","brandIdentity"]}}}},"400":{"description":"Invalid path params or request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Brand identity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Brand identity name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Content"],"operationId":"deleteBrandIdentity","summary":"Delete a single brand identity","description":"Deletes a non-default brand identity and disables any automation triggers that reference it.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"required":true,"in":"path","name":"brandIdentityId"}],"responses":{"200":{"description":"Brand identity deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"disabledSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"disabledEvents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}}},"required":["id","organization","disabledSchedules","disabledEvents"]}}}},"400":{"description":"Cannot delete the default brand identity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Brand identity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/integrations":{"get":{"tags":["Content"],"operationId":"listIntegrations","summary":"List available integrations","responses":{"200":{"description":"Integrations fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"github":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"owner":{"type":["string","null"]},"repo":{"type":["string","null"]},"defaultBranch":{"type":["string","null"]}},"required":["id","displayName","owner","repo","defaultBranch"]}},"slack":{"type":"array","items":{}},"linear":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"linearOrganizationId":{"type":"string"},"linearOrganizationName":{"type":["string","null"]},"linearTeamId":{"type":["string","null"]},"linearTeamName":{"type":["string","null"]}},"required":["id","displayName","linearOrganizationId","linearOrganizationName","linearTeamId","linearTeamName"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["github","slack","linear","organization"]}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/integrations/github":{"post":{"tags":["Content"],"operationId":"createGitHubIntegration","summary":"Create a GitHub integration","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"owner":{"type":"string","minLength":1},"repo":{"type":"string","minLength":1},"branch":{"type":["string","null"],"minLength":1},"token":{"type":["string","null"],"minLength":1}},"required":["owner","repo"]}}}},"responses":{"201":{"description":"GitHub integration created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"github":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"owner":{"type":["string","null"]},"repo":{"type":["string","null"]},"defaultBranch":{"type":["string","null"]}},"required":["id","displayName","owner","repo","defaultBranch"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["github","organization"]}}}},"400":{"description":"Invalid request body or GitHub repository access error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Repository already connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 20 requests per 1 minute per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"503":{"description":"Authentication or integration service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/integrations/{integrationId}":{"delete":{"tags":["Content"],"operationId":"deleteIntegration","summary":"Delete a single integration","description":"Deletes a GitHub or Linear integration. Any automation triggers targeting a deleted GitHub integration are disabled.","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"51c2f3aa-efdd-4e28-8e69-23fa2dfd3561"},"required":true,"in":"path","name":"integrationId"}],"responses":{"200":{"description":"Integration deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]},"disabledSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"disabledEvents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}}},"required":["id","organization","disabledSchedules","disabledEvents"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Integration not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/schedules":{"get":{"tags":["Schedules"],"operationId":"listSchedules","summary":"List schedules","parameters":[{"schema":{"type":"string","description":"Filter by repository IDs using a comma-separated list","example":"repo_123,repo_456"},"required":false,"description":"Filter by repository IDs using a comma-separated list","name":"repositoryIds","in":"query"}],"responses":{"200":{"description":"Schedules fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"schedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"sourceType":{"type":"string","enum":["cron"]},"sourceConfig":{"type":"object","properties":{"cron":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59},"dayOfWeek":{"type":"integer","minimum":0,"maximum":6},"dayOfMonth":{"type":"integer","minimum":1,"maximum":31}},"required":["frequency","hour","minute"]}},"required":["cron"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":["object","null"],"properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"]},"brandVoiceId":{"type":"string","minLength":1}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lookbackWindow":{"type":"string","enum":["current_day","yesterday","last_7_days","last_14_days","last_30_days"]}},"required":["id","organizationId","name","sourceType","sourceConfig","targets","outputType","enabled","autoPublish","createdAt","updatedAt","lookbackWindow"]}},"repositoryMap":{"type":"object","additionalProperties":{"type":"string"}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["schedules","repositoryMap","organization"]}}}},"400":{"description":"Invalid query params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to list schedules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Schedules"],"operationId":"createSchedule","summary":"Create a schedule","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"sourceType":{"type":"string","enum":["cron"]},"sourceConfig":{"type":"object","properties":{"cron":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59},"dayOfWeek":{"type":"integer","minimum":0,"maximum":6},"dayOfMonth":{"type":"integer","minimum":1,"maximum":31}},"required":["frequency","hour","minute"]}},"required":["cron"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":"object","properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"]},"brandVoiceId":{"type":"string","minLength":1}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean","default":false},"lookbackWindow":{"type":"string","enum":["current_day","yesterday","last_7_days","last_14_days","last_30_days"],"default":"last_7_days"}},"required":["name","sourceType","sourceConfig","targets","outputType","enabled"]}}}},"responses":{"201":{"description":"Schedule created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"schedule":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"sourceType":{"type":"string","enum":["cron"]},"sourceConfig":{"type":"object","properties":{"cron":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59},"dayOfWeek":{"type":"integer","minimum":0,"maximum":6},"dayOfMonth":{"type":"integer","minimum":1,"maximum":31}},"required":["frequency","hour","minute"]}},"required":["cron"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":["object","null"],"properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"]},"brandVoiceId":{"type":"string","minLength":1}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lookbackWindow":{"type":"string","enum":["current_day","yesterday","last_7_days","last_14_days","last_30_days"]}},"required":["id","organizationId","name","sourceType","sourceConfig","targets","outputType","enabled","autoPublish","createdAt","updatedAt","lookbackWindow"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["schedule","organization"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Duplicate schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to create schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/schedules/{scheduleId}":{"patch":{"tags":["Schedules"],"operationId":"updateSchedule","summary":"Update a schedule","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"sched_123"},"required":true,"in":"path","name":"scheduleId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchScheduleRequest"}}}},"responses":{"200":{"description":"Schedule updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"schedule":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"sourceType":{"type":"string","enum":["cron"]},"sourceConfig":{"type":"object","properties":{"cron":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59},"dayOfWeek":{"type":"integer","minimum":0,"maximum":6},"dayOfMonth":{"type":"integer","minimum":1,"maximum":31}},"required":["frequency","hour","minute"]}},"required":["cron"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":["object","null"],"properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"]},"brandVoiceId":{"type":"string","minLength":1}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lookbackWindow":{"type":"string","enum":["current_day","yesterday","last_7_days","last_14_days","last_30_days"]}},"required":["id","organizationId","name","sourceType","sourceConfig","targets","outputType","enabled","autoPublish","createdAt","updatedAt","lookbackWindow"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["schedule","organization"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Schedule or organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Duplicate schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to update schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Schedules"],"operationId":"deleteSchedule","summary":"Delete a schedule","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"sched_123"},"required":true,"in":"path","name":"scheduleId"}],"responses":{"200":{"description":"Schedule deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["id","organization"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Schedule or organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/event-triggers":{"get":{"tags":["Event Triggers"],"operationId":"listEventTriggers","summary":"List event triggers","parameters":[{"schema":{"type":"string","description":"Filter by repository IDs using a comma-separated list","example":"repo_123,repo_456"},"required":false,"description":"Filter by repository IDs using a comma-separated list","name":"repositoryIds","in":"query"}],"responses":{"200":{"description":"Event triggers fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"eventTriggers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"sourceType":{"type":"string","enum":["github_webhook"]},"sourceConfig":{"type":"object","properties":{"eventTypes":{"type":"array","items":{"type":"string","enum":["release","push"]},"minItems":1},"includePreReleases":{"type":"boolean","default":true}},"required":["eventTypes"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":["object","null"],"properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"]},"brandVoiceId":{"type":"string","minLength":1}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","name","sourceType","sourceConfig","targets","outputType","enabled","autoPublish","createdAt","updatedAt"]}},"repositoryMap":{"type":"object","additionalProperties":{"type":"string"}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["eventTriggers","repositoryMap","organization"]}}}},"400":{"description":"Invalid query params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to list event triggers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Event Triggers"],"operationId":"createEventTrigger","summary":"Create an event trigger","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sourceType":{"type":"string","enum":["github_webhook"]},"sourceConfig":{"type":"object","properties":{"eventTypes":{"type":"array","items":{"type":"string","enum":["release","push"]},"minItems":1},"includePreReleases":{"type":"boolean","default":true}},"required":["eventTypes"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":"object","properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"]},"brandVoiceId":{"type":"string","minLength":1}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean","default":false}},"required":["sourceType","sourceConfig","targets","outputType","enabled"]}}}},"responses":{"201":{"description":"Event trigger created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"eventTrigger":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"sourceType":{"type":"string","enum":["github_webhook"]},"sourceConfig":{"type":"object","properties":{"eventTypes":{"type":"array","items":{"type":"string","enum":["release","push"]},"minItems":1},"includePreReleases":{"type":"boolean","default":true}},"required":["eventTypes"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":["object","null"],"properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"]},"brandVoiceId":{"type":"string","minLength":1}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","name","sourceType","sourceConfig","targets","outputType","enabled","autoPublish","createdAt","updatedAt"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["eventTrigger","organization"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Duplicate event trigger","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to create event trigger","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/event-triggers/{triggerId}":{"get":{"tags":["Event Triggers"],"operationId":"getEventTrigger","summary":"Get an event trigger","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"trig_123"},"required":true,"in":"path","name":"triggerId"}],"responses":{"200":{"description":"Event trigger fetched successfully","content":{"application/json":{"schema":{"type":"object","properties":{"eventTrigger":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"sourceType":{"type":"string","enum":["github_webhook"]},"sourceConfig":{"type":"object","properties":{"eventTypes":{"type":"array","items":{"type":"string","enum":["release","push"]},"minItems":1},"includePreReleases":{"type":"boolean","default":true}},"required":["eventTypes"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":["object","null"],"properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"]},"brandVoiceId":{"type":"string","minLength":1}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","name","sourceType","sourceConfig","targets","outputType","enabled","autoPublish","createdAt","updatedAt"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["eventTrigger","organization"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Event trigger or organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to fetch event trigger","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Event Triggers"],"operationId":"updateEventTrigger","summary":"Update an event trigger","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"trig_123"},"required":true,"in":"path","name":"triggerId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchEventTriggerRequest"}}}},"responses":{"200":{"description":"Event trigger updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"eventTrigger":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"sourceType":{"type":"string","enum":["github_webhook"]},"sourceConfig":{"type":"object","properties":{"eventTypes":{"type":"array","items":{"type":"string","enum":["release","push"]},"minItems":1},"includePreReleases":{"type":"boolean","default":true}},"required":["eventTypes"]},"targets":{"type":"object","properties":{"repositoryIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["repositoryIds"]},"outputType":{"type":"string","enum":["changelog","blog_post","linkedin_post","twitter_post","image"]},"outputConfig":{"type":["object","null"],"properties":{"publishDestination":{"type":"string","enum":["webflow","framer","custom"]},"brandVoiceId":{"type":"string","minLength":1}}},"enabled":{"type":"boolean"},"autoPublish":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","name","sourceType","sourceConfig","targets","outputType","enabled","autoPublish","createdAt","updatedAt"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["eventTrigger","organization"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Event trigger or organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Duplicate event trigger","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to update event trigger","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Event Triggers"],"operationId":"deleteEventTrigger","summary":"Delete an event trigger","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"trig_123"},"required":true,"in":"path","name":"triggerId"}],"responses":{"200":{"description":"Event trigger deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"]}},"required":["id","slug","name","logo"]}},"required":["id","organization"]}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Event trigger or organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/chats":{"get":{"tags":["Chats"],"operationId":"listChats","summary":"List chats","responses":{"200":{"description":"Chats fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetChatsResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Chats"],"operationId":"createChat","summary":"Start a new chat and stream the reply","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendChatMessageRequest"}}}},"responses":{"200":{"description":"Streaming UI message stream (newline-delimited JSON chunks). Read the `X-Chat-Id` response header for the chat id, or take it from the `start` chunk's `messageMetadata.chatId`.","content":{"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden, or usage limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Chat not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 30 requests per 1 minute per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Failed to process chat request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/chats/by-external":{"get":{"tags":["Chats"],"operationId":"getChatByExternalChannel","summary":"Get a chat by external channel id","parameters":[{"schema":{"type":"string","enum":["discord","slack"],"example":"discord"},"required":true,"name":"source","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"example":"channel_123"},"required":true,"name":"id","in":"query"}],"responses":{"200":{"description":"Chat fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSessionSummary"}}}},"400":{"description":"Invalid query params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Chat not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/chats/{chatId}":{"get":{"tags":["Chats"],"operationId":"getChat","summary":"Get a single chat with messages","parameters":[{"schema":{"type":"string","minLength":1,"example":"chat_abc123"},"required":true,"name":"chatId","in":"path"}],"responses":{"200":{"description":"Chat fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetChatResponse"}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Chat not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Chats"],"operationId":"postChatMessage","summary":"Post a message to an existing chat and stream the reply","parameters":[{"schema":{"type":"string","minLength":1,"example":"chat_abc123"},"required":true,"name":"chatId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendChatMessageRequest"}}}},"responses":{"200":{"description":"Streaming UI message stream (newline-delimited JSON chunks). Read the `X-Chat-Id` response header for the chat id, or take it from the `start` chunk's `messageMetadata.chatId`.","content":{"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden, or usage limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Chat not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 30 requests per 1 minute per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Failed to process chat request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/skills":{"get":{"tags":["Skills"],"operationId":"listSkills","summary":"List skills","responses":{"200":{"description":"Skills fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSkillsResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Skills"],"operationId":"createSkill","summary":"Create a skill","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSkillRequest"}}}},"responses":{"201":{"description":"Skill created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSkillResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Skill name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/skills/{name}":{"get":{"tags":["Skills"],"operationId":"getSkill","summary":"Get a single skill","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$","description":"Skill name. Lowercase letters, digits, and hyphens only.","example":"humanizer"},"required":true,"description":"Skill name. Lowercase letters, digits, and hyphens only.","name":"name","in":"path"}],"responses":{"200":{"description":"Skill fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillResponse"}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Skills"],"operationId":"patchSkill","summary":"Update a skill","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$","description":"Skill name. Lowercase letters, digits, and hyphens only.","example":"humanizer"},"required":true,"description":"Skill name. Lowercase letters, digits, and hyphens only.","name":"name","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchSkillRequest"}}}},"responses":{"200":{"description":"Skill updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchSkillResponse"}}}},"400":{"description":"Invalid path params or request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Skill name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Skills"],"operationId":"deleteSkill","summary":"Delete a skill","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$","description":"Skill name. Lowercase letters, digits, and hyphens only.","example":"humanizer"},"required":true,"description":"Skill name. Lowercase letters, digits, and hyphens only.","name":"name","in":"path"}],"responses":{"200":{"description":"Skill deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSkillResponse"}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/feedback/{organizationSlug}":{"post":{"tags":["Feedback"],"operationId":"submitOrganizationFeedback","summary":"Submit feedback to an organization's feedback URL","description":"Record feedback from an AI agent or integration by posting to the organization's feedback URL, as shown on the Feedback page in the dashboard. No credentials are required. Limited per source IP and per organization.","security":[],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i","description":"Your organization slug, as shown in your feedback URL on the Feedback page.","example":"acme"},"required":true,"description":"Your organization slug, as shown in your feedback URL on the Feedback page.","in":"path","name":"organizationSlug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitFeedbackRequest"}}}},"responses":{"202":{"description":"Feedback accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitFeedbackResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Feedback endpoint not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 30 requests per 10 minutes per IP address, plus 200 requests per hour per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}}}}},"/v1/feedback":{"post":{"tags":["Feedback"],"operationId":"submitFeedback","summary":"Submit feedback with an API key","description":"Record feedback for the organization that owns the credential. Requires an API key with the feedback.write scope. Agents and MCP servers should post to the organization's feedback URL instead.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitFeedbackRequest"}}}},"responses":{"202":{"description":"Feedback accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitFeedbackResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 120 requests per 1 minute per credential.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["Feedback"],"operationId":"listFeedback","summary":"List feedback","parameters":[{"schema":{"type":"string","enum":["new","triaged","resolved","archived"],"description":"Triage status.","example":"new"},"required":false,"description":"Triage status.","name":"status","in":"query"},{"schema":{"type":"string","enum":["bug","feature","praise","question","other"],"description":"What kind of feedback this is.","example":"bug"},"required":false,"description":"What kind of feedback this is.","name":"kind","in":"query"},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$"},"required":false,"name":"projectId","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Items per page","example":25},"required":false,"description":"Items per page","name":"limit","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1,"description":"Page number","example":1},"required":false,"description":"Page number","name":"page","in":"query"}],"responses":{"200":{"description":"Feedback fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFeedbackResponse"}}}},"400":{"description":"Invalid query params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/feedback/{feedbackId}":{"get":{"tags":["Feedback"],"operationId":"getFeedback","summary":"Get a single feedback entry","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"fb_123"},"required":true,"in":"path","name":"feedbackId"}],"responses":{"200":{"description":"Feedback fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackResponse"}}}},"400":{"description":"Invalid path params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Feedback not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Feedback"],"operationId":"updateFeedback","summary":"Update feedback status","parameters":[{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9_-]{1,100}$","example":"fb_123"},"required":true,"in":"path","name":"feedbackId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFeedbackRequest"}}}},"responses":{"200":{"description":"Feedback updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackResponse"}}}},"400":{"description":"Invalid path params or request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Feedback not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authentication service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v2/eve/v1/session":{"post":{"tags":["Agent"],"operationId":"createAgentSession","summary":"Start a durable agent session","description":"The exact eve session protocol the Notra dashboard uses, proxied through API auth. Point any eve client (eve/client, useEveAgent) at /v2 as its host with your API key as a bearer token. Returns the session id and continuation token; stream events from GET /v2/eve/v1/session/{sessionId}/stream.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentSessionRequest"}}}},"responses":{"200":{"description":"Session created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentSessionResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden, or usage limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 30 requests per 1 minute per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Failed to check usage limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Agent session creation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Agent service is not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v2/eve/v1/session/{sessionId}":{"post":{"tags":["Agent"],"operationId":"sendAgentSessionMessage","summary":"Send a follow-up message or answer a pending input request","description":"Sends the next turn of an agent session. The server binds the session's stored continuation token, so the client-provided one is ignored. Answer input.requested events (tool approvals, questions) from the event stream via inputResponses.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"sessionId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendAgentMessageRequest"}}}},"responses":{"200":{"description":"Upstream eve response with the next continuation token for this session.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden, or usage limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"A message is already being processed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 30 requests per 1 minute per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Failed to check usage limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Agent service is not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v2/eve/v1/session/{sessionId}/stream":{"get":{"tags":["Agent"],"operationId":"streamAgentSessionEvents","summary":"Stream an agent session's events","description":"Durable, replayable eve session event stream (newline-delimited JSON). Pass startIndex to resume from a known position. Includes input.requested events for tool approvals.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"NDJSON event stream","content":{"application/x-ndjson":{"schema":{"type":"string"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden, or usage limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 30 requests per 1 minute per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"503":{"description":"Agent service is not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v2/agent-chats":{"get":{"tags":["Agent"],"operationId":"listAgentChats","summary":"List agent sessions","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Agent sessions fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAgentChatsResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden, or usage limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. This endpoint allows 30 requests per 1 minute per organization.","headers":{"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds the client should wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"503":{"description":"Agent service is not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"webhooks":{}}