{"openapi":"3.0.3","info":{"title":"Noveum API","description":"Development documentation","version":"1.0.0"},"servers":[{"url":"https://noveum.ai","description":"API server"}],"security":[{"apiKeyCookie":[],"bearerAuth":[]}],"tags":[{"name":"Default","description":"Default endpoints that are included with Better Auth by default. These endpoints are not part of any plugin."}],"paths":{"/api/admin/blog/access/candidates":{"get":{"responses":{},"operationId":"getApiAdminBlogAccessCandidates","parameters":[{"in":"query","name":"query","schema":{"type":"string","minLength":2,"maxLength":100},"required":true}]}},"/api/admin/blog/access":{"post":{"responses":{},"operationId":"postApiAdminBlogAccess","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","minLength":1}},"required":["userId"]}}}},"parameters":[]},"delete":{"responses":{},"operationId":"deleteApiAdminBlogAccess","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","minLength":1}},"required":["userId"]}}}},"parameters":[]}},"/api/admin/blog":{"get":{"responses":{},"operationId":"getApiAdminBlog","parameters":[{"in":"query","name":"page","schema":{"type":"integer","exclusiveMinimum":0,"default":1}},{"in":"query","name":"pageSize","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"in":"query","name":"locale","schema":{"type":"string","enum":["en","de"]}},{"in":"query","name":"state","schema":{"type":"string","enum":["draft","scheduled","published","archived"]}},{"in":"query","name":"query","schema":{"type":"string","minLength":1,"maxLength":255}}]},"post":{"responses":{},"operationId":"postApiAdminBlog","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"locale":{"type":"string","enum":["en","de"]},"slug":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*(?:\\/[a-z0-9]+(?:-[a-z0-9]+)*)*$","minLength":1,"maxLength":255},"title":{"type":"string","minLength":1,"maxLength":255},"excerpt":{"type":["string","null"]},"content":{"type":"string"},"authoredAt":{"type":"string","format":"date-time"},"coverImageKey":{"type":["string","null"],"maxLength":512},"authorName":{"type":["string","null"],"maxLength":255},"authorImageKey":{"type":["string","null"],"maxLength":512},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":255},"maxItems":20},"seoTitle":{"type":["string","null"],"maxLength":255},"seoDescription":{"type":["string","null"]},"seoShareImageKey":{"type":["string","null"],"maxLength":512},"seoSchema":{"type":["object","null"],"additionalProperties":{}}},"required":["locale","slug","title","content"],"additionalProperties":false}}}},"parameters":[]}},"/api/admin/blog/media/signed-upload":{"post":{"responses":{},"operationId":"postApiAdminBlogMediaSigned-upload","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","enum":["image/jpeg","image/png","image/webp","image/avif","image/gif","video/mp4","video/webm","video/ogg","video/quicktime","audio/mpeg","audio/mp4","audio/x-m4a","audio/wav","audio/x-wav","audio/wave","audio/ogg","audio/webm","audio/aac","audio/flac","application/pdf","text/plain","text/csv","application/json","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/zip","application/x-zip-compressed","application/octet-stream"]},"size":{"type":"integer","exclusiveMinimum":0,"maximum":104857600},"width":{"type":"integer","exclusiveMinimum":0,"maximum":50000},"height":{"type":"integer","exclusiveMinimum":0,"maximum":50000},"altText":{"type":"string","maxLength":500}},"required":["fileName","contentType","size"]}}}},"parameters":[]}},"/api/admin/blog/media/complete":{"post":{"responses":{},"operationId":"postApiAdminBlogMediaComplete","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","enum":["image/jpeg","image/png","image/webp","image/avif","image/gif","video/mp4","video/webm","video/ogg","video/quicktime","audio/mpeg","audio/mp4","audio/x-m4a","audio/wav","audio/x-wav","audio/wave","audio/ogg","audio/webm","audio/aac","audio/flac","application/pdf","text/plain","text/csv","application/json","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/zip","application/x-zip-compressed","application/octet-stream"]},"size":{"type":"integer","exclusiveMinimum":0,"maximum":104857600},"width":{"type":"integer","exclusiveMinimum":0,"maximum":50000},"height":{"type":"integer","exclusiveMinimum":0,"maximum":50000},"altText":{"type":"string","maxLength":500},"key":{"type":"string","pattern":"^blog\\/[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\\.(?:jpg|png|webp|avif|gif|mp4|webm|ogv|mov|mp3|m4a|wav|ogg|weba|aac|flac|pdf|txt|csv|json|doc|docx|xls|xlsx|ppt|pptx|zip|bin)$","maxLength":512}},"required":["fileName","contentType","size","key"]}}}},"parameters":[]}},"/api/admin/blog/media":{"get":{"responses":{},"operationId":"getApiAdminBlogMedia","parameters":[{"in":"query","name":"page","schema":{"type":"integer","exclusiveMinimum":0,"default":1}},{"in":"query","name":"pageSize","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"in":"query","name":"query","schema":{"type":"string","minLength":1,"maxLength":255}}]}},"/api/admin/blog/{id}":{"patch":{"responses":{},"operationId":"patchApiAdminBlogById","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"locale":{"type":"string","enum":["en","de"]},"slug":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*(?:\\/[a-z0-9]+(?:-[a-z0-9]+)*)*$","minLength":1,"maxLength":255},"title":{"type":"string","minLength":1,"maxLength":255},"excerpt":{"type":["string","null"]},"content":{"type":"string"},"authoredAt":{"type":"string","format":"date-time"},"coverImageKey":{"type":["string","null"],"maxLength":512},"authorName":{"type":["string","null"],"maxLength":255},"authorImageKey":{"type":["string","null"],"maxLength":512},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":255},"maxItems":20},"seoTitle":{"type":["string","null"],"maxLength":255},"seoDescription":{"type":["string","null"]},"seoShareImageKey":{"type":["string","null"],"maxLength":512},"seoSchema":{"type":["object","null"],"additionalProperties":{}},"expectedVersion":{"type":"integer","exclusiveMinimum":0}},"required":["expectedVersion"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]},"delete":{"responses":{},"operationId":"deleteApiAdminBlogById","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","exclusiveMinimum":0}},"required":["expectedVersion"]}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/api/admin/blog/{id}/translations":{"post":{"responses":{},"operationId":"postApiAdminBlogByIdTranslations","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"locale":{"type":"string","enum":["en","de"]},"slug":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*(?:\\/[a-z0-9]+(?:-[a-z0-9]+)*)*$","minLength":1,"maxLength":255}},"required":["locale","slug"]}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/api/admin/blog/{id}/previews":{"post":{"responses":{},"operationId":"postApiAdminBlogByIdPreviews","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","exclusiveMinimum":0},"expiresAt":{"type":"string","format":"date-time"}},"required":["expectedVersion","expiresAt"]}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/api/admin/blog/{id}/previews/{tokenId}/revoke":{"post":{"responses":{},"operationId":"postApiAdminBlogByIdPreviewsByTokenIdRevoke","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"tokenId","schema":{"type":"string","minLength":1},"required":true}]}},"/api/admin/blog/{id}/publish":{"post":{"responses":{},"operationId":"postApiAdminBlogByIdPublish","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","exclusiveMinimum":0},"publishedAt":{"type":"string","format":"date-time"}},"required":["expectedVersion"]}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/api/admin/blog/{id}/unpublish":{"post":{"responses":{},"operationId":"postApiAdminBlogByIdUnpublish","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","exclusiveMinimum":0}},"required":["expectedVersion"]}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/api/admin/blog/{id}/restore/{version}":{"post":{"responses":{},"operationId":"postApiAdminBlogByIdRestoreByVersion","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"version","schema":{"type":"integer","exclusiveMinimum":0},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","exclusiveMinimum":0}},"required":["expectedVersion"]}}}}}},"/api/admin/blog/{id}/delete":{"delete":{"responses":{},"operationId":"deleteApiAdminBlogByIdDelete","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","exclusiveMinimum":0}},"required":["expectedVersion"]}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/api/health":{"get":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}}},"operationId":"getApiHealth","tags":["Web"],"summary":"Simple public health probe","description":"Lightweight JSON status (not the same as `/api/health`, which checks Postgres, ClickHouse, and Redis).","parameters":[]}},"/api/telemetry/metrics":{"get":{"responses":{"200":{"description":"Returns project metrics"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Access denied"},"404":{"description":"Not found"},"408":{"description":"Request timeout"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryMetrics","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"startTime","schema":{"type":"string"}},{"in":"query","name":"endTime","schema":{"type":"string"}},{"in":"query","name":"project","schema":{"type":"string"}},{"in":"query","name":"interval","schema":{"type":"string","enum":["minute","hour","day","week","month","quarter","year"]}},{"in":"query","name":"timeZone","schema":{"type":"string"}},{"in":"query","name":"autoDetectInterval","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"in":"query","name":"provider","schema":{"type":"string"}},{"in":"query","name":"model","schema":{"type":"string"}}],"tags":["Telemetry"],"summary":"Get project metrics","description":"Get project metrics"}},"/api/telemetry/metrics/with-trends":{"get":{"responses":{"200":{"description":"Returns project metrics with trend data"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryMetricsWith-trends","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"startTime","schema":{"type":"string"}},{"in":"query","name":"endTime","schema":{"type":"string"}},{"in":"query","name":"project","schema":{"type":"string"}},{"in":"query","name":"interval","schema":{"type":"string","enum":["minute","hour","day","week","month","quarter","year"]}},{"in":"query","name":"timeZone","schema":{"type":"string"}},{"in":"query","name":"autoDetectInterval","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"in":"query","name":"provider","schema":{"type":"string"}},{"in":"query","name":"model","schema":{"type":"string"}}],"tags":["Telemetry"],"summary":"Get project metrics with trends","description":"Get project metrics with trends"}},"/api/telemetry/metrics/model-usage":{"get":{"responses":{"200":{"description":"Returns model usage data"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Access denied"},"404":{"description":"Not found"},"408":{"description":"Request timeout"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryMetricsModel-usage","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"startTime","schema":{"type":"string"}},{"in":"query","name":"endTime","schema":{"type":"string"}},{"in":"query","name":"project","schema":{"type":"string"}},{"in":"query","name":"interval","schema":{"type":"string","enum":["minute","hour","day","week","month","quarter","year"]}},{"in":"query","name":"timeZone","schema":{"type":"string"}},{"in":"query","name":"autoDetectInterval","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"in":"query","name":"provider","schema":{"type":"string"}},{"in":"query","name":"model","schema":{"type":"string"}}],"tags":["Telemetry"],"summary":"Get model usage metrics","description":"Get model usage metrics"}},"/api/telemetry/metrics/slowest-requests":{"get":{"responses":{"200":{"description":"Returns slowest requests data"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryMetricsSlowest-requests","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"startTime","schema":{"type":"string"}},{"in":"query","name":"endTime","schema":{"type":"string"}},{"in":"query","name":"project","schema":{"type":"string"}},{"in":"query","name":"interval","schema":{"type":"string","enum":["minute","hour","day","week","month","quarter","year"]}},{"in":"query","name":"timeZone","schema":{"type":"string"}},{"in":"query","name":"autoDetectInterval","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"in":"query","name":"provider","schema":{"type":"string"}},{"in":"query","name":"model","schema":{"type":"string"}}],"tags":["Telemetry"],"summary":"Get slowest requests","description":"Get slowest requests"}},"/api/telemetry/metrics/dashboard":{"get":{"responses":{"200":{"description":"Returns dashboard metrics data"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Access denied"},"404":{"description":"Not found"},"408":{"description":"Request timeout"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryMetricsDashboard","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"startTime","schema":{"type":"string"}},{"in":"query","name":"endTime","schema":{"type":"string"}},{"in":"query","name":"project","schema":{"type":"string"}},{"in":"query","name":"interval","schema":{"type":"string","enum":["minute","hour","day","week","month","quarter","year"]}},{"in":"query","name":"timeZone","schema":{"type":"string"}},{"in":"query","name":"autoDetectInterval","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"in":"query","name":"provider","schema":{"type":"string"}},{"in":"query","name":"model","schema":{"type":"string"}}],"tags":["Telemetry"],"summary":"Get dashboard metrics","description":"Get dashboard metrics"}},"/api/telemetry/metrics/top-projects-api":{"get":{"responses":{"200":{"description":"Returns top projects API data"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryMetricsTop-projects-api","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"startTime","schema":{"type":"string"}},{"in":"query","name":"endTime","schema":{"type":"string"}},{"in":"query","name":"project","schema":{"type":"string"}},{"in":"query","name":"interval","schema":{"type":"string","enum":["minute","hour","day","week","month","quarter","year"]}},{"in":"query","name":"timeZone","schema":{"type":"string"}},{"in":"query","name":"autoDetectInterval","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"in":"query","name":"provider","schema":{"type":"string"}},{"in":"query","name":"model","schema":{"type":"string"}}],"tags":["Telemetry"],"summary":"Get top projects API data","description":"Get top projects API data"}},"/api/telemetry/metrics/top-projects-tokens":{"get":{"responses":{"200":{"description":"Returns top projects tokens data"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryMetricsTop-projects-tokens","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"startTime","schema":{"type":"string"}},{"in":"query","name":"endTime","schema":{"type":"string"}},{"in":"query","name":"project","schema":{"type":"string"}},{"in":"query","name":"interval","schema":{"type":"string","enum":["minute","hour","day","week","month","quarter","year"]}},{"in":"query","name":"timeZone","schema":{"type":"string"}},{"in":"query","name":"autoDetectInterval","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"in":"query","name":"provider","schema":{"type":"string"}},{"in":"query","name":"model","schema":{"type":"string"}}],"tags":["Telemetry"],"summary":"Get top projects tokens data","description":"Get top projects tokens data"}},"/api/telemetry/metrics/recent-errors":{"get":{"responses":{"200":{"description":"Returns recent errors data"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryMetricsRecent-errors","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"startTime","schema":{"type":"string"}},{"in":"query","name":"endTime","schema":{"type":"string"}},{"in":"query","name":"project","schema":{"type":"string"}},{"in":"query","name":"interval","schema":{"type":"string","enum":["minute","hour","day","week","month","quarter","year"]}},{"in":"query","name":"timeZone","schema":{"type":"string"}},{"in":"query","name":"autoDetectInterval","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"in":"query","name":"provider","schema":{"type":"string"}},{"in":"query","name":"model","schema":{"type":"string"}}],"tags":["Telemetry"],"summary":"Get recent errors","description":"Get recent errors"}},"/api/telemetry/metrics/error-rate":{"get":{"responses":{"200":{"description":"Returns error rate data"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryMetricsError-rate","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"startTime","schema":{"type":"string"}},{"in":"query","name":"endTime","schema":{"type":"string"}},{"in":"query","name":"project","schema":{"type":"string"}},{"in":"query","name":"interval","schema":{"type":"string","enum":["minute","hour","day","week","month","quarter","year"]}},{"in":"query","name":"timeZone","schema":{"type":"string"}},{"in":"query","name":"autoDetectInterval","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"in":"query","name":"provider","schema":{"type":"string"}},{"in":"query","name":"model","schema":{"type":"string"}}],"tags":["Telemetry"],"summary":"Get error rate","description":"Get error rate"}},"/api/telemetry/metrics/cost-trends-per-project":{"get":{"responses":{"200":{"description":"Returns cost trends per project data"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryMetricsCost-trends-per-project","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"startTime","schema":{"type":"string"}},{"in":"query","name":"endTime","schema":{"type":"string"}},{"in":"query","name":"project","schema":{"type":"string"}},{"in":"query","name":"interval","schema":{"type":"string","enum":["minute","hour","day","week","month","quarter","year"]}},{"in":"query","name":"timeZone","schema":{"type":"string"}},{"in":"query","name":"autoDetectInterval","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"in":"query","name":"provider","schema":{"type":"string"}},{"in":"query","name":"model","schema":{"type":"string"}}],"tags":["Telemetry"],"summary":"Get cost trends per project","description":"Get cost trends per project"}},"/api/telemetry/metrics/usage-trends-per-project":{"get":{"responses":{"200":{"description":"Returns usage trends per project data"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryMetricsUsage-trends-per-project","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"startTime","schema":{"type":"string"}},{"in":"query","name":"endTime","schema":{"type":"string"}},{"in":"query","name":"project","schema":{"type":"string"}},{"in":"query","name":"interval","schema":{"type":"string","enum":["minute","hour","day","week","month","quarter","year"]}},{"in":"query","name":"timeZone","schema":{"type":"string"}},{"in":"query","name":"autoDetectInterval","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"in":"query","name":"provider","schema":{"type":"string"}},{"in":"query","name":"model","schema":{"type":"string"}}],"tags":["Telemetry"],"summary":"Get usage trends per project","description":"Get usage trends per project"}},"/api/telemetry/metrics/requests-trends-per-project":{"get":{"responses":{"200":{"description":"Returns requests trends per project data"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryMetricsRequests-trends-per-project","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"startTime","schema":{"type":"string"}},{"in":"query","name":"endTime","schema":{"type":"string"}},{"in":"query","name":"project","schema":{"type":"string"}},{"in":"query","name":"interval","schema":{"type":"string","enum":["minute","hour","day","week","month","quarter","year"]}},{"in":"query","name":"timeZone","schema":{"type":"string"}},{"in":"query","name":"autoDetectInterval","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"in":"query","name":"provider","schema":{"type":"string"}},{"in":"query","name":"model","schema":{"type":"string"}}],"tags":["Telemetry"],"summary":"Get requests trends per project","description":"Get requests trends per project"}},"/api/telemetry/metrics/latencyByProvider":{"get":{"responses":{"200":{"description":"Returns latency by provider data"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryMetricsLatencyByProvider","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"startTime","schema":{"type":"string"}},{"in":"query","name":"endTime","schema":{"type":"string"}},{"in":"query","name":"project","schema":{"type":"string"}},{"in":"query","name":"interval","schema":{"type":"string","enum":["minute","hour","day","week","month","quarter","year"]}},{"in":"query","name":"timeZone","schema":{"type":"string"}},{"in":"query","name":"autoDetectInterval","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"in":"query","name":"provider","schema":{"type":"string"}},{"in":"query","name":"model","schema":{"type":"string"}}],"tags":["Telemetry"],"summary":"Get latency by provider","description":"Get latency by provider"}},"/api/telemetry/metrics/costByProvider":{"get":{"responses":{"200":{"description":"Returns cost by provider data"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryMetricsCostByProvider","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"startTime","schema":{"type":"string"}},{"in":"query","name":"endTime","schema":{"type":"string"}},{"in":"query","name":"project","schema":{"type":"string"}},{"in":"query","name":"interval","schema":{"type":"string","enum":["minute","hour","day","week","month","quarter","year"]}},{"in":"query","name":"timeZone","schema":{"type":"string"}},{"in":"query","name":"autoDetectInterval","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"in":"query","name":"provider","schema":{"type":"string"}},{"in":"query","name":"model","schema":{"type":"string"}}],"tags":["Telemetry"],"summary":"Get cost by provider","description":"Get cost by provider"}},"/api/telemetry/metrics/usage-trends":{"get":{"responses":{"200":{"description":"Returns usage trends data for charts"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Access denied"},"404":{"description":"Not found"},"408":{"description":"Request timeout"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryMetricsUsage-trends","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"startTime","schema":{"type":"string"}},{"in":"query","name":"endTime","schema":{"type":"string"}},{"in":"query","name":"project","schema":{"type":"string"}},{"in":"query","name":"interval","schema":{"type":"string","enum":["minute","hour","day","week","month","quarter","year"]}},{"in":"query","name":"timeZone","schema":{"type":"string"}},{"in":"query","name":"autoDetectInterval","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"in":"query","name":"provider","schema":{"type":"string"}},{"in":"query","name":"model","schema":{"type":"string"}}],"tags":["Telemetry"],"summary":"Get usage trends time series","description":"Get usage trends time series"}},"/api/telemetry/metrics/cost-trends":{"get":{"responses":{"200":{"description":"Returns cost trends data for charts"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Access denied"},"404":{"description":"Not found"},"408":{"description":"Request timeout"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryMetricsCost-trends","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"startTime","schema":{"type":"string"}},{"in":"query","name":"endTime","schema":{"type":"string"}},{"in":"query","name":"project","schema":{"type":"string"}},{"in":"query","name":"interval","schema":{"type":"string","enum":["minute","hour","day","week","month","quarter","year"]}},{"in":"query","name":"timeZone","schema":{"type":"string"}},{"in":"query","name":"autoDetectInterval","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"in":"query","name":"provider","schema":{"type":"string"}},{"in":"query","name":"model","schema":{"type":"string"}}],"tags":["Telemetry"],"summary":"Get cost trends time series","description":"Get cost trends time series"}},"/api/telemetry/metrics/latency-trends":{"get":{"responses":{"200":{"description":"Returns latency trends data for charts"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Access denied"},"404":{"description":"Not found"},"408":{"description":"Request timeout"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryMetricsLatency-trends","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"startTime","schema":{"type":"string"}},{"in":"query","name":"endTime","schema":{"type":"string"}},{"in":"query","name":"project","schema":{"type":"string"}},{"in":"query","name":"interval","schema":{"type":"string","enum":["minute","hour","day","week","month","quarter","year"]}},{"in":"query","name":"timeZone","schema":{"type":"string"}},{"in":"query","name":"autoDetectInterval","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"in":"query","name":"provider","schema":{"type":"string"}},{"in":"query","name":"model","schema":{"type":"string"}}],"tags":["Telemetry"],"summary":"Get latency trends time series","description":"Get latency trends time series"}},"/api/telemetry/metrics/requests-trends":{"get":{"responses":{"200":{"description":"Returns request trends data for charts"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Access denied"},"404":{"description":"Not found"},"408":{"description":"Request timeout"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryMetricsRequests-trends","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"startTime","schema":{"type":"string"}},{"in":"query","name":"endTime","schema":{"type":"string"}},{"in":"query","name":"project","schema":{"type":"string"}},{"in":"query","name":"interval","schema":{"type":"string","enum":["minute","hour","day","week","month","quarter","year"]}},{"in":"query","name":"timeZone","schema":{"type":"string"}},{"in":"query","name":"autoDetectInterval","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"in":"query","name":"provider","schema":{"type":"string"}},{"in":"query","name":"model","schema":{"type":"string"}}],"tags":["Telemetry"],"summary":"Get request trends time series","description":"Get request trends time series"}},"/api/telemetry/metrics/quality-summary":{"get":{"responses":{"200":{"description":"Returns quality summary data"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryMetricsQuality-summary","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"},"required":false},{"in":"query","name":"startTime","schema":{"type":"string"},"required":true},{"in":"query","name":"endTime","schema":{"type":"string"},"required":true},{"in":"query","name":"project","schema":{"type":"string"},"required":false},{"in":"query","name":"interval","schema":{"type":"string","enum":["minute","hour","day","week","month","quarter","year"]},"required":false}],"tags":["Telemetry"],"summary":"Get quality summary KPIs","description":"Get quality summary KPIs"}},"/api/telemetry/metrics/activity-pipeline":{"get":{"responses":{"200":{"description":"Returns activity pipeline data"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryMetricsActivity-pipeline","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"},"required":false},{"in":"query","name":"startTime","schema":{"type":"string"},"required":true},{"in":"query","name":"endTime","schema":{"type":"string"},"required":true},{"in":"query","name":"project","schema":{"type":"string"},"required":false},{"in":"query","name":"interval","schema":{"type":"string","enum":["minute","hour","day","week","month","quarter","year"]},"required":false}],"tags":["Telemetry"],"summary":"Get activity pipeline trends","description":"Get activity pipeline trends"}},"/api/telemetry/metrics/top-5-failed-scorers":{"get":{"responses":{"200":{"description":"Returns top 5 failed scorers data"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryMetricsTop-5-failed-scorers","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"},"required":false},{"in":"query","name":"startTime","schema":{"type":"string"},"required":true},{"in":"query","name":"endTime","schema":{"type":"string"},"required":true},{"in":"query","name":"project","schema":{"type":"string"},"required":false},{"in":"query","name":"interval","schema":{"type":"string","enum":["minute","hour","day","week","month","quarter","year"]},"required":false}],"tags":["Telemetry"],"summary":"Get top 5 failed scorers trends","description":"Get top 5 failed scorers trends"}},"/api/telemetry/metrics/scorer-failure-rates":{"get":{"responses":{"200":{"description":"Returns scorer failure rate data"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryMetricsScorer-failure-rates","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"},"required":false},{"in":"query","name":"startTime","schema":{"type":"string"},"required":true},{"in":"query","name":"endTime","schema":{"type":"string"},"required":true},{"in":"query","name":"project","schema":{"type":"string"},"required":false},{"in":"query","name":"interval","schema":{"type":"string","enum":["minute","hour","day","week","month","quarter","year"]},"required":false}],"tags":["Telemetry"],"summary":"Get scorer failure rate trends","description":"Get scorer failure rate trends"}},"/api/telemetry/metrics/hallucination-rate":{"get":{"responses":{"200":{"description":"Returns hallucination rate trends"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryMetricsHallucination-rate","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"},"required":false},{"in":"query","name":"startTime","schema":{"type":"string"},"required":true},{"in":"query","name":"endTime","schema":{"type":"string"},"required":true},{"in":"query","name":"project","schema":{"type":"string"},"required":false},{"in":"query","name":"interval","schema":{"type":"string","enum":["minute","hour","day","week","month","quarter","year"]},"required":false}],"tags":["Telemetry"],"summary":"Get the share of traces flagged by hallucination scorers","description":"Get the share of traces flagged by hallucination scorers"}},"/api/telemetry/rollup/trigger":{"post":{"responses":{"200":{"description":"Rollup enqueued or already running"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiTelemetryRollupTrigger","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}}],"tags":["Telemetry"],"summary":"Trigger an immediate analytics rollup for the organization","description":"Trigger an immediate analytics rollup for the organization"}},"/api/telemetry/rollup/status":{"get":{"responses":{"200":{"description":"Returns rollup status"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryRollupStatus","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}}],"tags":["Telemetry"],"summary":"Get the analytics rollup status for the organization","description":"Get the analytics rollup status for the organization"}},"/api/v1/status":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized - Invalid API key"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"429":{"description":"Rate limit exceeded"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Status","tags":["Status"],"summary":"Get API status and usage statistics for the organization","description":"Get API status and usage statistics for the organization","parameters":[]}},"/api/v1/onboarding/status":{"get":{"responses":{"200":{"description":"Onboarding status payload","content":{"application/json":{"schema":{"type":"object","properties":{"currentStep":{"type":"string"},"completedAt":{"type":["string","null"]},"primaryProjectId":{"type":["string","null"]},"mapperStatus":{"type":["string","null"]},"mapperAttempts":{"type":"number"},"buildType":{"type":["string","null"]},"traceProgress":{"type":["object","null"],"properties":{"count":{"type":"integer","minimum":0},"threshold":{"type":"integer","minimum":1}},"required":["count","threshold"]},"recommendScorersJobId":{"type":["string","null"]},"evalJobId":{"type":["string","null"]},"evalProgress":{"type":["object","null"],"properties":{"evalJobId":{"type":"string"},"evalJobRunId":{"type":["string","null"]},"status":{"type":"string","enum":["queued","processing","completed","failed"]},"itemsProcessed":{"type":"number"},"itemsFailed":{"type":"number"},"totalItems":{"type":["number","null"]},"startedAt":{"type":["string","null"]},"endedAt":{"type":["string","null"]}},"required":["evalJobId","evalJobRunId","status","itemsProcessed","itemsFailed","totalItems","startedAt","endedAt"]},"novaPilotRunId":{"type":["string","null"]},"novaPilotProgress":{"type":["object","null"],"properties":{"novaPilotRunId":{"type":"string"},"status":{"type":"string","enum":["queued","processing","completed","failed"]},"startedAt":{"type":["string","null"]},"endedAt":{"type":["string","null"]}},"required":["novaPilotRunId","status","startedAt","endedAt"]},"reportUrl":{"type":["string","null"]},"externalSetupDetected":{"type":"boolean"},"externalSetupProjectId":{"type":["string","null"]}},"required":["currentStep","completedAt","primaryProjectId","mapperStatus","mapperAttempts","buildType","traceProgress","recommendScorersJobId","evalJobId","evalProgress","novaPilotRunId","novaPilotProgress","reportUrl","externalSetupDetected","externalSetupProjectId"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Missing or invalid organizationSlug query parameter","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1OnboardingStatus","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"},"required":true}],"tags":["Onboarding"],"summary":"Get organization onboarding status (session auth)","description":"Returns the current onboarding step for the organization"}},"/api/v1/onboarding/build-type":{"post":{"responses":{"200":{"description":"Build type saved","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid JSON body","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1OnboardingBuild-type","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"organizationSlug":{"type":"string","minLength":1},"buildType":{"type":"string","enum":["chatbot","voice_agent","workflow"]}},"required":["organizationSlug","buildType"]}}},"required":true},"parameters":[],"tags":["Onboarding"],"summary":"Set onboarding build type (session auth)","description":"Stores the user's chosen build type on the organization onboarding record."}},"/api/v1/onboarding/integration-done":{"post":{"responses":{"200":{"description":"Onboarding advanced (or already past integration)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"advanced":{"type":"boolean"},"currentStep":{"type":"string"}},"required":["success","advanced","currentStep"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Organization or onboarding record not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1OnboardingIntegration-done","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"},"required":true}],"tags":["Onboarding"],"summary":"Mark integration step as done (session auth)","description":"User-driven advance from INTEGRATION → TRACES. Idempotent: if the org has already advanced past INTEGRATION, returns the current step without changing it."}},"/api/v1/onboarding/eval/run":{"post":{"responses":{"200":{"description":"Eval job created and triggered","content":{"application/json":{"schema":{"type":"object","properties":{"evalJobId":{"type":"string"},"evalJobRunId":{"type":"string"},"chunksEnqueued":{"type":"number"}},"required":["evalJobId","evalJobRunId","chunksEnqueued"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Invalid onboarding state or eval already running","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"evalJobId":{"type":"string"}},"required":["error"]}}}},"422":{"description":"Unprocessable entity"},"500":{"description":"Dataset not found or eval trigger failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"operationId":"postApiV1OnboardingEvalRun","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"organizationSlug":{"type":"string","minLength":1},"scorerConfigs":{"type":"array","items":{"type":"object","properties":{"scorerId":{"type":"string"},"scorerType":{"type":"string"},"scorerName":{"type":"string"},"threshold":{"type":"number"},"instruction":{"type":"string"},"llmConfig":{"type":"object","properties":{"provider":{"type":"string"},"modelName":{"type":"string"},"temperature":{"type":"number"},"providerId":{"type":"string"}}}},"required":["scorerId","scorerType","scorerName"]},"minItems":1}},"required":["organizationSlug","scorerConfigs"]}}},"required":true},"parameters":[],"tags":["Onboarding"],"summary":"Create and trigger evaluation job for onboarding","description":"Creates an eval job and triggers a full dataset scan. Idempotent on the create side: if evalJobId already exists, returns 409 with the existing ID so the client can recover."}},"/api/v1/onboarding/demo-data":{"post":{"responses":{"200":{"description":"Demo seed queued or already present","content":{"application/json":{"schema":{"type":"object","properties":{"queued":{"type":"boolean"},"alreadySeeded":{"type":"boolean"},"projectId":{"type":"string"}},"required":["queued","alreadySeeded","projectId"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1OnboardingDemo-data","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"organizationSlug":{"type":"string","minLength":1}},"required":["organizationSlug"]}}},"required":true},"parameters":[],"tags":["Onboarding"],"summary":"Seed the demo project for an organization (session auth)","description":"Queues the demo seed worker, which creates the Demo project with sample traces, a dataset, an ETL job and scorer results. Idempotent: returns alreadySeeded when the demo project exists."}},"/api/v1/onboarding/demo-data/status":{"get":{"responses":{"200":{"description":"Demo seeding status","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["none","available","seeding","ready","failed"]},"progress":{"type":"number","minimum":0,"maximum":100},"projectId":{"type":"string"}},"required":["status","progress","projectId"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1OnboardingDemo-dataStatus","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"},"required":true}],"tags":["Onboarding"],"summary":"Demo data seeding status (session auth)","description":"Drives the seeding progress banner: 'seeding' while the worker runs, 'ready' once the demo data is present."}},"/api/v1/traces":{"post":{"responses":{"200":{"description":"Batch traces queued","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"queued_count":{"type":"integer"},"message":{"type":"string"},"timestamp":{"type":"string"},"processing_time_ms":{"type":"number"},"job_id":{"type":"string"},"job_ids":{"type":"array","items":{"type":"string"}},"job_count":{"type":"integer"}},"required":["success","queued_count","message","timestamp","processing_time_ms"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid request format","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"]},"timestamp":{"type":"string"}},"required":["success","error","timestamp"]}}}},"401":{"description":"Unauthorized - Invalid API key"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"429":{"description":"Rate limit exceeded"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Traces","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"traces":{"type":"array","items":{"type":"object","properties":{"trace_id":{"type":"string"},"name":{"type":"string"},"start_time":{"type":"string"},"end_time":{"type":"string"},"duration_ms":{"type":"number","minimum":0},"status":{"type":"string","enum":["ok","error","timeout"]},"status_message":{"type":["string","null"]},"span_count":{"type":"integer","minimum":0},"error_count":{"type":"integer","minimum":0,"default":0},"project":{"type":"string"},"environment":{"type":"string","default":"production"},"sdk":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"}},"required":["name","version"]},"attributes":{"type":"object","additionalProperties":{},"default":{}},"metadata":{"type":"object","properties":{"user_id":{"type":["string","null"]},"session_id":{"type":["string","null"]},"request_id":{"type":["string","null"]},"tags":{"type":"object","additionalProperties":{},"default":{}},"custom_attributes":{"type":"object","additionalProperties":{},"default":{}}},"default":{}},"service_version":{"type":"string"},"spans":{"type":"array","items":{"type":"object","properties":{"span_id":{"type":"string"},"trace_id":{"type":"string"},"parent_span_id":{"type":["string","null"]},"name":{"type":"string"},"start_time":{"type":"string"},"end_time":{"type":"string"},"duration_ms":{"type":"number","minimum":0},"status":{"type":"string","enum":["ok","error","timeout"]},"status_message":{"type":["string","null"]},"attributes":{"type":"object","additionalProperties":{},"default":{}},"events":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"timestamp":{"type":"string"},"attributes":{"type":"object","additionalProperties":{}}},"required":["name","timestamp"]},"default":[]},"links":{"type":"array","items":{"type":"object","properties":{"trace_id":{"type":"string"},"span_id":{"type":"string"},"attributes":{"type":"object","additionalProperties":{}}},"required":["trace_id","span_id"]},"default":[]}},"required":["span_id","trace_id","name","start_time","end_time","duration_ms","status"]}}},"required":["name","start_time","end_time","duration_ms","status","span_count","project","sdk","spans"]},"minItems":1,"maxItems":1000},"timestamp":{"type":"number"}},"required":["traces"]}}},"required":true},"parameters":[],"tags":["Traces"],"summary":"Ingest batch traces","description":"Ingest multiple traces in a single request. Each trace must include required fields: duration_ms, span_count, sdk, and spans array."},"get":{"responses":{"200":{"description":"Traces retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"traces":{"type":"array","items":{"type":"object","properties":{"trace_id":{"type":"string"},"name":{"type":"string"},"start_time":{"type":"string"},"end_time":{"type":"string"},"duration_ms":{"type":"number","minimum":0},"status":{"type":"string","enum":["ok","error","timeout"]},"status_message":{"type":["string","null"]},"span_count":{"type":"integer","minimum":0},"error_count":{"type":"integer","minimum":0,"default":0},"project":{"type":"string"},"environment":{"type":"string","default":"production"},"sdk":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"}},"required":["name","version"]},"attributes":{"type":"object","additionalProperties":{},"default":{}},"metadata":{"type":"object","properties":{"user_id":{"type":["string","null"]},"session_id":{"type":["string","null"]},"request_id":{"type":["string","null"]},"tags":{"type":"object","additionalProperties":{},"default":{}},"custom_attributes":{"type":"object","additionalProperties":{},"default":{}}},"required":["tags","custom_attributes"],"default":{}},"service_version":{"type":"string"},"spans":{"type":"array","items":{"type":"object","properties":{"span_id":{"type":"string"},"trace_id":{"type":"string"},"parent_span_id":{"type":["string","null"]},"name":{"type":"string"},"start_time":{"type":"string"},"end_time":{"type":"string"},"duration_ms":{"type":"number","minimum":0},"status":{"type":"string","enum":["ok","error","timeout"]},"status_message":{"type":["string","null"]},"attributes":{"type":"object","additionalProperties":{},"default":{}},"events":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"timestamp":{"type":"string"},"attributes":{"type":"object","additionalProperties":{}}},"required":["name","timestamp"]},"default":[]},"links":{"type":"array","items":{"type":"object","properties":{"trace_id":{"type":"string"},"span_id":{"type":"string"},"attributes":{"type":"object","additionalProperties":{}}},"required":["trace_id","span_id"]},"default":[]}},"required":["span_id","trace_id","name","start_time","end_time","duration_ms","status","attributes","events","links"]}}},"required":["name","start_time","end_time","duration_ms","status","span_count","error_count","project","environment","sdk","attributes","metadata","spans"]}},"pagination":{"type":"object","properties":{"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"}},"required":["total","limit","offset","has_more"]},"timestamp":{"type":"string"},"processing_time_ms":{"type":"number"}},"required":["success","traces","pagination","timestamp"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid query parameters or missing org (session)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"]},"timestamp":{"type":"string"}},"required":["success","error","timestamp"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden (org mismatch or access denied)"},"404":{"description":"No ClickHouse plugin found for organization"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Traces","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"from","schema":{"type":"number","minimum":0,"default":0}},{"in":"query","name":"size","schema":{"type":"number","minimum":1,"maximum":100}},{"in":"query","name":"startTime","schema":{"type":"string"}},{"in":"query","name":"endTime","schema":{"type":"string"}},{"in":"query","name":"project","schema":{"type":"string"}},{"in":"query","name":"environment","schema":{"type":"string"}},{"in":"query","name":"status","schema":{"type":"string"}},{"in":"query","name":"userId","schema":{"type":"string"}},{"in":"query","name":"sessionId","schema":{"type":"string"}},{"in":"query","name":"tags","schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"sort","schema":{"type":"string","enum":["start_time:asc","start_time:desc","end_time:asc","end_time:desc","duration_ms:asc","duration_ms:desc"],"default":"start_time:desc"}},{"in":"query","name":"searchTerm","schema":{"type":"string"}},{"in":"query","name":"includeSpans","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false}},{"in":"query","name":"trace_id_neq","schema":{"type":"string"}},{"in":"query","name":"name_neq","schema":{"type":"string"}},{"in":"query","name":"environment_neq","schema":{"type":"string"}},{"in":"query","name":"user_id_neq","schema":{"type":"string"}},{"in":"query","name":"session_id_neq","schema":{"type":"string"}},{"in":"query","name":"status_neq","schema":{"type":"string"}},{"in":"query","name":"project_neq","schema":{"type":"string"}},{"in":"query","name":"service_name","schema":{"type":"string"}},{"in":"query","name":"service_name_neq","schema":{"type":"string"}},{"in":"query","name":"service_version","schema":{"type":"string"}},{"in":"query","name":"service_version_neq","schema":{"type":"string"}},{"in":"query","name":"duration_ms_gt","schema":{"type":"string"}},{"in":"query","name":"duration_ms_gte","schema":{"type":"string"}},{"in":"query","name":"duration_ms_lt","schema":{"type":"string"}},{"in":"query","name":"duration_ms_lte","schema":{"type":"string"}},{"in":"query","name":"duration_ms_eq","schema":{"type":"string"}},{"in":"query","name":"duration_ms_neq","schema":{"type":"string"}},{"in":"query","name":"span_count_gt","schema":{"type":"string"}},{"in":"query","name":"span_count_gte","schema":{"type":"string"}},{"in":"query","name":"span_count_lt","schema":{"type":"string"}},{"in":"query","name":"span_count_lte","schema":{"type":"string"}},{"in":"query","name":"span_count_eq","schema":{"type":"string"}},{"in":"query","name":"span_count_neq","schema":{"type":"string"}},{"in":"query","name":"error_count_gt","schema":{"type":"string"}},{"in":"query","name":"error_count_gte","schema":{"type":"string"}},{"in":"query","name":"error_count_lt","schema":{"type":"string"}},{"in":"query","name":"error_count_lte","schema":{"type":"string"}},{"in":"query","name":"error_count_eq","schema":{"type":"string"}},{"in":"query","name":"error_count_neq","schema":{"type":"string"}}],"tags":["Traces"],"summary":"Query traces","description":"Query traces with optional filters and pagination. Supports API key auth (org inferred) and session auth (org required via X-Organization-Id/Slug header or organizationId param). Supports comma-separated values for multiple filters (e.g., project=proj1,proj2&status=ok,error), negation filters (*_neq), and numeric comparison operators (gt/gte/lt/lte/eq/neq) for duration_ms, span_count, and error_count. Example: ?duration_ms_gt=100&duration_ms_lt=500&span_count_gte=10"}},"/api/v1/traces/ids":{"get":{"responses":{"200":{"description":"Trace IDs retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"trace_ids":{"type":"array","items":{"type":"string"}},"pagination":{"type":"object","properties":{"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"}},"required":["total","offset","has_more"]},"processing_time_ms":{"type":"number"},"timestamp":{"type":"string"}},"required":["success","trace_ids","pagination","processing_time_ms","timestamp"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid query parameters or missing org (session)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"]},"timestamp":{"type":"string"}},"required":["success","error","timestamp"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden (org mismatch or access denied)"},"404":{"description":"No ClickHouse plugin found for organization"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1TracesIds","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"from","schema":{"type":"number","minimum":0,"default":0}},{"in":"query","name":"size","schema":{"type":"number","minimum":1,"maximum":100}},{"in":"query","name":"startTime","schema":{"type":"string"}},{"in":"query","name":"endTime","schema":{"type":"string"}},{"in":"query","name":"project","schema":{"type":"string"}},{"in":"query","name":"environment","schema":{"type":"string"}},{"in":"query","name":"status","schema":{"type":"string"}},{"in":"query","name":"userId","schema":{"type":"string"}},{"in":"query","name":"sessionId","schema":{"type":"string"}},{"in":"query","name":"tags","schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"sort","schema":{"type":"string","enum":["start_time:asc","start_time:desc","end_time:asc","end_time:desc","duration_ms:asc","duration_ms:desc"],"default":"start_time:desc"}},{"in":"query","name":"searchTerm","schema":{"type":"string"}},{"in":"query","name":"includeSpans","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false}},{"in":"query","name":"trace_id_neq","schema":{"type":"string"}},{"in":"query","name":"name_neq","schema":{"type":"string"}},{"in":"query","name":"environment_neq","schema":{"type":"string"}},{"in":"query","name":"user_id_neq","schema":{"type":"string"}},{"in":"query","name":"session_id_neq","schema":{"type":"string"}},{"in":"query","name":"status_neq","schema":{"type":"string"}},{"in":"query","name":"project_neq","schema":{"type":"string"}},{"in":"query","name":"service_name","schema":{"type":"string"}},{"in":"query","name":"service_name_neq","schema":{"type":"string"}},{"in":"query","name":"service_version","schema":{"type":"string"}},{"in":"query","name":"service_version_neq","schema":{"type":"string"}},{"in":"query","name":"duration_ms_gt","schema":{"type":"string"}},{"in":"query","name":"duration_ms_gte","schema":{"type":"string"}},{"in":"query","name":"duration_ms_lt","schema":{"type":"string"}},{"in":"query","name":"duration_ms_lte","schema":{"type":"string"}},{"in":"query","name":"duration_ms_eq","schema":{"type":"string"}},{"in":"query","name":"duration_ms_neq","schema":{"type":"string"}},{"in":"query","name":"span_count_gt","schema":{"type":"string"}},{"in":"query","name":"span_count_gte","schema":{"type":"string"}},{"in":"query","name":"span_count_lt","schema":{"type":"string"}},{"in":"query","name":"span_count_lte","schema":{"type":"string"}},{"in":"query","name":"span_count_eq","schema":{"type":"string"}},{"in":"query","name":"span_count_neq","schema":{"type":"string"}},{"in":"query","name":"error_count_gt","schema":{"type":"string"}},{"in":"query","name":"error_count_gte","schema":{"type":"string"}},{"in":"query","name":"error_count_lt","schema":{"type":"string"}},{"in":"query","name":"error_count_lte","schema":{"type":"string"}},{"in":"query","name":"error_count_eq","schema":{"type":"string"}},{"in":"query","name":"error_count_neq","schema":{"type":"string"}}],"tags":["Traces"],"summary":"Query trace IDs","description":"Query only trace IDs with optional filters and pagination. More performant than full trace query when only IDs are needed. Supports comma-separated values for filters (e.g., project=proj1,proj2) and numeric comparison operators (gt/gte/lt/lte) for duration_ms, span_count, and error_count."}},"/api/v1/traces/directory-tree":{"get":{"responses":{"200":{"description":"Directory tree retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"tree":{"type":"array","items":{"$ref":"#/components/schemas/DirectoryTreeNode"}},"organization":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"}},"required":["id","slug"]}},"required":["success","tree","organization"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1TracesDirectory-tree","tags":["Traces"],"summary":"Get directory tree","description":"Get the directory tree for an organization","parameters":[]}},"/api/v1/traces/filter-values":{"get":{"responses":{"200":{"description":"All filter values retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","properties":{"projects":{"type":"array","items":{"type":"string"}},"environments":{"type":"array","items":{"type":"string"}},"environmentsByProjects":{"type":"array","items":{"type":"object","properties":{"project":{"type":"string"},"environments":{"type":"array","items":{"type":"string"}}},"required":["project","environments"]}},"statuses":{"type":"array","items":{"type":"string"}},"userIds":{"type":"array","items":{"type":"string"}},"sessionIds":{"type":"array","items":{"type":"string"}},"serviceNames":{"type":"array","items":{"type":"string"}},"serviceVersions":{"type":"array","items":{"type":"string"}}},"required":["projects","environments","environmentsByProjects","statuses","userIds","sessionIds","serviceNames","serviceVersions"]},"timestamp":{"type":"string"},"processing_time_ms":{"type":"number"}},"required":["success","data","timestamp","processing_time_ms"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1TracesFilter-values","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1,"description":"Limit every returned trace filter value to one project"}},{"in":"query","name":"environment","schema":{"type":"string","minLength":1,"description":"Limit returned service versions to one environment"}}],"tags":["Traces"],"summary":"Get all filter values","description":"Get all available filter values (projects, environments, statuses, userIds, sessionIds, serviceNames, serviceVersions) in a single request. Optional projectId scopes every value to one project; optional environment further scopes serviceVersions."}},"/api/v1/traces/environments-by-projects":{"get":{"responses":{"200":{"description":"Environments by projects retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"array","items":{"type":"object","properties":{"project":{"type":"string"},"environments":{"type":"array","items":{"type":"string"}}},"required":["project","environments"]}},"timestamp":{"type":"string"},"processing_time_ms":{"type":"number"}},"required":["success","data","timestamp","processing_time_ms"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1TracesEnvironments-by-projects","tags":["Traces"],"summary":"Get environments grouped by projects","description":"Get environments grouped by projects from traces. Optional projectIds query parameter to filter by specific projects.","parameters":[]}},"/api/v1/traces/single":{"post":{"responses":{"200":{"description":"Trace queued","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"trace_id":{"type":"string"},"job_id":{"type":"string"},"message":{"type":"string"},"timestamp":{"type":"string"},"processing_time_ms":{"type":"number"}},"required":["success","message","timestamp","processing_time_ms"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid request format","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"]},"timestamp":{"type":"string"}},"required":["success","error","timestamp"]}}}},"401":{"description":"Unauthorized - Invalid API key"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict - Trace is immutable"},"422":{"description":"Unprocessable entity"},"429":{"description":"Rate limit exceeded"},"500":{"description":"Internal server error"}},"operationId":"postApiV1TracesSingle","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"trace_id":{"type":"string"},"name":{"type":"string"},"start_time":{"type":"string"},"end_time":{"type":"string"},"duration_ms":{"type":"number","minimum":0},"status":{"type":"string","enum":["ok","error","timeout"]},"status_message":{"type":["string","null"]},"span_count":{"type":"integer","minimum":0},"error_count":{"type":"integer","minimum":0,"default":0},"project":{"type":"string"},"environment":{"type":"string","default":"production"},"sdk":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"}},"required":["name","version"]},"attributes":{"type":"object","additionalProperties":{},"default":{}},"metadata":{"type":"object","properties":{"user_id":{"type":["string","null"]},"session_id":{"type":["string","null"]},"request_id":{"type":["string","null"]},"tags":{"type":"object","additionalProperties":{},"default":{}},"custom_attributes":{"type":"object","additionalProperties":{},"default":{}}},"default":{}},"service_version":{"type":"string"},"spans":{"type":"array","items":{"type":"object","properties":{"span_id":{"type":"string"},"trace_id":{"type":"string"},"parent_span_id":{"type":["string","null"]},"name":{"type":"string"},"start_time":{"type":"string"},"end_time":{"type":"string"},"duration_ms":{"type":"number","minimum":0},"status":{"type":"string","enum":["ok","error","timeout"]},"status_message":{"type":["string","null"]},"attributes":{"type":"object","additionalProperties":{},"default":{}},"events":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"timestamp":{"type":"string"},"attributes":{"type":"object","additionalProperties":{}}},"required":["name","timestamp"]},"default":[]},"links":{"type":"array","items":{"type":"object","properties":{"trace_id":{"type":"string"},"span_id":{"type":"string"},"attributes":{"type":"object","additionalProperties":{}}},"required":["trace_id","span_id"]},"default":[]}},"required":["span_id","trace_id","name","start_time","end_time","duration_ms","status"]}}},"required":["name","start_time","end_time","duration_ms","status","span_count","project","sdk","spans"]}}},"required":true},"parameters":[],"tags":["Traces"],"summary":"Ingest single trace","description":"Ingest a single trace (processed as a batch internally). Required fields: duration_ms, span_count, sdk, and spans array with each span having duration_ms."}},"/api/v1/traces/connection-status":{"get":{"responses":{"200":{"description":"Connection status retrieved successfully","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean","const":true},"connected":{"type":"boolean"},"has_telemetry_plugin":{"type":"boolean"},"connection_source":{"type":"string","enum":["telemetry_plugin","environment_variables"]},"tables_ready":{"type":"boolean"},"timestamp":{"type":"string"},"processing_time_ms":{"type":"number"}},"required":["success","connected","has_telemetry_plugin","connection_source","timestamp","processing_time_ms"]},{"type":"object","properties":{"success":{"type":"boolean","const":false},"connected":{"type":"boolean","const":false},"has_telemetry_plugin":{"type":"boolean"},"connection_source":{"type":"string","enum":["telemetry_plugin","environment_variables"]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"string"}},"required":["code","message"]},"timestamp":{"type":"string"},"processing_time_ms":{"type":"number"}},"required":["success","connected","has_telemetry_plugin","connection_source","error","timestamp","processing_time_ms"]}]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1TracesConnection-status","tags":["Traces"],"summary":"Get connection status","description":"Get the connection status for an organization","parameters":[]}},"/api/v1/traces/{traceId}/spans":{"get":{"responses":{"200":{"description":"Spans retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"spans":{"type":"array","items":{"type":"object","properties":{"span_id":{"type":"string"},"trace_id":{"type":"string"},"parent_span_id":{"type":["string","null"]},"name":{"type":"string"},"start_time":{"type":"string"},"end_time":{"type":"string"},"duration_ms":{"type":"number","minimum":0},"status":{"type":"string","enum":["ok","error","timeout"]},"status_message":{"type":["string","null"]},"attributes":{"type":"object","additionalProperties":{},"default":{}},"events":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"timestamp":{"type":"string"},"attributes":{"type":"object","additionalProperties":{}}},"required":["name","timestamp"]},"default":[]},"links":{"type":"array","items":{"type":"object","properties":{"trace_id":{"type":"string"},"span_id":{"type":"string"},"attributes":{"type":"object","additionalProperties":{}}},"required":["trace_id","span_id"]},"default":[]}},"required":["span_id","trace_id","name","start_time","end_time","duration_ms","status","attributes","events","links"]}},"trace_id":{"type":"string"}},"required":["success","spans","trace_id"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Trace not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1TracesByTraceIdSpans","tags":["Traces"],"summary":"Get spans by trace ID","description":"Get the spans for a given trace ID","parameters":[{"schema":{"type":"string"},"in":"path","name":"traceId","required":true}]}},"/api/v1/traces/{id}":{"get":{"responses":{"200":{"description":"Trace retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","properties":{"trace_id":{"type":"string"},"name":{"type":"string"},"start_time":{"type":"string"},"end_time":{"type":"string"},"duration_ms":{"type":"number","minimum":0},"status":{"type":"string","enum":["ok","error","timeout"]},"status_message":{"type":["string","null"]},"span_count":{"type":"integer","minimum":0},"error_count":{"type":"integer","minimum":0,"default":0},"project":{"type":"string"},"environment":{"type":"string","default":"production"},"sdk":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"}},"required":["name","version"]},"attributes":{"type":"object","additionalProperties":{},"default":{}},"metadata":{"type":"object","properties":{"user_id":{"type":["string","null"]},"session_id":{"type":["string","null"]},"request_id":{"type":["string","null"]},"tags":{"type":"object","additionalProperties":{},"default":{}},"custom_attributes":{"type":"object","additionalProperties":{},"default":{}}},"required":["tags","custom_attributes"],"default":{}},"service_version":{"type":"string"},"spans":{"type":"array","items":{"type":"object","properties":{"span_id":{"type":"string"},"trace_id":{"type":"string"},"parent_span_id":{"type":["string","null"]},"name":{"type":"string"},"start_time":{"type":"string"},"end_time":{"type":"string"},"duration_ms":{"type":"number","minimum":0},"status":{"type":"string","enum":["ok","error","timeout"]},"status_message":{"type":["string","null"]},"attributes":{"type":"object","additionalProperties":{},"default":{}},"events":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"timestamp":{"type":"string"},"attributes":{"type":"object","additionalProperties":{}}},"required":["name","timestamp"]},"default":[]},"links":{"type":"array","items":{"type":"object","properties":{"trace_id":{"type":"string"},"span_id":{"type":"string"},"attributes":{"type":"object","additionalProperties":{}}},"required":["trace_id","span_id"]},"default":[]}},"required":["span_id","trace_id","name","start_time","end_time","duration_ms","status","attributes","events","links"]}}},"required":["name","start_time","end_time","duration_ms","status","span_count","error_count","project","environment","sdk","attributes","metadata","spans"]},"timestamp":{"type":"string"}},"required":["success","data","timestamp"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized - Invalid API key"},"403":{"description":"Forbidden"},"404":{"description":"Trace not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1TracesById","tags":["Traces"],"summary":"Get trace by ID","description":"Retrieve a specific trace by its ID","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/api/v1/datasets":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Dataset created","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"dataset":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"organization_id":{"type":"string"},"organization_slug":{"type":"string"},"slug":{"type":"string"},"project_id":{"type":["string","null"]},"dataset_type":{"type":"string"},"schema_version":{"type":"string"},"environment":{"type":"string"},"visibility":{"anyOf":[{"type":"string","enum":["public","org","private"]},{"type":"string"}]},"tags":{},"custom_attributes":{},"current_release":{"type":"string","default":"0.0.0"},"next_release":{"type":"string","default":"0.0.1"},"is_active":{"anyOf":[{"type":"integer"},{"type":"boolean"}]},"total_items":{"type":"integer"},"total_size_bytes":{"type":"number"},"avg_quality_score":{"type":"number"},"items_by_type":{},"validation_distribution":{},"created_by":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","organization_id","organization_slug","slug","dataset_type","schema_version","environment","visibility","current_release","next_release","created_at","updated_at"]}},"required":["success","dataset"]}}}},"400":{"description":"Invalid request (validation)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"]},"timestamp":{"type":"string"}},"required":["success","error","timestamp"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Dataset slug already exists"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Datasets","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"slug":{"type":"string"},"description":{"type":"string"},"visibility":{"type":"string","enum":["public","org","private"],"default":"org"},"dataset_type":{"type":"string","enum":["agent","conversational","g-eval","custom"],"default":"custom"},"environment":{"type":"string"},"schema_version":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"custom_attributes":{"type":"object","additionalProperties":{}},"project_id":{"type":"string"}},"required":["name"]}}},"required":true},"parameters":[],"tags":["Datasets"],"summary":"Create dataset","description":"Create dataset"},"get":{"responses":{"200":{"description":"List datasets","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"datasets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"organization_id":{"type":"string"},"organization_slug":{"type":"string"},"slug":{"type":"string"},"project_id":{"type":["string","null"]},"dataset_type":{"type":"string"},"schema_version":{"type":"string"},"environment":{"type":"string"},"visibility":{"anyOf":[{"type":"string","enum":["public","org","private"]},{"type":"string"}]},"tags":{},"custom_attributes":{},"current_release":{"type":"string","default":"0.0.0"},"next_release":{"type":"string","default":"0.0.1"},"is_active":{"anyOf":[{"type":"integer"},{"type":"boolean"}]},"total_items":{"type":"integer"},"total_size_bytes":{"type":"number"},"avg_quality_score":{"type":"number"},"items_by_type":{},"validation_distribution":{},"created_by":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","organization_id","organization_slug","slug","dataset_type","schema_version","environment","visibility","current_release","next_release","created_at","updated_at"]}},"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"}},"required":["success","datasets","total","limit","offset"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Datasets","parameters":[{"in":"query","name":"limit","schema":{"type":"number","minimum":1,"maximum":1000,"default":20}},{"in":"query","name":"offset","schema":{"type":"number","minimum":0,"default":0}},{"in":"query","name":"visibility","schema":{"type":"string","enum":["public","org","private"]}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"includeVersions","schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false}},{"in":"query","name":"includeItemCounts","schema":{"type":"boolean","default":true}}],"tags":["Datasets"],"summary":"List datasets","description":"List datasets"}},"/api/v1/datasets/by-trace/{traceId}":{"get":{"responses":{"200":{"description":"Matching dataset items","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"links":{"type":"array","items":{"type":"object","properties":{"dataset_slug":{"type":"string"},"item_id":{"type":"string"}},"required":["dataset_slug","item_id"]}}},"required":["success","links"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1DatasetsBy-traceByTraceId","tags":["Datasets"],"summary":"Find dataset items sourced from a trace","description":"Reverse lookup: given a trace ID, returns every dataset item (across all datasets) whose source_trace_id matches it.","parameters":[{"schema":{"type":"string"},"in":"path","name":"traceId","required":true}]}},"/api/v1/datasets/{slug}/dependencies":{"get":{"responses":{"200":{"description":"Dependency check result","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"hasDependencies":{"type":"boolean"},"dependencies":{"type":"object","properties":{"etlJobs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"projectId":{"type":["string","null"]},"projectName":{"type":["string","null"]},"isEnabled":{"type":"boolean"}},"required":["id","name","projectId","isEnabled"]}},"evalJobs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"projectId":{"type":["string","null"]},"projectName":{"type":["string","null"]},"isEnabled":{"type":"boolean"}},"required":["id","name","projectId","isEnabled"]}}},"required":["etlJobs","evalJobs"]}},"required":["success","hasDependencies","dependencies"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1DatasetsBySlugDependencies","tags":["Datasets"],"summary":"Check dataset dependencies (ETL/Eval jobs)","description":"Check dataset dependencies (ETL/Eval jobs)","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true}]}},"/api/v1/datasets/{slug}":{"get":{"responses":{"200":{"description":"Dataset","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"dataset":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"organization_id":{"type":"string"},"organization_slug":{"type":"string"},"slug":{"type":"string"},"project_id":{"type":["string","null"]},"dataset_type":{"type":"string"},"schema_version":{"type":"string"},"environment":{"type":"string"},"visibility":{"anyOf":[{"type":"string","enum":["public","org","private"]},{"type":"string"}]},"tags":{},"custom_attributes":{},"current_release":{"type":"string","default":"0.0.0"},"next_release":{"type":"string","default":"0.0.1"},"is_active":{"anyOf":[{"type":"integer"},{"type":"boolean"}]},"total_items":{"type":"integer"},"total_size_bytes":{"type":"number"},"avg_quality_score":{"type":"number"},"items_by_type":{},"validation_distribution":{},"created_by":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","organization_id","organization_slug","slug","dataset_type","schema_version","environment","visibility","current_release","next_release","created_at","updated_at"]}},"required":["success","dataset"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Dataset not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1DatasetsBySlug","tags":["Datasets"],"summary":"Get dataset by slug","description":"Get dataset by slug","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true}]},"put":{"responses":{"200":{"description":"Updated dataset","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"dataset":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"organization_id":{"type":"string"},"organization_slug":{"type":"string"},"slug":{"type":"string"},"project_id":{"type":["string","null"]},"dataset_type":{"type":"string"},"schema_version":{"type":"string"},"environment":{"type":"string"},"visibility":{"anyOf":[{"type":"string","enum":["public","org","private"]},{"type":"string"}]},"tags":{},"custom_attributes":{},"current_release":{"type":"string","default":"0.0.0"},"next_release":{"type":"string","default":"0.0.1"},"is_active":{"anyOf":[{"type":"integer"},{"type":"boolean"}]},"total_items":{"type":"integer"},"total_size_bytes":{"type":"number"},"avg_quality_score":{"type":"number"},"items_by_type":{},"validation_distribution":{},"created_by":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","organization_id","organization_slug","slug","dataset_type","schema_version","environment","visibility","current_release","next_release","created_at","updated_at"]}},"required":["success","dataset"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid request (validation)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"]},"timestamp":{"type":"string"}},"required":["success","error","timestamp"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Dataset not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"putApiV1DatasetsBySlug","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"visibility":{"type":"string","enum":["public","org","private"]},"schema_version":{"type":"string"}}}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true}],"tags":["Datasets"],"summary":"Update dataset","description":"Update dataset"},"delete":{"responses":{"200":{"description":"Dataset deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true}},"required":["success"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Dataset not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"deleteApiV1DatasetsBySlug","tags":["Datasets"],"summary":"Delete dataset","description":"Delete dataset","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true}]}},"/api/v1/datasets/{datasetSlug}/versions":{"get":{"responses":{"200":{"description":"Versions","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"versions":{"type":"array","items":{"type":"string"}},"current_release":{"type":"string"},"next_release":{"type":"string"}},"required":["success","versions","current_release","next_release"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Dataset not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1DatasetsByDatasetSlugVersions","parameters":[{"in":"query","name":"limit","schema":{"type":"number","minimum":1,"maximum":100,"default":50}},{"in":"query","name":"offset","schema":{"type":"number","minimum":0,"default":0}},{"schema":{"type":"string"},"in":"path","name":"datasetSlug","required":true}],"tags":["Datasets"],"summary":"List dataset versions","description":"List dataset versions"},"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Version created","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"version":{"type":"string"}},"required":["success","version"]}}}},"400":{"description":"Invalid version"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Dataset not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1DatasetsByDatasetSlugVersions","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"string"}},"required":["version"]}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"datasetSlug","required":true}],"tags":["Datasets"],"summary":"Create a new dataset version","description":"Create a new dataset version"}},"/api/v1/datasets/{datasetSlug}/versions/diff":{"get":{"responses":{"200":{"description":"Version diff","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"current_release":{"type":"string"},"next_release":{"type":"string"},"summary":{"type":"object","properties":{"added":{"type":"integer"},"deleted":{"type":"integer"},"modified":{"type":"integer"},"total_changes":{"type":"integer"}},"required":["added","deleted","modified","total_changes"]},"changes":{"type":"object","properties":{"added":{"type":"array","items":{"type":"string"}},"deleted":{"type":"array","items":{"type":"string"}},"modified":{"type":"array","items":{"type":"string"}}},"required":["added","deleted","modified"]},"current_release_count":{"type":"integer"},"next_release_count":{"type":"integer"}},"required":["success","current_release","next_release","summary","changes","current_release_count","next_release_count"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Dataset not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1DatasetsByDatasetSlugVersionsDiff","tags":["Datasets"],"summary":"Get changes between current_release and next_release","description":"Returns a detailed diff showing items added, deleted, and modified between the current published version and the next unpublished version. Useful for reviewing changes before publishing.","parameters":[{"schema":{"type":"string"},"in":"path","name":"datasetSlug","required":true}]}},"/api/v1/datasets/{datasetSlug}/versions/publish":{"post":{"responses":{"200":{"description":"Published","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"current_release":{"type":"string"},"next_release":{"type":"string"}},"required":["success","current_release","next_release"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"No items to publish or invalid version"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Dataset not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1DatasetsByDatasetSlugVersionsPublish","tags":["Datasets"],"summary":"Publish the next dataset version with optional version number","description":"Publishes all items in the next_release version to current_release. If version is not provided in the request body, automatically increments the current release by 0.0.1 (patch increment). If version is provided, it must be greater than the current release and follow X.Y.Z format. Items added after this will go into the new next_release version.","parameters":[{"schema":{"type":"string"},"in":"path","name":"datasetSlug","required":true}]}},"/api/v1/datasets/{datasetSlug}/versions/{version}":{"get":{"responses":{"200":{"description":"Version info","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"version":{"type":"string"},"exists":{"type":"boolean"},"status":{"anyOf":[{"type":"string","enum":["published","unpublished","legacy","nonexistent"]},{"type":"string"}]},"item_count":{"type":"integer"},"is_current_release":{"type":"boolean"},"is_next_release":{"type":"boolean"},"current_release":{"type":"string"},"next_release":{"type":"string"}},"required":["success","version","exists","status","item_count","is_current_release","is_next_release"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid version"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Dataset not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1DatasetsByDatasetSlugVersionsByVersion","tags":["Datasets"],"summary":"Get detailed dataset version information","description":"Retrieves comprehensive information about a specific dataset version including existence status, item count, and version metadata. Returns status as 'published', 'unpublished', 'legacy', or 'nonexistent'.","parameters":[{"schema":{"type":"string"},"in":"path","name":"datasetSlug","required":true},{"schema":{"type":"string"},"in":"path","name":"version","required":true}]}},"/api/v1/datasets/{datasetSlug}/conversations":{"get":{"responses":{"200":{"description":"Conversations page"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Dataset not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1DatasetsByDatasetSlugConversations","parameters":[{"in":"query","name":"version","schema":{"type":"string","pattern":"^\\s*\\d+\\.\\d+\\.\\d+\\s*$"}},{"in":"query","name":"limit","schema":{"type":"number","minimum":1,"maximum":100,"default":25}},{"in":"query","name":"offset","schema":{"type":"number","minimum":0,"default":0}},{"in":"query","name":"result","schema":{"type":"string","enum":["passed","issues","error","not_scored"]}},{"in":"query","name":"issue_check_id","schema":{"type":"string","maxLength":128}},{"in":"query","name":"search","schema":{"type":"string","maxLength":256}},{"in":"query","name":"order","schema":{"type":"string","enum":["newest","oldest","most_issues"]}},{"in":"query","name":"tz","schema":{"type":"string","pattern":"^[A-Za-z0-9_+\\-/]+$","maxLength":64}},{"schema":{"type":"string"},"in":"path","name":"datasetSlug","required":true}],"tags":["Datasets"],"summary":"List conversations (items grouped by source trace)","description":"Groups dataset items by source_trace_id and computes per-conversation results (passed | issues | error | not_scored) against the dataset's check rubric. Includes facets, per-check stats and the rubric echo when offset=0."}},"/api/v1/datasets/{datasetSlug}/conversations/{traceId}":{"get":{"responses":{"200":{"description":"Assembled conversation"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Conversation not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1DatasetsByDatasetSlugConversationsByTraceId","parameters":[{"in":"query","name":"version","schema":{"type":"string","pattern":"^\\s*\\d+\\.\\d+\\.\\d+\\s*$"}},{"schema":{"type":"string"},"in":"path","name":"datasetSlug","required":true},{"schema":{"type":"string"},"in":"path","name":"traceId","required":true}],"tags":["Datasets"],"summary":"Get one conversation assembled into turns","description":"Full transcript assembly for one conversation: ordered turns with texts, per-turn check results (with reasoning), timing, audio references, tool calls, plus per-check rollups across the call."}},"/api/v1/datasets/{datasetSlug}/conversations/{traceId}/analyze":{"get":{"responses":{"200":{"description":"Cached analysis"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"No analysis yet"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1DatasetsByDatasetSlugConversationsByTraceIdAnalyze","parameters":[{"in":"query","name":"version","schema":{"type":"string","pattern":"^\\s*\\d+\\.\\d+\\.\\d+\\s*$"}},{"schema":{"type":"string"},"in":"path","name":"datasetSlug","required":true},{"schema":{"type":"string"},"in":"path","name":"traceId","required":true}],"tags":["Datasets"],"summary":"Get the cached AI analysis for a conversation","description":"Get the cached AI analysis for a conversation"},"post":{"responses":{"200":{"description":"Analysis"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Conversation not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"429":{"description":"Credit quota exceeded"},"500":{"description":"Internal server error"},"502":{"description":"Analysis provider failed"}},"operationId":"postApiV1DatasetsByDatasetSlugConversationsByTraceIdAnalyze","parameters":[{"in":"query","name":"version","schema":{"type":"string","pattern":"^\\s*\\d+\\.\\d+\\.\\d+\\s*$"}},{"schema":{"type":"string"},"in":"path","name":"datasetSlug","required":true},{"schema":{"type":"string"},"in":"path","name":"traceId","required":true}],"tags":["Datasets"],"summary":"AI-analyze a conversation (1 credit; cached results are free)","description":"Runs one LLM pass over the transcript + failing checks and returns a validated diagnosis (root cause, verbatim failing quotes, violated rules, upstream factors, suggested fix). Charges 1 credit only when a new analysis is generated."}},"/api/v1/datasets/{datasetSlug}/items/ids":{"get":{"responses":{"200":{"description":"Item IDs","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"items":{"type":"array","items":{"type":"string"}},"total":{"type":"number"}},"required":["success","items","total"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Dataset not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1DatasetsByDatasetSlugItemsIds","parameters":[{"in":"query","name":"version","schema":{"type":"string"}},{"in":"query","name":"search","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"datasetSlug","required":true}],"tags":["Datasets"],"summary":"List dataset item IDs only (optimized)","description":"Retrieves only item IDs and types without full content. Optimized for listing and selection UIs."}},"/api/v1/datasets/{datasetSlug}/items":{"get":{"responses":{"200":{"description":"Items","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"items":{"type":"array","items":{"type":"object","properties":{"item_id":{"type":"string"},"dataset_id":{"type":"string"},"organization_id":{"type":"string"},"organization_slug":{"type":"string"},"dataset_slug":{"type":"string"},"item_version":{"type":"string"},"item_type":{"type":"string"},"schema_version":{"type":"string"},"content":{},"metadata":{},"source_trace_id":{"type":["string","null"]},"source_span_id":{"type":["string","null"]},"deleted_at_version":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"scorer_results":{"type":"array","items":{}}},"required":["item_id","organization_slug","dataset_slug","item_version","item_type","created_at","updated_at"]}},"total":{"type":"integer"}},"required":["success","items","total"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Dataset or version not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1DatasetsByDatasetSlugItems","parameters":[{"in":"query","name":"version","schema":{"type":"string","pattern":"^\\s*\\d+\\.\\d+\\.\\d+\\s*$"}},{"in":"query","name":"limit","schema":{"type":"number","minimum":1,"maximum":1000,"default":50}},{"in":"query","name":"offset","schema":{"type":"number","minimum":0,"default":0}},{"in":"query","name":"item_type","schema":{"type":"string","maxLength":100}},{"in":"query","name":"search","schema":{"type":"string","maxLength":256}},{"in":"query","name":"sort_by","schema":{"type":"string","pattern":"^(scorer\\.[a-zA-Z0-9_-]{1,64}|[a-zA-Z_][a-zA-Z0-9_]{0,63})$"}},{"in":"query","name":"sort_order","schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},{"in":"query","name":"fullContent","schema":{"type":"string","enum":["true","false"],"default":"false"}},{"schema":{"type":"string"},"in":"path","name":"datasetSlug","required":true}],"tags":["Datasets"],"summary":"List dataset items for a specific version","description":"Retrieves items from a specific version. Defaults to current_release if no version specified. Items marked as deleted (via deleted_at_version) are automatically filtered out for the requested version. Returns 404 if the specified version does not exist."},"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Items created","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"created":{"type":"integer"}},"required":["success","created"]}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Dataset not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1DatasetsByDatasetSlugItems","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"item_id":{"type":"string","minLength":1},"item_type":{"type":"string","minLength":1},"content":{"type":"object","properties":{"agent_name":{"type":"string"},"agent_role":{"type":"string"},"agent_task":{"type":"string"},"agent_response":{"type":"string"},"system_prompt":{"type":"string"},"user_id":{"type":"string"},"session_id":{"type":"string"},"turn_id":{"type":"string"},"ground_truth":{"type":"string"},"expected_tool_call":{"type":"string"},"tools_available":{"type":"array","items":{}},"tool_calls":{"type":"array","items":{}},"tool_call_results":{"type":"array","items":{}},"parameters_passed":{"type":"object","additionalProperties":{}},"retrieval_query":{"type":"array","items":{}},"retrieved_context":{"type":"array","items":{}},"exit_status":{"type":"string"},"agent_exit":{"type":"string"},"conversation_id":{"type":"string"},"speaker":{"type":"string"},"message":{"type":"string"},"conversation_context":{"type":"object","additionalProperties":{}},"input_text":{"type":"string"},"output_text":{"type":"string"},"expected_output":{"type":"string"},"evaluation_context":{"type":"object","additionalProperties":{}},"criteria":{"type":"string"},"quality_score":{"type":"number"},"validation_status":{"type":"string"},"validation_errors":{"type":"array","items":{}},"tags":{"type":"array","items":{}},"custom_attributes":{"type":"object","additionalProperties":{}},"stt_data":{"type":"array","items":{}},"tts_data":{"type":"object","additionalProperties":{}},"raw_complete_audio":{"type":"object","additionalProperties":{}},"vad_metrics":{"type":"array","items":{}},"stt_metrics":{"type":"array","items":{}},"tts_metrics":{"type":"array","items":{}},"llm_metrics":{"type":"array","items":{}},"eou_metrics":{"type":"array","items":{}},"latency":{"type":"object","additionalProperties":{}},"score_results":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"string"}]}}},"metadata":{"type":"object","additionalProperties":{}},"trace_id":{"type":"string"},"span_id":{"type":"string"}},"required":["item_type","content"]},"minItems":1}},"required":["items"]}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"datasetSlug","required":true}],"tags":["Datasets"],"summary":"Batch create dataset items in next_release version","description":"Creates multiple dataset items that will be added to the dataset's next_release version. These items will become part of the published dataset when you call the publish endpoint."},"delete":{"responses":{"200":{"description":"Items deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"deleted":{"type":"integer"}},"required":["success","deleted"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Dataset not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"deleteApiV1DatasetsByDatasetSlugItems","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"itemIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["itemIds"]}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"datasetSlug","required":true}],"tags":["Datasets"],"summary":"Soft-delete dataset items","description":"Marks items as deleted. If items exist only in unpublished versions, they are permanently removed. If items exist in published versions, they are soft-deleted and marked with deleted_at_version in the next_release."}},"/api/v1/datasets/{datasetSlug}/items/{itemId}":{"get":{"responses":{"200":{"description":"Item","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"item":{"type":"object","properties":{"item_id":{"type":"string"},"dataset_id":{"type":"string"},"organization_id":{"type":"string"},"organization_slug":{"type":"string"},"dataset_slug":{"type":"string"},"item_version":{"type":"string"},"item_type":{"type":"string"},"schema_version":{"type":"string"},"content":{},"metadata":{},"source_trace_id":{"type":["string","null"]},"source_span_id":{"type":["string","null"]},"deleted_at_version":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"scorer_results":{"type":"array","items":{}}},"required":["item_id","organization_slug","dataset_slug","item_version","item_type","created_at","updated_at"]}},"required":["success","item"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Item not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1DatasetsByDatasetSlugItemsByItemId","tags":["Datasets"],"summary":"Get single dataset item by item ID","description":"Get single dataset item by item ID","parameters":[{"schema":{"type":"string"},"in":"path","name":"datasetSlug","required":true},{"schema":{"type":"string"},"in":"path","name":"itemId","required":true}]},"delete":{"responses":{"200":{"description":"Item deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true}},"required":["success"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Item or dataset not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"deleteApiV1DatasetsByDatasetSlugItemsByItemId","tags":["Datasets"],"summary":"Soft-delete a single dataset item by item ID","description":"Marks a single item as deleted. If the item exists only in unpublished versions, it is permanently removed. If it exists in published versions, it is soft-deleted and marked with deleted_at_version in the next_release.","parameters":[{"schema":{"type":"string"},"in":"path","name":"datasetSlug","required":true},{"schema":{"type":"string"},"in":"path","name":"itemId","required":true}]}},"/api/v1/scorers/results":{"get":{"responses":{"200":{"description":"Successfully retrieved scorer results","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"result_id":{"type":"string"},"organization_slug":{"type":"string"},"dataset_slug":{"type":"string"},"item_id":{"type":"string"},"scorer_id":{"type":"string"},"scorer_name":{"type":"string"},"score":{"type":"number"},"passed":{"type":"number"},"metadata":{"type":"string"},"error":{"type":"string"},"execution_time_ms":{"type":"number"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["result_id","organization_slug","dataset_slug","item_id","scorer_id","scorer_name","score","passed","metadata","error","execution_time_ms","created_at","updated_at"]}}},"required":["results"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"operationId":"getApiV1ScorersResults","parameters":[{"name":"organizationSlug","in":"query","required":false,"description":"The organization slug. If not provided, organization will be derived from API key.","schema":{"type":"string"}},{"name":"datasetSlug","in":"query","required":false,"description":"Filter by dataset slug","schema":{"type":"string"}},{"name":"itemId","in":"query","required":false,"description":"Filter by item ID","schema":{"type":"string"}},{"name":"scorerId","in":"query","required":false,"description":"Filter by scorer ID","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Number of results to return","schema":{"type":"number","default":100}},{"name":"offset","in":"query","required":false,"description":"Number of results to skip","schema":{"type":"number","default":0}}],"tags":["Scorer Results"],"summary":"Get scorer results","description":"Retrieves scorer results with optional filtering by dataset, item, and scorer."},"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Successfully created scorer result","content":{"application/json":{"schema":{"type":"object","properties":{"result_id":{"type":"string"},"organization_slug":{"type":"string"},"dataset_slug":{"type":"string"},"item_id":{"type":"string"},"scorer_id":{"type":"string"},"scorer_name":{"type":"string"},"score":{"type":"number"},"passed":{"type":"number"},"metadata":{"type":"string"},"error":{"type":"string"},"execution_time_ms":{"type":"number"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["result_id","organization_slug","dataset_slug","item_id","scorer_id","scorer_name","score","passed","metadata","error","execution_time_ms","created_at","updated_at"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"operationId":"postApiV1ScorersResults","parameters":[{"name":"organizationSlug","in":"query","required":false,"description":"The organization slug. If not provided, organization will be derived from API key.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"datasetSlug":{"type":"string","minLength":1},"itemId":{"type":"string","minLength":1},"scorerId":{"type":"string","minLength":1},"score":{"type":"number"},"passed":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{},"default":{}},"error":{"type":"string","default":""},"executionTimeMs":{"type":"number","default":0}},"required":["datasetSlug","itemId","scorerId","score"]}}},"required":true},"tags":["Scorer Results"],"summary":"Create scorer result","description":"Creates a new scorer result for a dataset item."}},"/api/v1/scorers/results/batch":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Successfully created scorer results","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"created":{"type":"number"},"failed":{"type":"number"},"results":{"type":"array","items":{"type":"object","properties":{"result_id":{"type":"string"},"organization_slug":{"type":"string"},"dataset_slug":{"type":"string"},"item_id":{"type":"string"},"scorer_id":{"type":"string"},"scorer_name":{"type":"string"},"score":{"type":"number"},"passed":{"type":"number"},"metadata":{"type":"string"},"error":{"type":"string"},"execution_time_ms":{"type":"number"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["result_id","organization_slug","dataset_slug","item_id","scorer_id","scorer_name","score","passed","metadata","error","execution_time_ms","created_at","updated_at"]}}},"required":["success","created","failed","results"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"operationId":"postApiV1ScorersResultsBatch","parameters":[{"name":"organizationSlug","in":"query","required":false,"description":"The organization slug. If not provided, organization will be derived from API key.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"datasetSlug":{"type":"string","minLength":1},"itemId":{"type":"string","minLength":1},"scorerId":{"type":"string","minLength":1},"score":{"type":"number"},"passed":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{},"default":{}},"error":{"type":"string","default":""},"executionTimeMs":{"type":"number","default":0}},"required":["datasetSlug","itemId","scorerId","score"]},"minItems":1,"maxItems":100}},"required":["results"]}}},"required":true},"tags":["Scorer Results"],"summary":"Batch create scorer results","description":"Creates multiple scorer results in a single request (max 100)."}},"/api/v1/scorers/results/{datasetSlug}/{itemId}/{scorerId}":{"get":{"responses":{"200":{"description":"Successfully retrieved scorer result","content":{"application/json":{"schema":{"type":"object","properties":{"result_id":{"type":"string"},"organization_slug":{"type":"string"},"dataset_slug":{"type":"string"},"item_id":{"type":"string"},"scorer_id":{"type":"string"},"scorer_name":{"type":"string"},"score":{"type":"number"},"passed":{"type":"number"},"metadata":{"type":"string"},"error":{"type":"string"},"execution_time_ms":{"type":"number"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["result_id","organization_slug","dataset_slug","item_id","scorer_id","scorer_name","score","passed","metadata","error","execution_time_ms","created_at","updated_at"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden"},"404":{"description":"Scorer result not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"operationId":"getApiV1ScorersResultsByDatasetSlugByItemIdByScorerId","parameters":[{"in":"param","name":"datasetSlug","schema":{"type":"string","minLength":1},"required":true},{"in":"param","name":"itemId","schema":{"type":"string","minLength":1},"required":true},{"in":"param","name":"scorerId","schema":{"type":"string","minLength":1},"required":true},{"name":"organizationSlug","in":"query","required":false,"description":"The organization slug. If not provided, organization will be derived from API key.","schema":{"type":"string"}},{"name":"datasetSlug","in":"path","required":true,"description":"Dataset slug","schema":{"type":"string"}},{"name":"itemId","in":"path","required":true,"description":"Item ID","schema":{"type":"string"}},{"name":"scorerId","in":"path","required":true,"description":"Scorer ID","schema":{"type":"string"}}],"tags":["Scorer Results"],"summary":"Get scorer result by ID","description":"Retrieves a specific scorer result for an item."},"put":{"responses":{"200":{"description":"Successfully updated scorer result","content":{"application/json":{"schema":{"type":"object","properties":{"result_id":{"type":"string"},"organization_slug":{"type":"string"},"dataset_slug":{"type":"string"},"item_id":{"type":"string"},"scorer_id":{"type":"string"},"scorer_name":{"type":"string"},"score":{"type":"number"},"passed":{"type":"number"},"metadata":{"type":"string"},"error":{"type":"string"},"execution_time_ms":{"type":"number"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["result_id","organization_slug","dataset_slug","item_id","scorer_id","scorer_name","score","passed","metadata","error","execution_time_ms","created_at","updated_at"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden"},"404":{"description":"Scorer result not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"operationId":"putApiV1ScorersResultsByDatasetSlugByItemIdByScorerId","parameters":[{"in":"param","name":"datasetSlug","schema":{"type":"string","minLength":1},"required":true},{"in":"param","name":"itemId","schema":{"type":"string","minLength":1},"required":true},{"in":"param","name":"scorerId","schema":{"type":"string","minLength":1},"required":true},{"name":"organizationSlug","in":"query","required":false,"description":"The organization slug. If not provided, organization will be derived from API key.","schema":{"type":"string"}},{"name":"datasetSlug","in":"path","required":true,"description":"Dataset slug","schema":{"type":"string"}},{"name":"itemId","in":"path","required":true,"description":"Item ID","schema":{"type":"string"}},{"name":"scorerId","in":"path","required":true,"description":"Scorer ID","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"score":{"type":"number"},"passed":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{}},"error":{"type":"string"},"executionTimeMs":{"type":"number"}}}}},"required":true},"tags":["Scorer Results"],"summary":"Update scorer result","description":"Updates an existing scorer result."},"delete":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"204":{"description":"Successfully deleted scorer result"},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden"},"404":{"description":"Scorer result not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"operationId":"deleteApiV1ScorersResultsByDatasetSlugByItemIdByScorerId","parameters":[{"in":"param","name":"datasetSlug","schema":{"type":"string","minLength":1},"required":true},{"in":"param","name":"itemId","schema":{"type":"string","minLength":1},"required":true},{"in":"param","name":"scorerId","schema":{"type":"string","minLength":1},"required":true},{"name":"organizationSlug","in":"query","required":false,"description":"The organization slug. If not provided, organization will be derived from API key.","schema":{"type":"string"}},{"name":"datasetSlug","in":"path","required":true,"description":"Dataset slug","schema":{"type":"string"}},{"name":"itemId","in":"path","required":true,"description":"Item ID","schema":{"type":"string"}},{"name":"scorerId","in":"path","required":true,"description":"Scorer ID","schema":{"type":"string"}}],"tags":["Scorer Results"],"summary":"Delete scorer result","description":"Deletes a scorer result."}},"/api/v1/scorers":{"get":{"responses":{"200":{"description":"Successfully retrieved scorers. Returns an array of all available scorers.","content":{"application/json":{"schema":{"type":"object","properties":{"scorers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"tag":{"type":"string"},"config":{},"schema":{},"inputSchema":{},"outputSchema":{},"isDefault":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","type","tag","isDefault","createdAt","updatedAt"]}}},"required":["scorers"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"operationId":"getApiV1Scorers","parameters":[{"name":"organizationSlug","in":"query","required":false,"description":"The unique slug identifier for the organization. Used to filter organization-specific scorers. If not provided, organization will be derived from API key.","schema":{"type":"string"}}],"tags":["Scorers"],"summary":"Get all scorers","description":"Retrieves all available scorers for the organization. This includes both default (system-wide) scorers and organization-specific custom scorers. Scorers are evaluation functions used to assess the quality, performance, or other metrics of AI traces, spans, or datasets. Results are sorted alphabetically by name."},"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Successfully created scorer","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"tag":{"type":"string"},"config":{},"schema":{},"inputSchema":{},"outputSchema":{},"isDefault":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","type","tag","isDefault","createdAt","updatedAt"]}}}},"400":{"description":"Bad request - Invalid input data or schema validation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"operationId":"postApiV1Scorers","parameters":[{"name":"organizationSlug","in":"query","required":false,"description":"The unique slug identifier for the organization. If not provided, organization will be derived from API key.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","minLength":1,"maxLength":500},"type":{"type":"string","minLength":1},"tag":{"type":"string","minLength":1},"config":{},"schema":{},"inputSchema":{},"outputSchema":{},"isDefault":{"type":"boolean","default":false}},"required":["name","description","type","tag"]}}},"required":true},"tags":["Scorers"],"summary":"Create a new scorer","description":"Creates a new scorer for the organization. Scorers are evaluation functions that can be applied to traces, spans, or datasets to measure quality, performance, or other metrics. By default, isDefault is set to false, making the scorer available only to the specified organization."}},"/api/v1/scorers/{id}":{"get":{"responses":{"200":{"description":"Successfully retrieved scorer with complete configuration details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"tag":{"type":"string"},"config":{},"schema":{},"inputSchema":{},"outputSchema":{},"isDefault":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","type","tag","isDefault","createdAt","updatedAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden"},"404":{"description":"Scorer not found with the specified ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"operationId":"getApiV1ScorersById","parameters":[{"in":"param","name":"id","schema":{"type":"string","minLength":1},"required":true},{"name":"organizationSlug","in":"query","required":false,"description":"The unique slug identifier for the organization. If not provided, organization will be derived from API key.","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"The unique identifier of the scorer to retrieve","schema":{"type":"string"}}],"tags":["Scorers"],"summary":"Get a single scorer by ID","description":"Retrieves detailed information about a specific scorer by its unique identifier. Returns the complete scorer configuration including name, description, type, schemas, and metadata. This endpoint can be used to retrieve both default (system-wide) scorers and organization-specific scorers."},"put":{"responses":{"200":{"description":"Successfully updated scorer","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"tag":{"type":"string"},"config":{},"schema":{},"inputSchema":{},"outputSchema":{},"isDefault":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","type","tag","isDefault","createdAt","updatedAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request - Invalid input data or schema validation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden - Cannot modify default scorer or scorer from another organization","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Scorer not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"operationId":"putApiV1ScorersById","parameters":[{"in":"param","name":"id","schema":{"type":"string","minLength":1},"required":true},{"name":"organizationSlug","in":"query","required":false,"description":"The unique slug identifier for the organization. If not provided, organization will be derived from API key.","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"The unique identifier of the scorer to update","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","minLength":1,"maxLength":500},"type":{"type":"string"},"tag":{"type":"string"},"config":{},"schema":{},"inputSchema":{},"outputSchema":{},"isDefault":{"type":"boolean"}}}}},"required":true},"tags":["Scorers"],"summary":"Update a scorer","description":"Updates an existing scorer for the organization. Only organization-specific scorers can be modified - default scorers and scorers from other organizations cannot be updated. All fields in the request body are optional and only provided fields will be updated."},"delete":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"204":{"description":"Successfully deleted scorer. No content returned in response body."},"400":{"description":"Bad request"},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden - Cannot delete default scorer or scorer from another organization","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Scorer not found with the specified ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"operationId":"deleteApiV1ScorersById","parameters":[{"in":"param","name":"id","schema":{"type":"string","minLength":1},"required":true},{"name":"organizationSlug","in":"query","required":false,"description":"The unique slug identifier for the organization. If not provided, organization will be derived from API key.","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"The unique identifier of the scorer to delete","schema":{"type":"string"}}],"tags":["Scorers"],"summary":"Delete a scorer","description":"Permanently deletes a scorer from the organization. This operation cannot be undone. Only organization-specific scorers can be deleted - default (system-wide) scorers and scorers from other organizations cannot be removed. Returns 204 No Content on successful deletion."}},"/api/v1/scorers/custom-scorer-agent/chat":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1ScorersCustom-scorer-agentChat","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"number","const":1},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string","minLength":1,"maxLength":8000}},"required":["role","content"]},"minItems":1,"maxItems":50},"context":{"type":"object","properties":{"placeholderCatalog":{"type":"array","items":{"type":"object","additionalProperties":{}}},"sampleStandardData":{"type":"object","additionalProperties":{}},"currentDraft":{}}},"agentLlmConfig":{"type":"object","properties":{"provider":{"type":"string"},"modelName":{"type":"string"},"temperature":{"type":"number","minimum":0,"maximum":2}}}},"required":["schemaVersion","messages"]}}}},"tags":["Scorers"],"summary":"Custom scorer rubric assistant (sync)","description":"Runs one NovaEval `custom-scorer-agent chat` CLI turn to propose or refine a custom scorer draft. Requires `novaeval` on PATH (or NOVAEVAL_COMMAND) and the provider API key in the environment."}},"/api/v1/rbac/roles":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1RbacRoles","tags":["Organizations"],"summary":"List organization roles","description":"List organization roles","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}}]}},"/api/v1/rbac/roles/{roleId}":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1RbacRolesByRoleId","parameters":[{"in":"path","name":"roleId","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}}],"tags":["Organizations"],"summary":"Get an organization role","description":"Get an organization role"}},"/api/v1/rbac/roles/{roleId}/permissions":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1RbacRolesByRoleIdPermissions","parameters":[{"in":"path","name":"roleId","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}}],"tags":["Organizations"],"summary":"Get permissions for an organization role","description":"Get permissions for an organization role"}},"/api/v1/rbac/me":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1RbacMe","tags":["Organizations"],"summary":"Get the current credential's organization access","description":"Get the current credential's organization access","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}}]}},"/api/v1/rbac/members":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1RbacMembers","tags":["Organizations"],"summary":"List organization member roles","description":"List organization member roles","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}}]}},"/api/v1/rbac/members/{memberId}/roles":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1RbacMembersByMemberIdRoles","parameters":[{"in":"path","name":"memberId","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}}],"tags":["Organizations"],"summary":"Get an organization member's role","description":"Get an organization member's role"},"put":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"putApiV1RbacMembersByMemberIdRoles","parameters":[{"in":"path","name":"memberId","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"roleId":{"type":"string","minLength":1}},"required":["roleId"]}}}},"tags":["Organizations"],"summary":"Assign an organization member's role","description":"Assign an organization member's role"}},"/api/v1/rbac/audit-log":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1RbacAudit-log","parameters":[{"in":"query","name":"result","schema":{"type":"string","enum":["allowed","denied"]}},{"in":"query","name":"action","schema":{"type":"string"}},{"in":"query","name":"subjectId","schema":{"type":"string"}},{"in":"query","name":"from","schema":{"type":"string"}},{"in":"query","name":"to","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":200}},{"in":"query","name":"offset","schema":{"type":"integer","minimum":0,"maximum":10000}},{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}}],"tags":["Organizations"],"summary":"Read organization authorization audit events","description":"Read organization authorization audit events"}},"/api/v1/providers":{"get":{"responses":{"200":{"description":"Successfully retrieved providers.","content":{"application/json":{"schema":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["openai","anthropic","google","aws","azure","noveum"]},"name":{"type":"string"},"model":{"type":["string","null"]},"isCustomModel":{"type":"boolean"},"isDefault":{"type":"boolean"},"isEnabled":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","name","model","isCustomModel","isDefault","isEnabled","createdAt","updatedAt"]}}},"required":["providers"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"operationId":"getApiV1Providers","parameters":[{"name":"organizationSlug","in":"query","required":false,"description":"The unique slug identifier for the organization. If not provided, organization will be derived from API key.","schema":{"type":"string"}}],"tags":["Credentials"],"summary":"List organization providers","description":"Retrieves all model providers configured for the organization. Soft-deleted providers are excluded. Credential values are never returned by this endpoint."},"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Successfully created provider.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["openai","anthropic","google","aws","azure","noveum"]},"name":{"type":"string"},"model":{"type":["string","null"]},"isCustomModel":{"type":"boolean"},"isDefault":{"type":"boolean"},"isEnabled":{"type":"boolean"},"fields":{"type":"object","additionalProperties":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","name","model","isCustomModel","isDefault","isEnabled","fields","createdAt","updatedAt"]}}}},"400":{"description":"Bad request - Missing required credential fields or invalid input.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"operationId":"postApiV1Providers","parameters":[{"name":"organizationSlug","in":"query","required":false,"description":"The unique slug identifier for the organization. If not provided, organization will be derived from API key.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["openai","anthropic","google","aws","azure","noveum"]},"name":{"type":"string","minLength":1,"maxLength":100},"model":{"type":"string","minLength":1,"maxLength":200},"isCustomModel":{"type":"boolean","default":false},"credentials":{"type":"object","additionalProperties":{"type":"string"}},"setDefault":{"type":"boolean","default":false}},"required":["type","name","model","credentials"]}}},"required":true},"tags":["Credentials"],"summary":"Create a provider","description":"Creates a new model provider for the organization. Required credential fields depend on the provider type. Credentials are encrypted at rest and only ever returned masked. When setDefault is true the new provider becomes the organization default."}},"/api/v1/providers/test-connection":{"post":{"responses":{"200":{"description":"Connection test completed.","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"},"message":{"type":"string"},"testedAt":{"type":"string"}},"required":["valid","message","testedAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request - Missing provider type or required credential fields.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden"},"404":{"description":"Provider not found with the specified ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"operationId":"postApiV1ProvidersTest-connection","parameters":[{"name":"organizationSlug","in":"query","required":false,"description":"The unique slug identifier for the organization. If not provided, organization will be derived from API key.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["openai","anthropic","google","aws","azure","noveum"]},"credentials":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"existingProviderId":{"type":"string","minLength":1}}}}},"required":true},"tags":["Credentials"],"summary":"Test provider credentials before saving","description":"Attempts a lightweight provider request with draft credentials. For existing providers, stored credentials are decrypted and merged with any provided credential updates before testing."}},"/api/v1/providers/{id}":{"get":{"responses":{"200":{"description":"Successfully retrieved provider.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["openai","anthropic","google","aws","azure","noveum"]},"name":{"type":"string"},"model":{"type":["string","null"]},"isCustomModel":{"type":"boolean"},"isDefault":{"type":"boolean"},"isEnabled":{"type":"boolean"},"fields":{"type":"object","additionalProperties":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","name","model","isCustomModel","isDefault","isEnabled","fields","createdAt","updatedAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden"},"404":{"description":"Provider not found with the specified ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"operationId":"getApiV1ProvidersById","parameters":[{"in":"param","name":"id","schema":{"type":"string","minLength":1},"required":true},{"name":"organizationSlug","in":"query","required":false,"description":"The unique slug identifier for the organization. If not provided, organization will be derived from API key.","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"The unique identifier of the provider to retrieve","schema":{"type":"string"}}],"tags":["Credentials"],"summary":"Get a provider by ID","description":"Retrieves a single organization provider by its unique identifier. Credential values are decrypted and returned masked (last 4 characters only)."},"put":{"responses":{"200":{"description":"Successfully updated provider.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["openai","anthropic","google","aws","azure","noveum"]},"name":{"type":"string"},"model":{"type":["string","null"]},"isCustomModel":{"type":"boolean"},"isDefault":{"type":"boolean"},"isEnabled":{"type":"boolean"},"fields":{"type":"object","additionalProperties":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","name","model","isCustomModel","isDefault","isEnabled","fields","createdAt","updatedAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request - Invalid input data.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden"},"404":{"description":"Provider not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"operationId":"putApiV1ProvidersById","parameters":[{"in":"param","name":"id","schema":{"type":"string","minLength":1},"required":true},{"name":"organizationSlug","in":"query","required":false,"description":"The unique slug identifier for the organization. If not provided, organization will be derived from API key.","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"The unique identifier of the provider to update","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"model":{"type":"string","minLength":1,"maxLength":200},"isCustomModel":{"type":"boolean"},"credentials":{"type":"object","additionalProperties":{"type":"string"}},"isEnabled":{"type":"boolean"}}}}},"required":true},"tags":["Credentials"],"summary":"Update a provider","description":"Updates an existing organization provider. All fields are optional and only provided fields are updated. Credentials are re-encrypted only when supplied; otherwise the stored credentials are left untouched."},"delete":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"204":{"description":"Successfully deleted provider. No content returned in response body."},"400":{"description":"Bad request"},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden"},"404":{"description":"Provider not found with the specified ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"operationId":"deleteApiV1ProvidersById","parameters":[{"in":"param","name":"id","schema":{"type":"string","minLength":1},"required":true},{"name":"organizationSlug","in":"query","required":false,"description":"The unique slug identifier for the organization. If not provided, organization will be derived from API key.","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"The unique identifier of the provider to delete","schema":{"type":"string"}}],"tags":["Credentials"],"summary":"Delete a provider","description":"Soft-deletes an organization provider (sets isDeleted=true). The provider is excluded from subsequent reads. Returns 204 No Content on success."}},"/api/v1/providers/{id}/default":{"post":{"responses":{"200":{"description":"Successfully set provider as default.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"isDefault":{"type":"boolean","const":true}},"required":["id","isDefault"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request - Provider is disabled or has no model selected.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden"},"404":{"description":"Provider not found with the specified ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"operationId":"postApiV1ProvidersByIdDefault","parameters":[{"in":"param","name":"id","schema":{"type":"string","minLength":1},"required":true},{"name":"organizationSlug","in":"query","required":false,"description":"The unique slug identifier for the organization. If not provided, organization will be derived from API key.","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"The unique identifier of the provider to make default","schema":{"type":"string"}}],"tags":["Credentials"],"summary":"Set a provider as the organization default","description":"Promotes the provider to the organization default, demoting any current default in the same transaction. The provider must belong to the organization, be enabled, not soft-deleted, and have a model selected."},"delete":{"responses":{"200":{"description":"Successfully removed provider as default.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"isDefault":{"type":"boolean","const":false}},"required":["id","isDefault"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden"},"404":{"description":"Provider not found with the specified ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"operationId":"deleteApiV1ProvidersByIdDefault","parameters":[{"in":"param","name":"id","schema":{"type":"string","minLength":1},"required":true},{"name":"organizationSlug","in":"query","required":false,"description":"The unique slug identifier for the organization. If not provided, organization will be derived from API key.","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"The unique identifier of the provider to remove as default","schema":{"type":"string"}}],"tags":["Credentials"],"summary":"Remove a provider as the organization default","description":"Clears the organization default flag from the specified provider. After this, the organization may have no default provider until another provider is promoted."}},"/api/v1/providers/{id}/test-connection":{"post":{"responses":{"200":{"description":"Connection test completed.","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"},"message":{"type":"string"},"testedAt":{"type":"string"}},"required":["valid","message","testedAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden"},"404":{"description":"Provider not found with the specified ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"operationId":"postApiV1ProvidersByIdTest-connection","parameters":[{"in":"param","name":"id","schema":{"type":"string","minLength":1},"required":true},{"name":"organizationSlug","in":"query","required":false,"description":"The unique slug identifier for the organization. If not provided, organization will be derived from API key.","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"The unique identifier of the provider to test","schema":{"type":"string"}}],"tags":["Credentials"],"summary":"Test a provider's connection","description":"Decrypts the provider's stored credentials and attempts a lightweight request against the provider to verify they are valid."}},"/api/v1/projects":{"get":{"responses":{"200":{"description":"Returns all projects","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"environments":{"type":"array","items":{"type":"string"}},"traceCount":{"type":"number"},"datasetItemCount":{"type":"number"}},"required":["id","name","description","organizationId","createdAt","updatedAt"]}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Projects","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"includeEnvironments","schema":{"type":"string"}},{"in":"query","name":"includeTraceCounts","schema":{"type":"string"}},{"in":"query","name":"includeDatasetItemCounts","schema":{"type":"string"}}],"tags":["Projects"],"summary":"Get all projects","description":"Get all projects for an organization. Optional flags: includeEnvironments=true to include environment names, includeTraceCounts=true to include trace counts per project, includeDatasetItemCounts=true to include dataset item counts per project."},"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Returns the created project","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"environments":{"type":"array","items":{"type":"string"}},"traceCount":{"type":"number"},"datasetItemCount":{"type":"number"}},"required":["id","name","description","organizationId","createdAt","updatedAt"]}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Project already exists"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Projects","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"id":{"type":"string","minLength":1},"description":{"type":"string"}},"required":["name","id"]}}}},"tags":["Projects"],"summary":"Create a new project","description":"Create a new project"}},"/api/v1/projects/guardrails/resolve":{"get":{"responses":{"200":{"description":"Returns all projects available to the gateway credential","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"environments":{"type":"array","items":{"type":"string"}},"traceCount":{"type":"number"},"datasetItemCount":{"type":"number"}},"required":["id","name","description","organizationId","createdAt","updatedAt"]}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1ProjectsGuardrailsResolve","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"includeEnvironments","schema":{"type":"string"}},{"in":"query","name":"includeTraceCounts","schema":{"type":"string"}},{"in":"query","name":"includeDatasetItemCounts","schema":{"type":"string"}}],"tags":["Projects"],"summary":"Resolve projects for a NovaGuard gateway credential","description":"Returns the normal project list only when the credential can both read guardrails and ingest guardrail usage."}},"/api/v1/projects/metrics/stream":{"get":{"responses":{"200":{"description":"SSE stream of project metrics events","content":{"text/event-stream":{"schema":{"type":"object","additionalProperties":{}}}}}},"operationId":"getApiV1ProjectsMetricsStream","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}}],"tags":["Projects"],"summary":"Stream lazy-loaded project metrics via SSE","description":"Server-Sent Events stream emitting `traces`, `environments`, `datasets`, and a terminal `done` event with per-project metrics."}},"/api/v1/projects/{id}/delete-impact":{"get":{"responses":{"200":{"description":"Impact summary","content":{"application/json":{"schema":{"type":"object","properties":{"traces":{"type":["number","null"]},"datasetsLinked":{"type":"number"},"datasetsToDelete":{"type":"number"},"datasetsKeptShared":{"type":"number"},"datasetsPendingDeletion":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"itemCount":{"type":"number"}},"required":["id","name","slug","itemCount"]}},"datasetsKeptSharedDetails":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"itemCount":{"type":"number"}},"required":["id","name","slug","itemCount"]}},"etlJobs":{"type":"number"},"evalJobsToDetach":{"type":"number"},"novaPilotReports":{"type":["number","null"]},"novaPilotRuns":{"type":"number"}},"required":["traces","datasetsLinked","datasetsToDelete","datasetsKeptShared","datasetsPendingDeletion","datasetsKeptSharedDetails","etlJobs","evalJobsToDetach","novaPilotReports","novaPilotRuns"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Project not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1ProjectsByIdDelete-impact","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"tags":["Projects"],"summary":"Get projected resource counts if this project were deleted","description":"Returns approximate counts of traces, datasets (exclusive vs shared, with names for both), ETL jobs, eval jobs to detach, and NovaPilot data."}},"/api/v1/projects/{id}":{"get":{"responses":{"200":{"description":"Returns the project","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"environments":{"type":"array","items":{"type":"string"}},"traceCount":{"type":"number"},"datasetItemCount":{"type":"number"}},"required":["id","name","description","organizationId","createdAt","updatedAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Project not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1ProjectsById","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"tags":["Projects"],"summary":"Get a single project","description":"Get a single project"},"put":{"responses":{"200":{"description":"Returns the updated project","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"environments":{"type":"array","items":{"type":"string"}},"traceCount":{"type":"number"},"datasetItemCount":{"type":"number"}},"required":["id","name","description","organizationId","createdAt","updatedAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Project not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"putApiV1ProjectsById","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"}},"required":["name"]}}}},"tags":["Projects"],"summary":"Update a project","description":"Update a project"},"delete":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"204":{"description":"Project deleted successfully"},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Project not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"deleteApiV1ProjectsById","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"tags":["Projects"],"summary":"Delete a project","description":"Permanently deletes a project and associated resources: traces, spans, ETL jobs (cascaded), and NovaPilot reports/runs. Datasets linked only to this project are deleted from ClickHouse; datasets still linked to other projects in the organization are kept. Eval jobs are detached (projectId set to null) rather than deleted."}},"/api/v1/projects/{id}/datasets/available":{"get":{"responses":{"200":{"description":"Returns available datasets not associated with any project"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Project not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1ProjectsByIdDatasetsAvailable","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"tags":["Projects"],"summary":"Get available datasets for project association","description":"Get available datasets for project association"}},"/api/v1/projects/{id}/datasets/associated":{"get":{"responses":{"200":{"description":"Returns datasets associated with this project"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Project not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1ProjectsByIdDatasetsAssociated","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"tags":["Projects"],"summary":"Get datasets associated with this project","description":"Get datasets associated with this project"}},"/api/v1/projects/{id}/datasets/associate":{"post":{"responses":{"200":{"description":"Dataset associated successfully"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Project not found"},"409":{"description":"Dataset already associated with another project"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1ProjectsByIdDatasetsAssociate","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"datasetId":{"type":"string","minLength":1}},"required":["datasetId"]}}}},"tags":["Projects"],"summary":"Associate a dataset with this project","description":"Associate a dataset with this project"}},"/api/v1/projects/{id}/datasets/{datasetId}":{"delete":{"responses":{"200":{"description":"Dataset dissociated successfully"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Project not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"deleteApiV1ProjectsByIdDatasetsByDatasetId","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"datasetId","required":true}],"tags":["Projects"],"summary":"Dissociate a dataset from this project","description":"Dissociate a dataset from this project"}},"/api/v1/projects/{id}/health":{"get":{"responses":{"200":{"description":"Returns aggregated scorer statistics for all datasets associated with the project"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Project not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1ProjectsByIdHealth","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"environment","schema":{"type":"string"}},{"in":"query","name":"startDate","schema":{"type":"string"}},{"in":"query","name":"endDate","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"tags":["Projects"],"summary":"Get project health dashboard data","description":"Returns aggregated scorer statistics for all datasets associated with the project. Pass startDate and endDate as ISO timestamps to compute the metrics over that window instead of the stored snapshot."}},"/api/v1/projects/{id}/health/scorers/{scorerId}":{"get":{"responses":{"200":{"description":"Returns detailed scorer statistics including individual results for a specific scorer"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Project not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1ProjectsByIdHealthScorersByScorerId","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"environment","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"scorerId","required":true}],"tags":["Projects"],"summary":"Get scorer detail data for a project","description":"Get scorer detail data for a project"}},"/api/v1/projects/{id}/usage/metrics":{"get":{"responses":{"200":{"description":"Returns project usage metrics"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Project not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1ProjectsByIdUsageMetrics","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"environment","schema":{"type":"string"}},{"in":"query","name":"timeRange","schema":{"type":"string","enum":["24h","7d","30d","90d","6m","1y"]}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"tags":["Projects"],"summary":"Get project usage metrics","description":"Returns usage metrics for a project including total traces, dataset items, and ETL job runs with percentage changes."}},"/api/v1/projects/{id}/usage/trends":{"get":{"responses":{"200":{"description":"Returns project usage trends"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Project not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1ProjectsByIdUsageTrends","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"environment","schema":{"type":"string"}},{"in":"query","name":"timeRange","schema":{"type":"string","enum":["24h","7d","30d","90d","6m","1y"]}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"tags":["Projects"],"summary":"Get project usage trends","description":"Returns time-series usage data with adaptive granularity for traces, dataset items, and ETL job runs."}},"/api/v1/projects/{id}/traces/stats":{"get":{"responses":{"200":{"description":"Returns trace statistics"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Project not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1ProjectsByIdTracesStats","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"tags":["Projects"],"summary":"Get project trace statistics","description":"Returns trace statistics for a project including total traces, last 24h, avg duration, error rate, and avg score."}},"/api/v1/projects/{id}/policies":{"get":{"responses":{},"operationId":"getApiV1ProjectsByIdPolicies","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]},"post":{"responses":{},"operationId":"postApiV1ProjectsByIdPolicies","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"COST_CAP"},"config":{"type":"object","properties":{"window":{"type":"string","enum":["1d_rolling","7d_rolling","30d_rolling","1d_calendar","1mo_calendar"]},"maxUsd":{"type":"number","exclusiveMinimum":0},"softUsd":{"type":"number","exclusiveMinimum":0},"action":{"type":"string","enum":["BLOCK"],"default":"BLOCK"},"scopeToModels":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Request-model applicability filter only. Matching requests are evaluated against aggregate project or organization spend for the configured window, including spend from other models; this does not create per-model cost budgets. Omit or use an empty list to apply the cap to every model."},"enforcementMode":{"type":"string","enum":["ADVISORY","STRICT"]}},"required":["window","maxUsd"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"RATE_LIMIT"},"config":{"type":"object","properties":{"windows":{"type":"array","items":{"type":"object","properties":{"period":{"type":"string","enum":["1m","1h","1d"]},"maxRequests":{"type":"integer","exclusiveMinimum":0},"maxTokens":{"type":"integer","exclusiveMinimum":0},"action":{"type":"string","enum":["BLOCK"],"default":"BLOCK"}},"required":["period"]},"minItems":1}},"required":["windows"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"MODEL_ALLOWLIST"},"config":{"type":"object","properties":{"allowed":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"denied":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}}}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"REGEX_MATCH"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"output"},"patterns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"regex":{"type":"string","minLength":1,"maxLength":1000},"flags":{"type":"string","maxLength":120,"default":""}},"required":["name","regex"]},"minItems":1},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"},"redactWith":{"type":"string","maxLength":120,"default":"[REDACTED]"},"regexTimeoutMs":{"type":"integer","exclusiveMinimum":0,"maximum":5000,"default":50}},"required":["patterns"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"BANNED_SUBSTRINGS"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"both"},"words":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"minItems":1},"caseInsensitive":{"type":"boolean","default":true},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"},"redactWith":{"type":"string","maxLength":120,"default":"[REDACTED]"}},"required":["words"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"PII_DETECTION"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"both"},"entities":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"MASK"},"maskChar":{"type":"string","minLength":1,"maxLength":120,"default":"*"}}}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"SECRETS_DETECTION"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"both"},"detectors":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}}}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"JSON_SCHEMA"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"output"},"schema":{"type":"object","additionalProperties":{}},"allowMarkdownCodeFences":{"type":"boolean","default":true},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}},"required":["schema"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"TOKEN_LENGTH_CAP"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"input"},"maxTokens":{"type":"integer","exclusiveMinimum":0,"maximum":100000000},"scopeToModels":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}},"required":["maxTokens"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"SCORER_GATE"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"output"},"scorer":{"type":"string","minLength":1,"maxLength":120},"threshold":{"type":"number","minimum":0,"maximum":1},"comparison":{"type":"string","enum":["lt","lte","gt","gte"],"default":"lt"},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"},"timeoutMs":{"type":"integer","exclusiveMinimum":0,"maximum":60000,"default":2000}},"required":["scorer","threshold"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"PROMPT_INJECTION"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"input"},"threshold":{"type":"number","minimum":0,"maximum":1,"default":0.8},"detectors":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}}}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"TOPIC_RESTRICTION"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"both"},"allowedTopics":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"blockedTopics":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"threshold":{"type":"number","minimum":0,"maximum":1,"default":0.7},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}}}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"CONTENT_MODERATION"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"both"},"categories":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"minItems":1},"threshold":{"type":"number","minimum":0,"maximum":1,"default":0.7},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}},"required":["categories"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"GROUNDING_CHECK"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"output"},"minGroundingScore":{"type":"number","minimum":0,"maximum":1,"default":0.7},"sourceField":{"type":"string","minLength":1,"maxLength":120,"default":"context"},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"FLAG_ONLY"}}}},"required":["name","type","config"]}]}}}}}},"/api/v1/projects/{id}/policies/state":{"get":{"responses":{},"operationId":"getApiV1ProjectsByIdPoliciesState","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/api/v1/projects/{id}/policies/effective":{"get":{"responses":{},"operationId":"getApiV1ProjectsByIdPoliciesEffective","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/api/v1/projects/{id}/policies/violations":{"get":{"responses":{},"operationId":"getApiV1ProjectsByIdPoliciesViolations","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":200}},{"in":"query","name":"since","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"until","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"policyId","schema":{"type":"string","minLength":1,"maxLength":200}},{"in":"query","name":"blockedBy","schema":{"type":"string","enum":["COST_CAP","RATE_LIMIT","MODEL_ALLOWLIST","REGEX_MATCH","BANNED_SUBSTRINGS","PII_DETECTION","SECRETS_DETECTION","JSON_SCHEMA","TOKEN_LENGTH_CAP","SCORER_GATE","PROMPT_INJECTION","TOPIC_RESTRICTION","CONTENT_MODERATION","GROUNDING_CHECK"]}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/api/v1/projects/{id}/policies/usage":{"post":{"responses":{},"operationId":"postApiV1ProjectsByIdPoliciesUsage","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"anyOf":[{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":200},"inputTokens":{"type":"integer","minimum":0,"maximum":100000000,"default":0},"outputTokens":{"type":"integer","minimum":0,"maximum":100000000,"default":0},"requestCount":{"type":"integer","minimum":1,"default":1},"timestamp":{"type":"string","format":"date-time"},"eventId":{"type":"string","minLength":1,"maxLength":200},"outcome":{"type":"string","const":"BLOCKED"},"costUsd":{"type":"number","minimum":0,"maximum":100000,"default":0},"blockedBy":{"type":"string","enum":["COST_CAP","RATE_LIMIT","MODEL_ALLOWLIST","REGEX_MATCH","BANNED_SUBSTRINGS","PII_DETECTION","SECRETS_DETECTION","JSON_SCHEMA","TOKEN_LENGTH_CAP","SCORER_GATE","PROMPT_INJECTION","TOPIC_RESTRICTION","CONTENT_MODERATION","GROUNDING_CHECK"]},"policyId":{"type":"string","minLength":1,"maxLength":200},"reason":{"type":"string","maxLength":500}},"required":["model","outcome","blockedBy"]},{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":200},"inputTokens":{"type":"integer","minimum":0,"maximum":100000000,"default":0},"outputTokens":{"type":"integer","minimum":0,"maximum":100000000,"default":0},"requestCount":{"type":"integer","minimum":1,"default":1},"timestamp":{"type":"string","format":"date-time"},"eventId":{"type":"string","minLength":1,"maxLength":200},"outcome":{"type":"string","const":"ALLOWED","default":"ALLOWED"},"costUsd":{"type":"number","minimum":0,"maximum":100000}},"required":["model","costUsd"]}]},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":200},"inputTokens":{"type":"integer","minimum":0,"maximum":100000000,"default":0},"outputTokens":{"type":"integer","minimum":0,"maximum":100000000,"default":0},"requestCount":{"type":"integer","minimum":1,"default":1},"timestamp":{"type":"string","format":"date-time"},"eventId":{"type":"string","minLength":1,"maxLength":200},"outcome":{"type":"string","const":"BLOCKED"},"costUsd":{"type":"number","minimum":0,"maximum":100000,"default":0},"blockedBy":{"type":"string","enum":["COST_CAP","RATE_LIMIT","MODEL_ALLOWLIST","REGEX_MATCH","BANNED_SUBSTRINGS","PII_DETECTION","SECRETS_DETECTION","JSON_SCHEMA","TOKEN_LENGTH_CAP","SCORER_GATE","PROMPT_INJECTION","TOPIC_RESTRICTION","CONTENT_MODERATION","GROUNDING_CHECK"]},"policyId":{"type":"string","minLength":1,"maxLength":200},"reason":{"type":"string","maxLength":500}},"required":["model","outcome","blockedBy"]},{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":200},"inputTokens":{"type":"integer","minimum":0,"maximum":100000000,"default":0},"outputTokens":{"type":"integer","minimum":0,"maximum":100000000,"default":0},"requestCount":{"type":"integer","minimum":1,"default":1},"timestamp":{"type":"string","format":"date-time"},"eventId":{"type":"string","minLength":1,"maxLength":200},"outcome":{"type":"string","const":"ALLOWED","default":"ALLOWED"},"costUsd":{"type":"number","minimum":0,"maximum":100000}},"required":["model","costUsd"]}]},"minItems":1,"maxItems":500}]}}}}}},"/api/v1/projects/{id}/policies/admit":{"post":{"responses":{},"operationId":"postApiV1ProjectsByIdPoliciesAdmit","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":200},"provider":{"type":"string","minLength":1,"maxLength":100},"model":{"type":"string","minLength":1,"maxLength":200},"estimatedInputTokens":{"type":"integer","minimum":0,"maximum":100000000,"default":0},"maximumOutputTokens":{"type":"integer","minimum":0,"maximum":100000000,"default":0},"estimatedCostUsd":{"type":"number","minimum":0,"maximum":100000},"forceStrictCostCaps":{"type":"boolean","default":false}},"required":["requestId","model","estimatedCostUsd"]}}}}}},"/api/v1/projects/{id}/policies/reservations/{reservationId}/complete":{"post":{"responses":{},"operationId":"postApiV1ProjectsByIdPoliciesReservationsByReservationIdComplete","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"reservationId","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":200},"inputTokens":{"type":"integer","minimum":0,"maximum":100000000,"default":0},"outputTokens":{"type":"integer","minimum":0,"maximum":100000000,"default":0},"costUsd":{"type":"number","minimum":0,"maximum":100000},"requestCount":{"type":"integer","minimum":1,"default":1},"timestamp":{"type":"string","format":"date-time"},"eventId":{"type":"string","minLength":1,"maxLength":200}},"required":["costUsd"]}}}}}},"/api/v1/projects/{id}/policies/reservations/{reservationId}/abandon":{"post":{"responses":{},"operationId":"postApiV1ProjectsByIdPoliciesReservationsByReservationIdAbandon","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"reservationId","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}},"default":{}}}}}}},"/api/v1/projects/{id}/policies/reservations/{reservationId}/cancel":{"post":{"responses":{},"operationId":"postApiV1ProjectsByIdPoliciesReservationsByReservationIdCancel","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"reservationId","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}},"default":{}}}}}}},"/api/v1/projects/{id}/policies/{policyId}":{"get":{"responses":{},"operationId":"getApiV1ProjectsByIdPoliciesByPolicyId","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"policyId","required":true}]},"put":{"responses":{},"operationId":"putApiV1ProjectsByIdPoliciesByPolicyId","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"policyId","required":true}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"COST_CAP"},"config":{"type":"object","properties":{"window":{"type":"string","enum":["1d_rolling","7d_rolling","30d_rolling","1d_calendar","1mo_calendar"]},"maxUsd":{"type":"number","exclusiveMinimum":0},"softUsd":{"type":"number","exclusiveMinimum":0},"action":{"type":"string","enum":["BLOCK"],"default":"BLOCK"},"scopeToModels":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Request-model applicability filter only. Matching requests are evaluated against aggregate project or organization spend for the configured window, including spend from other models; this does not create per-model cost budgets. Omit or use an empty list to apply the cap to every model."},"enforcementMode":{"type":"string","enum":["ADVISORY","STRICT"]}},"required":["window","maxUsd"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"RATE_LIMIT"},"config":{"type":"object","properties":{"windows":{"type":"array","items":{"type":"object","properties":{"period":{"type":"string","enum":["1m","1h","1d"]},"maxRequests":{"type":"integer","exclusiveMinimum":0},"maxTokens":{"type":"integer","exclusiveMinimum":0},"action":{"type":"string","enum":["BLOCK"],"default":"BLOCK"}},"required":["period"]},"minItems":1}},"required":["windows"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"MODEL_ALLOWLIST"},"config":{"type":"object","properties":{"allowed":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"denied":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}}}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"REGEX_MATCH"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"output"},"patterns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"regex":{"type":"string","minLength":1,"maxLength":1000},"flags":{"type":"string","maxLength":120,"default":""}},"required":["name","regex"]},"minItems":1},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"},"redactWith":{"type":"string","maxLength":120,"default":"[REDACTED]"},"regexTimeoutMs":{"type":"integer","exclusiveMinimum":0,"maximum":5000,"default":50}},"required":["patterns"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"BANNED_SUBSTRINGS"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"both"},"words":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"minItems":1},"caseInsensitive":{"type":"boolean","default":true},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"},"redactWith":{"type":"string","maxLength":120,"default":"[REDACTED]"}},"required":["words"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"PII_DETECTION"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"both"},"entities":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"MASK"},"maskChar":{"type":"string","minLength":1,"maxLength":120,"default":"*"}}}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"SECRETS_DETECTION"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"both"},"detectors":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}}}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"JSON_SCHEMA"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"output"},"schema":{"type":"object","additionalProperties":{}},"allowMarkdownCodeFences":{"type":"boolean","default":true},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}},"required":["schema"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"TOKEN_LENGTH_CAP"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"input"},"maxTokens":{"type":"integer","exclusiveMinimum":0,"maximum":100000000},"scopeToModels":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}},"required":["maxTokens"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"SCORER_GATE"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"output"},"scorer":{"type":"string","minLength":1,"maxLength":120},"threshold":{"type":"number","minimum":0,"maximum":1},"comparison":{"type":"string","enum":["lt","lte","gt","gte"],"default":"lt"},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"},"timeoutMs":{"type":"integer","exclusiveMinimum":0,"maximum":60000,"default":2000}},"required":["scorer","threshold"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"PROMPT_INJECTION"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"input"},"threshold":{"type":"number","minimum":0,"maximum":1,"default":0.8},"detectors":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}}}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"TOPIC_RESTRICTION"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"both"},"allowedTopics":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"blockedTopics":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"threshold":{"type":"number","minimum":0,"maximum":1,"default":0.7},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}}}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"CONTENT_MODERATION"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"both"},"categories":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"minItems":1},"threshold":{"type":"number","minimum":0,"maximum":1,"default":0.7},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}},"required":["categories"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"GROUNDING_CHECK"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"output"},"minGroundingScore":{"type":"number","minimum":0,"maximum":1,"default":0.7},"sourceField":{"type":"string","minLength":1,"maxLength":120,"default":"context"},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"FLAG_ONLY"}}}},"required":["name","type","config"]}]}}}}},"delete":{"responses":{},"operationId":"deleteApiV1ProjectsByIdPoliciesByPolicyId","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"policyId","required":true}]}},"/api/v1/organizations/{orgId}/policies":{"get":{"responses":{},"operationId":"getApiV1OrganizationsByOrgIdPolicies","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"orgId","required":true}]},"post":{"responses":{},"operationId":"postApiV1OrganizationsByOrgIdPolicies","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"orgId","required":true}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"COST_CAP"},"config":{"type":"object","properties":{"window":{"type":"string","enum":["1d_rolling","7d_rolling","30d_rolling","1d_calendar","1mo_calendar"]},"maxUsd":{"type":"number","exclusiveMinimum":0},"softUsd":{"type":"number","exclusiveMinimum":0},"action":{"type":"string","enum":["BLOCK"],"default":"BLOCK"},"scopeToModels":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Request-model applicability filter only. Matching requests are evaluated against aggregate project or organization spend for the configured window, including spend from other models; this does not create per-model cost budgets. Omit or use an empty list to apply the cap to every model."},"enforcementMode":{"type":"string","enum":["ADVISORY","STRICT"]}},"required":["window","maxUsd"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"RATE_LIMIT"},"config":{"type":"object","properties":{"windows":{"type":"array","items":{"type":"object","properties":{"period":{"type":"string","enum":["1m","1h","1d"]},"maxRequests":{"type":"integer","exclusiveMinimum":0},"maxTokens":{"type":"integer","exclusiveMinimum":0},"action":{"type":"string","enum":["BLOCK"],"default":"BLOCK"}},"required":["period"]},"minItems":1}},"required":["windows"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"MODEL_ALLOWLIST"},"config":{"type":"object","properties":{"allowed":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"denied":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}}}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"REGEX_MATCH"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"output"},"patterns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"regex":{"type":"string","minLength":1,"maxLength":1000},"flags":{"type":"string","maxLength":120,"default":""}},"required":["name","regex"]},"minItems":1},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"},"redactWith":{"type":"string","maxLength":120,"default":"[REDACTED]"},"regexTimeoutMs":{"type":"integer","exclusiveMinimum":0,"maximum":5000,"default":50}},"required":["patterns"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"BANNED_SUBSTRINGS"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"both"},"words":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"minItems":1},"caseInsensitive":{"type":"boolean","default":true},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"},"redactWith":{"type":"string","maxLength":120,"default":"[REDACTED]"}},"required":["words"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"PII_DETECTION"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"both"},"entities":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"MASK"},"maskChar":{"type":"string","minLength":1,"maxLength":120,"default":"*"}}}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"SECRETS_DETECTION"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"both"},"detectors":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}}}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"JSON_SCHEMA"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"output"},"schema":{"type":"object","additionalProperties":{}},"allowMarkdownCodeFences":{"type":"boolean","default":true},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}},"required":["schema"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"TOKEN_LENGTH_CAP"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"input"},"maxTokens":{"type":"integer","exclusiveMinimum":0,"maximum":100000000},"scopeToModels":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}},"required":["maxTokens"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"SCORER_GATE"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"output"},"scorer":{"type":"string","minLength":1,"maxLength":120},"threshold":{"type":"number","minimum":0,"maximum":1},"comparison":{"type":"string","enum":["lt","lte","gt","gte"],"default":"lt"},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"},"timeoutMs":{"type":"integer","exclusiveMinimum":0,"maximum":60000,"default":2000}},"required":["scorer","threshold"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"PROMPT_INJECTION"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"input"},"threshold":{"type":"number","minimum":0,"maximum":1,"default":0.8},"detectors":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}}}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"TOPIC_RESTRICTION"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"both"},"allowedTopics":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"blockedTopics":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"threshold":{"type":"number","minimum":0,"maximum":1,"default":0.7},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}}}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"CONTENT_MODERATION"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"both"},"categories":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"minItems":1},"threshold":{"type":"number","minimum":0,"maximum":1,"default":0.7},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}},"required":["categories"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"GROUNDING_CHECK"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"output"},"minGroundingScore":{"type":"number","minimum":0,"maximum":1,"default":0.7},"sourceField":{"type":"string","minLength":1,"maxLength":120,"default":"context"},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"FLAG_ONLY"}}}},"required":["name","type","config"]}]}}}}}},"/api/v1/organizations/{orgId}/policies/state":{"get":{"responses":{},"operationId":"getApiV1OrganizationsByOrgIdPoliciesState","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"orgId","required":true}]}},"/api/v1/organizations/{orgId}/policies/effective":{"get":{"responses":{},"operationId":"getApiV1OrganizationsByOrgIdPoliciesEffective","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"orgId","required":true}]}},"/api/v1/organizations/{orgId}/policies/violations":{"get":{"responses":{},"operationId":"getApiV1OrganizationsByOrgIdPoliciesViolations","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"in":"query","name":"cursor","schema":{"type":"string","minLength":1,"maxLength":200}},{"in":"query","name":"since","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"until","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"policyId","schema":{"type":"string","minLength":1,"maxLength":200}},{"in":"query","name":"blockedBy","schema":{"type":"string","enum":["COST_CAP","RATE_LIMIT","MODEL_ALLOWLIST","REGEX_MATCH","BANNED_SUBSTRINGS","PII_DETECTION","SECRETS_DETECTION","JSON_SCHEMA","TOKEN_LENGTH_CAP","SCORER_GATE","PROMPT_INJECTION","TOPIC_RESTRICTION","CONTENT_MODERATION","GROUNDING_CHECK"]}},{"schema":{"type":"string"},"in":"path","name":"orgId","required":true}]}},"/api/v1/organizations/{orgId}/policies/{policyId}":{"get":{"responses":{},"operationId":"getApiV1OrganizationsByOrgIdPoliciesByPolicyId","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"orgId","required":true},{"schema":{"type":"string"},"in":"path","name":"policyId","required":true}]},"put":{"responses":{},"operationId":"putApiV1OrganizationsByOrgIdPoliciesByPolicyId","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"orgId","required":true},{"schema":{"type":"string"},"in":"path","name":"policyId","required":true}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"COST_CAP"},"config":{"type":"object","properties":{"window":{"type":"string","enum":["1d_rolling","7d_rolling","30d_rolling","1d_calendar","1mo_calendar"]},"maxUsd":{"type":"number","exclusiveMinimum":0},"softUsd":{"type":"number","exclusiveMinimum":0},"action":{"type":"string","enum":["BLOCK"],"default":"BLOCK"},"scopeToModels":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Request-model applicability filter only. Matching requests are evaluated against aggregate project or organization spend for the configured window, including spend from other models; this does not create per-model cost budgets. Omit or use an empty list to apply the cap to every model."},"enforcementMode":{"type":"string","enum":["ADVISORY","STRICT"]}},"required":["window","maxUsd"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"RATE_LIMIT"},"config":{"type":"object","properties":{"windows":{"type":"array","items":{"type":"object","properties":{"period":{"type":"string","enum":["1m","1h","1d"]},"maxRequests":{"type":"integer","exclusiveMinimum":0},"maxTokens":{"type":"integer","exclusiveMinimum":0},"action":{"type":"string","enum":["BLOCK"],"default":"BLOCK"}},"required":["period"]},"minItems":1}},"required":["windows"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"MODEL_ALLOWLIST"},"config":{"type":"object","properties":{"allowed":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"denied":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}}}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"REGEX_MATCH"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"output"},"patterns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"regex":{"type":"string","minLength":1,"maxLength":1000},"flags":{"type":"string","maxLength":120,"default":""}},"required":["name","regex"]},"minItems":1},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"},"redactWith":{"type":"string","maxLength":120,"default":"[REDACTED]"},"regexTimeoutMs":{"type":"integer","exclusiveMinimum":0,"maximum":5000,"default":50}},"required":["patterns"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"BANNED_SUBSTRINGS"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"both"},"words":{"type":"array","items":{"type":"string","minLength":1,"maxLength":1000},"minItems":1},"caseInsensitive":{"type":"boolean","default":true},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"},"redactWith":{"type":"string","maxLength":120,"default":"[REDACTED]"}},"required":["words"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"PII_DETECTION"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"both"},"entities":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"MASK"},"maskChar":{"type":"string","minLength":1,"maxLength":120,"default":"*"}}}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"SECRETS_DETECTION"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"both"},"detectors":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}}}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"JSON_SCHEMA"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"output"},"schema":{"type":"object","additionalProperties":{}},"allowMarkdownCodeFences":{"type":"boolean","default":true},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}},"required":["schema"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"TOKEN_LENGTH_CAP"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"input"},"maxTokens":{"type":"integer","exclusiveMinimum":0,"maximum":100000000},"scopeToModels":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}},"required":["maxTokens"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"SCORER_GATE"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"output"},"scorer":{"type":"string","minLength":1,"maxLength":120},"threshold":{"type":"number","minimum":0,"maximum":1},"comparison":{"type":"string","enum":["lt","lte","gt","gte"],"default":"lt"},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"},"timeoutMs":{"type":"integer","exclusiveMinimum":0,"maximum":60000,"default":2000}},"required":["scorer","threshold"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"PROMPT_INJECTION"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"input"},"threshold":{"type":"number","minimum":0,"maximum":1,"default":0.8},"detectors":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}}}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"TOPIC_RESTRICTION"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"both"},"allowedTopics":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"blockedTopics":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"threshold":{"type":"number","minimum":0,"maximum":1,"default":0.7},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}}}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"CONTENT_MODERATION"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"both"},"categories":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"minItems":1},"threshold":{"type":"number","minimum":0,"maximum":1,"default":0.7},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"BLOCK"}},"required":["categories"]}},"required":["name","type","config"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"mode":{"type":"string","enum":["OFF","SHADOW","ENFORCE"]},"failClosed":{"type":"boolean","default":true},"priority":{"type":"integer","default":100},"enabled":{"type":"boolean","default":true},"type":{"type":"string","const":"GROUNDING_CHECK"},"config":{"type":"object","properties":{"phase":{"type":"string","enum":["input","output","both"],"default":"output"},"minGroundingScore":{"type":"number","minimum":0,"maximum":1,"default":0.7},"sourceField":{"type":"string","minLength":1,"maxLength":120,"default":"context"},"action":{"type":"string","enum":["ALLOW","BLOCK","REDACT","MASK","HASH","REPLACE","FLAG_ONLY"],"default":"FLAG_ONLY"}}}},"required":["name","type","config"]}]}}}}},"delete":{"responses":{},"operationId":"deleteApiV1OrganizationsByOrgIdPoliciesByPolicyId","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"orgId","required":true},{"schema":{"type":"string"},"in":"path","name":"policyId","required":true}]}},"/api/v1/etl-jobs":{"get":{"responses":{"200":{"description":"Returns all ETL jobs","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"projectId":{"type":"string"},"datasetSlug":{"type":"string"},"organizationId":{"type":"string"},"isEnabled":{"type":"boolean"},"datasetDeleted":{"type":"boolean"},"mapperCode":{"type":["string","null"]},"userId":{"type":"string"},"isConfigurationDone":{"type":"boolean"},"environment":{"type":"string"},"defaultFilterConfig":{"type":"null"},"chatMessages":{"type":["array","null"],"items":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","projectId","datasetSlug","organizationId","isEnabled","datasetDeleted","mapperCode","userId","isConfigurationDone","environment","chatMessages","createdAt","updatedAt"]}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Etl-jobs","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"query","name":"environment","schema":{"type":"string"}}],"tags":["ETL Jobs"],"summary":"Get all ETL jobs","description":"Get all ETL jobs"},"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Returns the created ETL job","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"projectId":{"type":"string"},"datasetSlug":{"type":"string"},"organizationId":{"type":"string"},"isEnabled":{"type":"boolean"},"datasetDeleted":{"type":"boolean"},"mapperCode":{"type":["string","null"]},"userId":{"type":"string"},"isConfigurationDone":{"type":"boolean"},"environment":{"type":"string"},"defaultFilterConfig":{"type":"null"},"chatMessages":{"type":["array","null"],"items":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","projectId","datasetSlug","organizationId","isEnabled","datasetDeleted","mapperCode","userId","isConfigurationDone","environment","chatMessages","createdAt","updatedAt"]}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Etl-jobs","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"query","name":"environment","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"projectId":{"type":"string"},"datasetSlug":{"type":"string"},"isEnabled":{"type":"boolean","default":true},"mapperCode":{"type":"string"},"isConfigurationDone":{"type":"boolean","default":false},"environment":{"type":"string"},"defaultFilterConfig":{"type":"object","properties":{"startDate":{"type":"string"},"endDate":{"type":"string"},"projectId":{"type":"string"},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100000},"status":{"anyOf":[{"type":"string","enum":["ok","error","timeout"]},{"type":"array","items":{"type":"string","enum":["ok","error","timeout"]}}]},"durationMsGte":{"type":"number"},"durationMsLte":{"type":"number"},"spanCountGte":{"type":"integer"},"spanCountLte":{"type":"integer"},"errorCountGte":{"type":"integer"},"errorCountLte":{"type":"integer"},"name":{"type":"string"},"serviceName":{"type":"string"},"userId":{"type":"string"},"sessionId":{"type":"string"},"hasLlmSpans":{"type":"boolean"},"hasToolCalls":{"type":"boolean"},"hasRag":{"type":"boolean"},"search":{"type":"string"},"serviceVersion":{"type":"string"}}}},"required":["name","projectId","datasetSlug","environment"]}}}},"tags":["ETL Jobs"],"summary":"Create a new ETL job","description":"Create a new ETL job"}},"/api/v1/etl-jobs/datasets":{"get":{"responses":{"200":{"description":"Returns list of datasets"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Etl-jobsDatasets","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"query","name":"environment","schema":{"type":"string"}}],"tags":["ETL Jobs"],"summary":"Get datasets associated with ETL jobs","description":"Returns all datasets linked to ETL jobs for a project"}},"/api/v1/etl-jobs/{id}":{"get":{"responses":{"200":{"description":"Returns the ETL job","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"projectId":{"type":"string"},"datasetSlug":{"type":"string"},"organizationId":{"type":"string"},"isEnabled":{"type":"boolean"},"datasetDeleted":{"type":"boolean"},"mapperCode":{"type":["string","null"]},"userId":{"type":"string"},"isConfigurationDone":{"type":"boolean"},"environment":{"type":"string"},"defaultFilterConfig":{"type":"null"},"chatMessages":{"type":["array","null"],"items":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","projectId","datasetSlug","organizationId","isEnabled","datasetDeleted","mapperCode","userId","isConfigurationDone","environment","chatMessages","createdAt","updatedAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"ETL job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Etl-jobsById","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"query","name":"environment","schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string","description":"ETL job ID"},"required":true}],"tags":["ETL Jobs"],"summary":"Get a single ETL job","description":"Get a single ETL job"},"put":{"responses":{"200":{"description":"Returns the updated ETL job","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"projectId":{"type":"string"},"datasetSlug":{"type":"string"},"organizationId":{"type":"string"},"isEnabled":{"type":"boolean"},"datasetDeleted":{"type":"boolean"},"mapperCode":{"type":["string","null"]},"userId":{"type":"string"},"isConfigurationDone":{"type":"boolean"},"environment":{"type":"string"},"defaultFilterConfig":{"type":"null"},"chatMessages":{"type":["array","null"],"items":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","projectId","datasetSlug","organizationId","isEnabled","datasetDeleted","mapperCode","userId","isConfigurationDone","environment","chatMessages","createdAt","updatedAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"ETL job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"putApiV1Etl-jobsById","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"query","name":"environment","schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string","description":"ETL job ID"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"projectId":{"type":"string"},"datasetSlug":{"type":"string"},"isEnabled":{"type":"boolean"},"mapperCode":{"type":"string"},"isConfigurationDone":{"type":"boolean"},"environment":{"type":"string"},"defaultFilterConfig":{"type":["object","null"],"properties":{"startDate":{"type":"string"},"endDate":{"type":"string"},"projectId":{"type":"string"},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100000},"status":{"anyOf":[{"type":"string","enum":["ok","error","timeout"]},{"type":"array","items":{"type":"string","enum":["ok","error","timeout"]}}]},"durationMsGte":{"type":"number"},"durationMsLte":{"type":"number"},"spanCountGte":{"type":"integer"},"spanCountLte":{"type":"integer"},"errorCountGte":{"type":"integer"},"errorCountLte":{"type":"integer"},"name":{"type":"string"},"serviceName":{"type":"string"},"userId":{"type":"string"},"sessionId":{"type":"string"},"hasLlmSpans":{"type":"boolean"},"hasToolCalls":{"type":"boolean"},"hasRag":{"type":"boolean"},"search":{"type":"string"},"serviceVersion":{"type":"string"}}},"chatMessages":{"type":"array","items":{}},"datasetDeleted":{"type":"boolean"}}}}}},"tags":["ETL Jobs"],"summary":"Update an ETL job","description":"Update an ETL job"},"delete":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"204":{"description":"ETL job deleted successfully"},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"ETL job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"deleteApiV1Etl-jobsById","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"query","name":"environment","schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string","description":"ETL job ID"},"required":true}],"tags":["ETL Jobs"],"summary":"Delete an ETL job","description":"Delete an ETL job"}},"/api/v1/etl-jobs/{id}/clone":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Returns the cloned ETL job","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"projectId":{"type":"string"},"datasetSlug":{"type":"string"},"organizationId":{"type":"string"},"isEnabled":{"type":"boolean"},"datasetDeleted":{"type":"boolean"},"mapperCode":{"type":["string","null"]},"userId":{"type":"string"},"isConfigurationDone":{"type":"boolean"},"environment":{"type":"string"},"defaultFilterConfig":{"type":"null"},"chatMessages":{"type":["array","null"],"items":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","projectId","datasetSlug","organizationId","isEnabled","datasetDeleted","mapperCode","userId","isConfigurationDone","environment","chatMessages","createdAt","updatedAt"]}}}},"400":{"description":"Environment does not exist for the target project"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"ETL job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Etl-jobsByIdClone","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"query","name":"environment","schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string","description":"ETL job ID"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"projectId":{"type":"string"},"environment":{"type":"string"},"datasetSlug":{"type":"string"}}}}}},"tags":["ETL Jobs"],"summary":"Clone an ETL job","description":"Creates a copy of an ETL job, optionally overriding name, project, environment, or dataset. The clone starts with real-time processing disabled."}},"/api/v1/etl-jobs/run-mapper":{"post":{"responses":{"200":{"description":"Returns the transformed data","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"output":{},"error":{"type":"string"},"executionTime":{"type":"number"}},"required":["success","executionTime"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Trace not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Etl-jobsRun-mapper","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"query","name":"environment","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mapperCode":{"type":"string"},"traceId":{"type":"string"}},"required":["mapperCode","traceId"]}}}},"tags":["ETL Jobs"],"summary":"Run mapper code with trace ID","description":"Run mapper code with trace ID"}},"/api/v1/etl-jobs/{id}/trace-filter-preview":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Etl-jobsByIdTrace-filter-preview","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"query","name":"environment","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"filterConfig":{"type":"object","properties":{"startDate":{"type":"string"},"endDate":{"type":"string"},"projectId":{"type":"string"},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100000},"status":{"anyOf":[{"type":"string","enum":["ok","error","timeout"]},{"type":"array","items":{"type":"string","enum":["ok","error","timeout"]}}]},"durationMsGte":{"type":"number"},"durationMsLte":{"type":"number"},"spanCountGte":{"type":"integer"},"spanCountLte":{"type":"integer"},"errorCountGte":{"type":"integer"},"errorCountLte":{"type":"integer"},"name":{"type":"string"},"serviceName":{"type":"string"},"userId":{"type":"string"},"sessionId":{"type":"string"},"hasLlmSpans":{"type":"boolean"},"hasToolCalls":{"type":"boolean"},"hasRag":{"type":"boolean"},"search":{"type":"string"},"serviceVersion":{"type":"string"}}},"skipProcessed":{"type":"boolean","default":true}},"required":["filterConfig"]}}}},"tags":["ETL Jobs"],"summary":"Preview trace counts for an ETL filter","description":"Preview trace counts for an ETL filter"}},"/api/v1/etl-jobs/{id}/trigger":{"post":{"responses":{"200":{"description":"ETL job run created and queued","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"etlJobId":{"type":"string"},"datasetSlug":{"type":["string","null"]},"startTime":{"type":["string","null"]},"endTime":{"type":["string","null"]},"status":{"type":"string"},"tracesProcessed":{"type":"number"},"tracesFailed":{"type":"number"},"tracesWithoutItems":{"type":"number"},"datasetItemsCreated":{"type":"number"},"error":{"type":["string","null"]},"traceErrors":{"type":["array","null"],"items":{"type":"object","properties":{"traceId":{"type":"string"},"error":{"type":"string"}},"required":["traceId","error"]}},"traceIds":{"type":"array","items":{"type":"string"}},"traceCount":{"type":"number"},"filterConfig":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","etlJobId","datasetSlug","startTime","endTime","status","tracesProcessed","tracesFailed","tracesWithoutItems","datasetItemsCreated","error","traceErrors","traceIds","traceCount","filterConfig","createdAt","updatedAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid request or job not configured"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"ETL job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Etl-jobsByIdTrigger","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"query","name":"environment","schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string","description":"ETL job ID"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"traceIds":{"type":"array","items":{"type":"string"}},"filterConfig":{"type":"object","properties":{"startDate":{"type":"string"},"endDate":{"type":"string"},"projectId":{"type":"string"},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100000},"status":{"anyOf":[{"type":"string","enum":["ok","error","timeout"]},{"type":"array","items":{"type":"string","enum":["ok","error","timeout"]}}]},"durationMsGte":{"type":"number"},"durationMsLte":{"type":"number"},"spanCountGte":{"type":"integer"},"spanCountLte":{"type":"integer"},"errorCountGte":{"type":"integer"},"errorCountLte":{"type":"integer"},"name":{"type":"string"},"serviceName":{"type":"string"},"userId":{"type":"string"},"sessionId":{"type":"string"},"hasLlmSpans":{"type":"boolean"},"hasToolCalls":{"type":"boolean"},"hasRag":{"type":"boolean"},"search":{"type":"string"},"serviceVersion":{"type":"string"}}},"datasetSlug":{"type":"string"},"skipProcessed":{"type":"boolean","default":true}}}}}},"tags":["ETL Jobs"],"summary":"Run ETL job with optional trace selection","description":"Run ETL job with optional trace selection"}},"/api/v1/etl-jobs/{id}/runs":{"get":{"responses":{"200":{"description":"Returns all runs for the ETL job","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"etlJobId":{"type":"string"},"datasetSlug":{"type":["string","null"]},"startTime":{"type":["string","null"]},"endTime":{"type":["string","null"]},"status":{"type":"string"},"tracesProcessed":{"type":"number"},"tracesFailed":{"type":"number"},"tracesWithoutItems":{"type":"number"},"datasetItemsCreated":{"type":"number"},"error":{"type":["string","null"]},"traceCount":{"type":"number"},"filterConfig":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","etlJobId","datasetSlug","startTime","endTime","status","tracesProcessed","tracesFailed","tracesWithoutItems","datasetItemsCreated","error","traceCount","filterConfig","createdAt","updatedAt"]}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"ETL job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Etl-jobsByIdRuns","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"query","name":"environment","schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string","description":"ETL job ID"},"required":true}],"tags":["ETL Jobs"],"summary":"Get all runs for an ETL job","description":"Get all runs for an ETL job"}},"/api/v1/etl-jobs/{id}/runs/{runId}":{"get":{"responses":{"200":{"description":"Run details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"etlJobId":{"type":"string"},"datasetSlug":{"type":["string","null"]},"startTime":{"type":["string","null"]},"endTime":{"type":["string","null"]},"status":{"type":"string"},"tracesProcessed":{"type":"number"},"tracesFailed":{"type":"number"},"tracesWithoutItems":{"type":"number"},"datasetItemsCreated":{"type":"number"},"error":{"type":["string","null"]},"traceErrors":{"type":["array","null"],"items":{"type":"object","properties":{"traceId":{"type":"string"},"error":{"type":"string"}},"required":["traceId","error"]}},"traceIds":{"type":"array","items":{"type":"string"}},"traceCount":{"type":"number"},"filterConfig":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","etlJobId","datasetSlug","startTime","endTime","status","tracesProcessed","tracesFailed","tracesWithoutItems","datasetItemsCreated","error","traceErrors","traceIds","traceCount","filterConfig","createdAt","updatedAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"ETL job run not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Etl-jobsByIdRunsByRunId","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"query","name":"environment","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"runId","required":true}],"tags":["ETL Jobs"],"summary":"Get full details for an ETL job run","description":"Get full details for an ETL job run"}},"/api/v1/etl-jobs/{id}/status":{"get":{"responses":{"200":{"description":"Returns ETL job status and queue statistics","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"etlJob":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isEnabled":{"type":"boolean"},"isConfigurationDone":{"type":"boolean"}},"required":["id","name","isEnabled","isConfigurationDone"]},"queueStats":{}},"required":["success","etlJob"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"ETL job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Etl-jobsByIdStatus","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"query","name":"environment","schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string","description":"ETL job ID"},"required":true}],"tags":["ETL Jobs"],"summary":"Get ETL job status and queue stats","description":"Get ETL job status and queue stats"}},"/api/v1/etl-jobs/{id}/versions":{"get":{"responses":{"200":{"description":"Returns all code versions","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"etlJobId":{"type":"string"},"version":{"type":"number"},"code":{"type":"string"},"description":{"type":["string","null"]},"source":{"type":"string"},"createdBy":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","etlJobId","version","code","description","source","createdBy","createdAt"]}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"ETL job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Etl-jobsByIdVersions","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"query","name":"environment","schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string","description":"ETL job ID"},"required":true}],"tags":["ETL Jobs"],"summary":"Get all code versions for an ETL job","description":"Get all code versions for an ETL job"},"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Returns the created code version","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"etlJobId":{"type":"string"},"version":{"type":"number"},"code":{"type":"string"},"description":{"type":["string","null"]},"source":{"type":"string"},"createdBy":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","etlJobId","version","code","description","source","createdBy","createdAt"]}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"ETL job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Etl-jobsByIdVersions","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"query","name":"environment","schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string","description":"ETL job ID"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"},"source":{"type":"string","enum":["manual","ai_generated","ai_improved"],"default":"manual"}},"required":["code"]}}}},"tags":["ETL Jobs"],"summary":"Create a new code version","description":"Create a new code version"}},"/api/v1/etl-jobs/{id}/versions/{versionId}/revert":{"post":{"responses":{"200":{"description":"Returns the updated ETL job","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"projectId":{"type":"string"},"datasetSlug":{"type":"string"},"organizationId":{"type":"string"},"isEnabled":{"type":"boolean"},"datasetDeleted":{"type":"boolean"},"mapperCode":{"type":["string","null"]},"userId":{"type":"string"},"isConfigurationDone":{"type":"boolean"},"environment":{"type":"string"},"defaultFilterConfig":{"type":"null"},"chatMessages":{"type":["array","null"],"items":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","projectId","datasetSlug","organizationId","isEnabled","datasetDeleted","mapperCode","userId","isConfigurationDone","environment","chatMessages","createdAt","updatedAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"ETL job or version not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Etl-jobsByIdVersionsByVersionIdRevert","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"query","name":"environment","schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string","description":"ETL job ID"},"required":true},{"in":"path","name":"versionId","schema":{"type":"string","description":"Code version ID"},"required":true}],"tags":["ETL Jobs"],"summary":"Revert to a specific code version","description":"Revert to a specific code version"}},"/api/v1/etl-jobs/{id}/runs/{runId}/cancel":{"post":{"responses":{"200":{"description":"Job run cancelled successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"cancelled":{"type":"boolean"},"id":{"type":"string"},"status":{"type":"string"}},"required":["success","cancelled","id","status"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Cannot cancel job run in current state"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Job run not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Etl-jobsByIdRunsByRunIdCancel","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"query","name":"environment","schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string","description":"ETL job ID"},"required":true},{"in":"path","name":"runId","schema":{"type":"string","description":"ETL job run ID"},"required":true}],"tags":["ETL Jobs"],"summary":"Cancel an ETL job run","description":"Cancel an ETL job run"}},"/api/v1/etl-jobs/{id}/novaeval/transformation-code-gen":{"post":{"responses":{"200":{"description":"NovaEval job queued successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"etlJobId":{"type":["string","null"]},"organizationId":{"type":"string"},"jobType":{"type":"string"},"status":{"type":"string"},"traceIds":{"type":"array","items":{"type":"string"}},"traces":{"type":"array","items":{}},"inputCode":{"type":["string","null"]},"suggestionText":{"type":["string","null"]},"outputCode":{"type":["string","null"]},"output":{"type":["string","null"]},"error":{"type":["string","null"]},"errorCode":{"type":["string","null"]},"logs":{"type":["array","null"],"items":{"type":"object","properties":{"timestamp":{"type":"string"},"level":{"type":"string","enum":["info","warn","error"]},"agent":{"type":"string"},"step":{"type":"string"},"message":{"type":"string"},"data":{"type":"object","additionalProperties":{}}},"required":["timestamp","level","agent","step","message"]}},"executionTimeMs":{"type":["number","null"]},"startTime":{"type":["string","null"]},"endTime":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","etlJobId","organizationId","jobType","status","traceIds","inputCode","suggestionText","outputCode","output","error","errorCode","logs","executionTimeMs","startTime","endTime","createdAt","updatedAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"ETL job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Etl-jobsByIdNovaevalTransformation-code-gen","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"traceIds":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":30}},"required":["traceIds"]}}}},"tags":["ETL Jobs - NovaEval"],"summary":"Generate transformation code using NovaEval","description":"Generate transformation code using NovaEval"}},"/api/v1/etl-jobs/{id}/novaeval/transform-improver-human":{"post":{"responses":{"200":{"description":"NovaEval job queued successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"etlJobId":{"type":["string","null"]},"organizationId":{"type":"string"},"jobType":{"type":"string"},"status":{"type":"string"},"traceIds":{"type":"array","items":{"type":"string"}},"traces":{"type":"array","items":{}},"inputCode":{"type":["string","null"]},"suggestionText":{"type":["string","null"]},"outputCode":{"type":["string","null"]},"output":{"type":["string","null"]},"error":{"type":["string","null"]},"errorCode":{"type":["string","null"]},"logs":{"type":["array","null"],"items":{"type":"object","properties":{"timestamp":{"type":"string"},"level":{"type":"string","enum":["info","warn","error"]},"agent":{"type":"string"},"step":{"type":"string"},"message":{"type":"string"},"data":{"type":"object","additionalProperties":{}}},"required":["timestamp","level","agent","step","message"]}},"executionTimeMs":{"type":["number","null"]},"startTime":{"type":["string","null"]},"endTime":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","etlJobId","organizationId","jobType","status","traceIds","inputCode","suggestionText","outputCode","output","error","errorCode","logs","executionTimeMs","startTime","endTime","createdAt","updatedAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"ETL job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Etl-jobsByIdNovaevalTransform-improver-human","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"traceIds":{"type":"array","items":{"type":"string"},"maxItems":30,"default":[]},"code":{"type":"string"},"suggestionText":{"type":"string","minLength":1}},"required":["code","suggestionText"]}}}},"tags":["ETL Jobs - NovaEval"],"summary":"Improve transformation code using NovaEval with human suggestion","description":"Improve transformation code using NovaEval with human suggestion"}},"/api/v1/etl-jobs/{id}/novaeval/sample-traces":{"get":{"responses":{"200":{"description":"Sample traces with pick reasons","content":{"application/json":{"schema":{"type":"object","properties":{"strategy":{"type":"string","enum":["diverse","recent"]},"traces":{"type":"array","items":{"type":"object","properties":{"traceId":{"type":"string"},"spanCount":{"type":"number"},"errorCount":{"type":"number"},"durationMs":{"type":"number"},"spanNames":{"type":"array","items":{"type":"string"}},"hasTelemetryMarkers":{"type":"boolean"},"toolSpans":{"type":"number"},"pickReason":{"type":"string"}},"required":["traceId","pickReason"]}}},"required":["strategy","traces"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"ETL job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Etl-jobsByIdNovaevalSample-traces","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":30,"default":30}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"tags":["ETL Jobs - NovaEval"],"summary":"Pick a diverse set of sample traces for mapper generation (span-shape, tool, telemetry and error/success coverage)","description":"Pick a diverse set of sample traces for mapper generation (span-shape, tool, telemetry and error/success coverage)"}},"/api/v1/etl-jobs/{id}/novaeval/{jobRunId}":{"get":{"responses":{"200":{"description":"Returns NovaEval job run details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"etlJobId":{"type":["string","null"]},"organizationId":{"type":"string"},"jobType":{"type":"string"},"status":{"type":"string"},"traceIds":{"type":"array","items":{"type":"string"}},"traces":{"type":"array","items":{}},"inputCode":{"type":["string","null"]},"suggestionText":{"type":["string","null"]},"outputCode":{"type":["string","null"]},"output":{"type":["string","null"]},"error":{"type":["string","null"]},"errorCode":{"type":["string","null"]},"logs":{"type":["array","null"],"items":{"type":"object","properties":{"timestamp":{"type":"string"},"level":{"type":"string","enum":["info","warn","error"]},"agent":{"type":"string"},"step":{"type":"string"},"message":{"type":"string"},"data":{"type":"object","additionalProperties":{}}},"required":["timestamp","level","agent","step","message"]}},"executionTimeMs":{"type":["number","null"]},"startTime":{"type":["string","null"]},"endTime":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","etlJobId","organizationId","jobType","status","traceIds","inputCode","suggestionText","outputCode","output","error","errorCode","logs","executionTimeMs","startTime","endTime","createdAt","updatedAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Job run not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Etl-jobsByIdNovaevalByJobRunId","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"includeTraces","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"jobRunId","required":true}],"tags":["ETL Jobs - NovaEval"],"summary":"Get NovaEval job run status","description":"Get NovaEval job run status"}},"/api/v1/etl-jobs/{id}/novaeval":{"get":{"responses":{"200":{"description":"Returns all NovaEval job runs","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"etlJobId":{"type":["string","null"]},"organizationId":{"type":"string"},"jobType":{"type":"string"},"status":{"type":"string"},"traceIds":{"type":"array","items":{"type":"string"}},"traces":{"type":"array","items":{}},"inputCode":{"type":["string","null"]},"suggestionText":{"type":["string","null"]},"outputCode":{"type":["string","null"]},"output":{"type":["string","null"]},"error":{"type":["string","null"]},"errorCode":{"type":["string","null"]},"logs":{"type":["array","null"],"items":{"type":"object","properties":{"timestamp":{"type":"string"},"level":{"type":"string","enum":["info","warn","error"]},"agent":{"type":"string"},"step":{"type":"string"},"message":{"type":"string"},"data":{"type":"object","additionalProperties":{}}},"required":["timestamp","level","agent","step","message"]}},"executionTimeMs":{"type":["number","null"]},"startTime":{"type":["string","null"]},"endTime":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","etlJobId","organizationId","jobType","status","traceIds","inputCode","suggestionText","outputCode","output","error","errorCode","logs","executionTimeMs","startTime","endTime","createdAt","updatedAt"]}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"ETL job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Etl-jobsByIdNovaeval","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"includeTraces","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"tags":["ETL Jobs - NovaEval"],"summary":"Get all NovaEval job runs for an ETL job","description":"Get all NovaEval job runs for an ETL job"}},"/api/v1/etl-jobs/{id}/novaeval/{jobRunId}/cancel":{"post":{"responses":{"200":{"description":"Job cancelled successfully"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Job run not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Etl-jobsByIdNovaevalByJobRunIdCancel","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"jobRunId","required":true}],"tags":["ETL Jobs - NovaEval"],"summary":"Cancel a NovaEval job run","description":"Cancel a NovaEval job run"}},"/api/v1/etl-jobs/{id}/novaeval/cancel-all":{"post":{"responses":{"200":{"description":"Jobs cancelled successfully"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"ETL job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Etl-jobsByIdNovaevalCancel-all","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"tags":["ETL Jobs - NovaEval"],"summary":"Cancel all pending NovaEval job runs for an ETL job","description":"Cancel all pending NovaEval job runs for an ETL job"}},"/api/v1/eval-jobs":{"get":{"responses":{"200":{"description":"Returns all eval jobs","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"datasetId":{"type":"string"},"datasetSlug":{"type":"string"},"datasetType":{"type":["string","null"]},"datasetName":{"type":"string"},"organizationId":{"type":"string"},"status":{"type":"string"},"scorerConfigs":{"type":"array","items":{}},"scorerIds":{"type":"array","items":{"type":"string"}},"scorerNames":{"type":"array","items":{"type":"string"}},"defaultFilterConfig":{"type":"null"},"evalPolicy":{"type":["object","null"],"properties":{"version":{"type":"number","const":1},"sampling":{"type":"object","properties":{"percent":{"type":"number","minimum":0.1,"maximum":100},"boostShare":{"type":"number","minimum":0,"maximum":0.5,"default":0.3},"adaptiveShare":{"type":"number","minimum":0,"maximum":0.5,"default":0.2},"stratifyBy":{"type":"array","items":{"type":"string","enum":["agent_name","duration_bucket","hour_of_day"]},"maxItems":3,"default":["agent_name","duration_bucket"]},"boosts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"trace_error"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"cancelled"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"duration_outlier"},"percentile":{"type":"number","const":95}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"turn_outlier"},"percentile":{"type":"number","const":95}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"attribute"},"key":{"type":"string","minLength":1},"op":{"type":"string","enum":["eq","neq","contains","gt","lt"]},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["type","key","op","value"]}]},"maxItems":20,"default":[{"type":"trace_error"},{"type":"cancelled"},{"type":"duration_outlier"},{"type":"turn_outlier"}]},"llmPrescreen":{"type":"object","properties":{"enabled":{"type":"boolean","const":false}},"required":["enabled"]}},"required":["percent","boostShare","adaptiveShare","stratifyBy","boosts"]},"tiers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scorerIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":100},"escalateIf":{"type":"object","properties":{"conditions":{"type":"array","items":{"type":"object","properties":{"scorerId":{"type":"string","minLength":1},"op":{"type":"string","enum":["failed","lt","lte"]},"value":{"type":"number","minimum":0,"maximum":10}},"required":["scorerId","op"]},"minItems":1,"maxItems":10},"combinator":{"type":"string","enum":["or","and"],"default":"or"},"aggregation":{"type":"string","enum":["any_turn","avg"],"default":"any_turn"}},"required":["conditions","combinator","aggregation"]}},"required":["name","scorerIds"]},"minItems":1,"maxItems":5}},"required":["version","sampling","tiers"]},"isEnabled":{"type":"boolean"},"datasetDeleted":{"type":"boolean"},"isAdhoc":{"type":"boolean"},"targetItemId":{"type":["string","null"]},"totalItems":{"type":"number"},"processedItems":{"type":"number"},"failedItems":{"type":"number"},"lastRunAt":{"type":["string","null"]},"userId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","datasetId","datasetSlug","organizationId","status","scorerConfigs","scorerIds","isEnabled","datasetDeleted","isAdhoc","totalItems","processedItems","failedItems","lastRunAt","userId","createdAt","updatedAt"]}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Eval-jobs","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}}],"tags":["Eval Jobs"],"summary":"Get all eval jobs","description":"Get all eval jobs"},"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Returns the created eval job","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"datasetId":{"type":"string"},"datasetSlug":{"type":"string"},"datasetType":{"type":["string","null"]},"datasetName":{"type":"string"},"organizationId":{"type":"string"},"status":{"type":"string"},"scorerConfigs":{"type":"array","items":{}},"scorerIds":{"type":"array","items":{"type":"string"}},"scorerNames":{"type":"array","items":{"type":"string"}},"defaultFilterConfig":{"type":"null"},"evalPolicy":{"type":["object","null"],"properties":{"version":{"type":"number","const":1},"sampling":{"type":"object","properties":{"percent":{"type":"number","minimum":0.1,"maximum":100},"boostShare":{"type":"number","minimum":0,"maximum":0.5,"default":0.3},"adaptiveShare":{"type":"number","minimum":0,"maximum":0.5,"default":0.2},"stratifyBy":{"type":"array","items":{"type":"string","enum":["agent_name","duration_bucket","hour_of_day"]},"maxItems":3,"default":["agent_name","duration_bucket"]},"boosts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"trace_error"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"cancelled"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"duration_outlier"},"percentile":{"type":"number","const":95}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"turn_outlier"},"percentile":{"type":"number","const":95}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"attribute"},"key":{"type":"string","minLength":1},"op":{"type":"string","enum":["eq","neq","contains","gt","lt"]},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["type","key","op","value"]}]},"maxItems":20,"default":[{"type":"trace_error"},{"type":"cancelled"},{"type":"duration_outlier"},{"type":"turn_outlier"}]},"llmPrescreen":{"type":"object","properties":{"enabled":{"type":"boolean","const":false}},"required":["enabled"]}},"required":["percent","boostShare","adaptiveShare","stratifyBy","boosts"]},"tiers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scorerIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":100},"escalateIf":{"type":"object","properties":{"conditions":{"type":"array","items":{"type":"object","properties":{"scorerId":{"type":"string","minLength":1},"op":{"type":"string","enum":["failed","lt","lte"]},"value":{"type":"number","minimum":0,"maximum":10}},"required":["scorerId","op"]},"minItems":1,"maxItems":10},"combinator":{"type":"string","enum":["or","and"],"default":"or"},"aggregation":{"type":"string","enum":["any_turn","avg"],"default":"any_turn"}},"required":["conditions","combinator","aggregation"]}},"required":["name","scorerIds"]},"minItems":1,"maxItems":5}},"required":["version","sampling","tiers"]},"isEnabled":{"type":"boolean"},"datasetDeleted":{"type":"boolean"},"isAdhoc":{"type":"boolean"},"targetItemId":{"type":["string","null"]},"totalItems":{"type":"number"},"processedItems":{"type":"number"},"failedItems":{"type":"number"},"lastRunAt":{"type":["string","null"]},"userId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","datasetId","datasetSlug","organizationId","status","scorerConfigs","scorerIds","isEnabled","datasetDeleted","isAdhoc","totalItems","processedItems","failedItems","lastRunAt","userId","createdAt","updatedAt"]}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Eval-jobs","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"datasetId":{"type":"string","minLength":1},"datasetSlug":{"type":"string","minLength":1},"datasetType":{"type":"string","enum":["agent","conversational","rag","g-eval","accuracy"],"default":"conversational"},"projectId":{"type":"string"},"scorerConfigs":{"type":"array","items":{"type":"object","properties":{"scorerId":{"type":"string"},"scorerType":{"type":"string"},"scorerName":{"type":"string"},"threshold":{"type":"number"},"instruction":{"type":"string"},"llmConfig":{"type":"object","properties":{"provider":{"type":"string"},"modelName":{"type":"string"},"temperature":{"type":"number"},"providerId":{"type":"string"}}}},"required":["scorerId","scorerType","scorerName"]},"default":[]},"defaultFilterConfig":{"type":"object","properties":{"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100000},"dateFrom":{"type":"string"},"dateTo":{"type":"string"},"environment":{"type":"string"},"hasToolCalls":{"type":"boolean"},"hasRag":{"type":"boolean"},"exitStatus":{"type":"string"},"itemType":{"type":"string"},"scoreFilter":{"type":"object","properties":{"scorerId":{"type":"string"},"operator":{"type":"string","enum":["lt","lte","gt","gte"]},"value":{"type":"number"}},"required":["scorerId","operator","value"]},"scoreFilters":{"type":"array","items":{"type":"object","properties":{"scorerId":{"type":"string"},"operator":{"type":"string","enum":["lt","lte","gt","gte"]},"value":{"type":"number"}},"required":["scorerId","operator","value"]}},"scoreFilterCombinator":{"type":"string","enum":["and","or"]},"hasEvalScores":{"type":"boolean"},"agentName":{"type":"string"},"search":{"type":"string"},"qualityScoreGte":{"type":"number"},"qualityScoreLte":{"type":"number"},"sourceTraceStatus":{"type":"string"},"serviceVersion":{"type":"string"}},"additionalProperties":false},"evalPolicy":{"type":["object","null"],"properties":{"version":{"type":"number","const":1},"sampling":{"type":"object","properties":{"percent":{"type":"number","minimum":0.1,"maximum":100},"boostShare":{"type":"number","minimum":0,"maximum":0.5,"default":0.3},"adaptiveShare":{"type":"number","minimum":0,"maximum":0.5,"default":0.2},"stratifyBy":{"type":"array","items":{"type":"string","enum":["agent_name","duration_bucket","hour_of_day"]},"maxItems":3,"default":["agent_name","duration_bucket"]},"boosts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"trace_error"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"cancelled"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"duration_outlier"},"percentile":{"type":"number","const":95}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"turn_outlier"},"percentile":{"type":"number","const":95}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"attribute"},"key":{"type":"string","minLength":1},"op":{"type":"string","enum":["eq","neq","contains","gt","lt"]},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["type","key","op","value"]}]},"maxItems":20,"default":[{"type":"trace_error"},{"type":"cancelled"},{"type":"duration_outlier"},{"type":"turn_outlier"}]},"llmPrescreen":{"type":"object","properties":{"enabled":{"type":"boolean","const":false}},"required":["enabled"]}},"required":["percent"]},"tiers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scorerIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":100},"escalateIf":{"type":"object","properties":{"conditions":{"type":"array","items":{"type":"object","properties":{"scorerId":{"type":"string","minLength":1},"op":{"type":"string","enum":["failed","lt","lte"]},"value":{"type":"number","minimum":0,"maximum":10}},"required":["scorerId","op"]},"minItems":1,"maxItems":10},"combinator":{"type":"string","enum":["or","and"],"default":"or"},"aggregation":{"type":"string","enum":["any_turn","avg"],"default":"any_turn"}},"required":["conditions"]}},"required":["name","scorerIds"]},"minItems":1,"maxItems":5}},"required":["version","sampling","tiers"]},"isEnabled":{"type":"boolean","default":true},"isAdhoc":{"type":"boolean","default":false},"targetItemId":{"type":"string"}},"required":["name","datasetId","datasetSlug"]}}}},"tags":["Eval Jobs"],"summary":"Create a new eval job","description":"Create a new eval job"}},"/api/v1/eval-jobs/status":{"get":{"responses":{"200":{"description":"Returns for each job id: status (running|failed|completed|pending), processedItems, totalItems","content":{"application/json":{"schema":{"type":"object","properties":{"jobs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["running","failed","completed","pending"]},"processedItems":{"type":"number"},"totalItems":{"type":"number"}},"required":["id","status","processedItems","totalItems"]}}},"required":["jobs"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Eval-jobsStatus","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"},"required":false},{"in":"query","name":"organizationSlug","schema":{"type":"string"},"required":false},{"in":"query","name":"projectId","schema":{"type":"string"},"required":false},{"in":"query","name":"ids","schema":{"type":"string","minLength":1},"required":true}],"tags":["Eval Jobs"],"summary":"Get status for multiple eval jobs","description":"Get status for multiple eval jobs"}},"/api/v1/eval-jobs/active-runs":{"get":{"responses":{"200":{"description":"Returns runs that are pending or running for each requested job id","content":{"application/json":{"schema":{"type":"object","properties":{"jobs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"required":["id","status"]}}},"required":["id","runs"]}}},"required":["jobs"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Eval-jobsActive-runs","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"},"required":false},{"in":"query","name":"organizationSlug","schema":{"type":"string"},"required":false},{"in":"query","name":"projectId","schema":{"type":"string"},"required":false},{"in":"query","name":"ids","schema":{"type":"string","minLength":1},"required":true}],"tags":["Eval Jobs"],"summary":"Get runs not in final state for multiple eval jobs","description":"Get runs not in final state for multiple eval jobs"}},"/api/v1/eval-jobs/recommend-scorers":{"get":{"responses":{"200":{"description":"Returns recommendation jobs ordered by most recent first","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"results":{"type":"null"},"error":{"type":["string","null"]},"itemsAnalyzed":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","itemsAnalyzed","createdAt","updatedAt"]}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Eval-jobsRecommend-scorers","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"},"required":false},{"in":"query","name":"organizationSlug","schema":{"type":"string"},"required":false},{"in":"query","name":"projectId","schema":{"type":"string"},"required":false},{"in":"query","name":"datasetSlug","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"targetItemId","schema":{"type":"string"},"required":false}],"tags":["Eval Jobs"],"summary":"Get all scorer recommendation jobs for a dataset","description":"Get all scorer recommendation jobs for a dataset"},"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Returns the created recommendation job id and status","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","const":"pending"}},"required":["id","status"]}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Eval-jobsRecommend-scorers","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"datasetSlug":{"type":"string","minLength":1},"datasetId":{"type":"string"},"targetItemId":{"type":"string"}},"required":["datasetSlug"]}}}},"tags":["Eval Jobs"],"summary":"Start a scorer recommendation job","description":"Start a scorer recommendation job"}},"/api/v1/eval-jobs/recommend-scorers/{jobId}":{"get":{"responses":{"200":{"description":"Returns job status and results when completed","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"results":{"type":"null"},"error":{"type":["string","null"]},"itemsAnalyzed":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","itemsAnalyzed","createdAt","updatedAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Recommendation job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Eval-jobsRecommend-scorersByJobId","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"jobId","required":true}],"tags":["Eval Jobs"],"summary":"Get scorer recommendation job status and results","description":"Get scorer recommendation job status and results"}},"/api/v1/eval-jobs/recommend-scorers/{jobId}/cancel":{"post":{"responses":{"200":{"description":"Job cancelled successfully"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Recommendation job not found"},"409":{"description":"Conflict"},"422":{"description":"Job cannot be cancelled (already completed/failed)"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Eval-jobsRecommend-scorersByJobIdCancel","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"jobId","required":true}],"tags":["Eval Jobs"],"summary":"Cancel a scorer recommendation job","description":"Cancel a scorer recommendation job"}},"/api/v1/eval-jobs/adhoc-status":{"get":{"responses":{"200":{"description":"Returns active adhoc eval runs for the dataset","content":{"application/json":{"schema":{"type":"object","properties":{"runs":{"type":"array","items":{"type":"object","properties":{"evalJobId":{"type":"string"},"runId":{"type":"string"},"targetItemId":{"type":"string"},"status":{"type":"string","enum":["running","failed","completed","pending"]},"itemsProcessed":{"type":"number"},"itemsFailed":{"type":"number"},"scorerConfigs":{"type":"array","items":{"type":"object","properties":{"scorerId":{"type":"string"},"scorerType":{"type":"string"},"scorerName":{"type":"string"},"threshold":{"type":"number"},"instruction":{"type":"string"},"llmConfig":{"type":"object","properties":{"provider":{"type":"string"},"modelName":{"type":"string"},"temperature":{"type":"number"},"providerId":{"type":"string"}}}},"required":["scorerId","scorerType","scorerName"]}},"createdAt":{"type":"string"}},"required":["evalJobId","runId","targetItemId","status","itemsProcessed","itemsFailed","scorerConfigs","createdAt"]}}},"required":["runs"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Eval-jobsAdhoc-status","parameters":[{"in":"query","name":"datasetId","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"organizationId","schema":{"type":"string"},"required":false},{"in":"query","name":"organizationSlug","schema":{"type":"string"},"required":false},{"in":"query","name":"projectId","schema":{"type":"string"},"required":false}],"tags":["Eval Jobs"],"summary":"Get status of all active adhoc eval runs for a dataset","description":"Get status of all active adhoc eval runs for a dataset"}},"/api/v1/eval-jobs/evaluate-item":{"post":{"responses":{"200":{"description":"Returns evaluation trigger result: either auto-triggered with job IDs or requires manual scorer selection","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"autoTriggered":{"type":"boolean","const":true},"evalJobId":{"type":"string"},"runId":{"type":"string"},"status":{"type":"string","const":"pending"}},"required":["autoTriggered","evalJobId","runId","status"]},{"type":"object","properties":{"autoTriggered":{"type":"boolean","const":false}},"required":["autoTriggered"]}]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Dataset item not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Eval-jobsEvaluate-item","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"datasetId":{"type":"string","minLength":1},"datasetSlug":{"type":"string","minLength":1},"datasetType":{"type":"string","enum":["agent","conversational","rag","g-eval","accuracy"],"default":"conversational"},"targetItemId":{"type":"string","minLength":1}},"required":["datasetId","datasetSlug","targetItemId"]}}}},"tags":["Eval Jobs"],"summary":"Evaluate a single dataset item, auto-triggering if a configured eval job exists","description":"Evaluate a single dataset item, auto-triggering if a configured eval job exists"}},"/api/v1/eval-jobs/adhoc-evaluate":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Adhoc evaluation created and queued","content":{"application/json":{"schema":{"type":"object","properties":{"evalJobId":{"type":"string"},"runId":{"type":"string"},"status":{"type":"string","const":"pending"}},"required":["evalJobId","runId","status"]}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Dataset item not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Eval-jobsAdhoc-evaluate","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"datasetId":{"type":"string","minLength":1},"datasetSlug":{"type":"string","minLength":1},"datasetType":{"type":"string","enum":["agent","conversational","rag","g-eval","accuracy"],"default":"conversational"},"targetItemId":{"type":"string","minLength":1},"scorerConfigs":{"type":"array","items":{"type":"object","properties":{"scorerId":{"type":"string"},"scorerType":{"type":"string"},"scorerName":{"type":"string"},"threshold":{"type":"number"},"instruction":{"type":"string"},"llmConfig":{"type":"object","properties":{"provider":{"type":"string"},"modelName":{"type":"string"},"temperature":{"type":"number"},"providerId":{"type":"string"}}}},"required":["scorerId","scorerType","scorerName"]},"minItems":1}},"required":["datasetId","datasetSlug","targetItemId","scorerConfigs"]}}}},"tags":["Eval Jobs"],"summary":"Create and trigger an adhoc single-item evaluation","description":"Create and trigger an adhoc single-item evaluation"}},"/api/v1/eval-jobs/{id}":{"get":{"responses":{"200":{"description":"Returns the eval job","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"datasetId":{"type":"string"},"datasetSlug":{"type":"string"},"datasetType":{"type":["string","null"]},"datasetName":{"type":"string"},"organizationId":{"type":"string"},"status":{"type":"string"},"scorerConfigs":{"type":"array","items":{}},"scorerIds":{"type":"array","items":{"type":"string"}},"scorerNames":{"type":"array","items":{"type":"string"}},"defaultFilterConfig":{"type":"null"},"evalPolicy":{"type":["object","null"],"properties":{"version":{"type":"number","const":1},"sampling":{"type":"object","properties":{"percent":{"type":"number","minimum":0.1,"maximum":100},"boostShare":{"type":"number","minimum":0,"maximum":0.5,"default":0.3},"adaptiveShare":{"type":"number","minimum":0,"maximum":0.5,"default":0.2},"stratifyBy":{"type":"array","items":{"type":"string","enum":["agent_name","duration_bucket","hour_of_day"]},"maxItems":3,"default":["agent_name","duration_bucket"]},"boosts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"trace_error"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"cancelled"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"duration_outlier"},"percentile":{"type":"number","const":95}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"turn_outlier"},"percentile":{"type":"number","const":95}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"attribute"},"key":{"type":"string","minLength":1},"op":{"type":"string","enum":["eq","neq","contains","gt","lt"]},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["type","key","op","value"]}]},"maxItems":20,"default":[{"type":"trace_error"},{"type":"cancelled"},{"type":"duration_outlier"},{"type":"turn_outlier"}]},"llmPrescreen":{"type":"object","properties":{"enabled":{"type":"boolean","const":false}},"required":["enabled"]}},"required":["percent","boostShare","adaptiveShare","stratifyBy","boosts"]},"tiers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scorerIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":100},"escalateIf":{"type":"object","properties":{"conditions":{"type":"array","items":{"type":"object","properties":{"scorerId":{"type":"string","minLength":1},"op":{"type":"string","enum":["failed","lt","lte"]},"value":{"type":"number","minimum":0,"maximum":10}},"required":["scorerId","op"]},"minItems":1,"maxItems":10},"combinator":{"type":"string","enum":["or","and"],"default":"or"},"aggregation":{"type":"string","enum":["any_turn","avg"],"default":"any_turn"}},"required":["conditions","combinator","aggregation"]}},"required":["name","scorerIds"]},"minItems":1,"maxItems":5}},"required":["version","sampling","tiers"]},"isEnabled":{"type":"boolean"},"datasetDeleted":{"type":"boolean"},"isAdhoc":{"type":"boolean"},"targetItemId":{"type":["string","null"]},"totalItems":{"type":"number"},"processedItems":{"type":"number"},"failedItems":{"type":"number"},"lastRunAt":{"type":["string","null"]},"userId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","datasetId","datasetSlug","organizationId","status","scorerConfigs","scorerIds","isEnabled","datasetDeleted","isAdhoc","totalItems","processedItems","failedItems","lastRunAt","userId","createdAt","updatedAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Eval job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Eval-jobsById","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"tags":["Eval Jobs"],"summary":"Get a single eval job","description":"Get a single eval job"},"put":{"responses":{"200":{"description":"Returns the updated eval job","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"datasetId":{"type":"string"},"datasetSlug":{"type":"string"},"datasetType":{"type":["string","null"]},"datasetName":{"type":"string"},"organizationId":{"type":"string"},"status":{"type":"string"},"scorerConfigs":{"type":"array","items":{}},"scorerIds":{"type":"array","items":{"type":"string"}},"scorerNames":{"type":"array","items":{"type":"string"}},"defaultFilterConfig":{"type":"null"},"evalPolicy":{"type":["object","null"],"properties":{"version":{"type":"number","const":1},"sampling":{"type":"object","properties":{"percent":{"type":"number","minimum":0.1,"maximum":100},"boostShare":{"type":"number","minimum":0,"maximum":0.5,"default":0.3},"adaptiveShare":{"type":"number","minimum":0,"maximum":0.5,"default":0.2},"stratifyBy":{"type":"array","items":{"type":"string","enum":["agent_name","duration_bucket","hour_of_day"]},"maxItems":3,"default":["agent_name","duration_bucket"]},"boosts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"trace_error"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"cancelled"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"duration_outlier"},"percentile":{"type":"number","const":95}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"turn_outlier"},"percentile":{"type":"number","const":95}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"attribute"},"key":{"type":"string","minLength":1},"op":{"type":"string","enum":["eq","neq","contains","gt","lt"]},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["type","key","op","value"]}]},"maxItems":20,"default":[{"type":"trace_error"},{"type":"cancelled"},{"type":"duration_outlier"},{"type":"turn_outlier"}]},"llmPrescreen":{"type":"object","properties":{"enabled":{"type":"boolean","const":false}},"required":["enabled"]}},"required":["percent","boostShare","adaptiveShare","stratifyBy","boosts"]},"tiers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scorerIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":100},"escalateIf":{"type":"object","properties":{"conditions":{"type":"array","items":{"type":"object","properties":{"scorerId":{"type":"string","minLength":1},"op":{"type":"string","enum":["failed","lt","lte"]},"value":{"type":"number","minimum":0,"maximum":10}},"required":["scorerId","op"]},"minItems":1,"maxItems":10},"combinator":{"type":"string","enum":["or","and"],"default":"or"},"aggregation":{"type":"string","enum":["any_turn","avg"],"default":"any_turn"}},"required":["conditions","combinator","aggregation"]}},"required":["name","scorerIds"]},"minItems":1,"maxItems":5}},"required":["version","sampling","tiers"]},"isEnabled":{"type":"boolean"},"datasetDeleted":{"type":"boolean"},"isAdhoc":{"type":"boolean"},"targetItemId":{"type":["string","null"]},"totalItems":{"type":"number"},"processedItems":{"type":"number"},"failedItems":{"type":"number"},"lastRunAt":{"type":["string","null"]},"userId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","datasetId","datasetSlug","organizationId","status","scorerConfigs","scorerIds","isEnabled","datasetDeleted","isAdhoc","totalItems","processedItems","failedItems","lastRunAt","userId","createdAt","updatedAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Eval job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"putApiV1Eval-jobsById","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"datasetId":{"type":"string"},"datasetSlug":{"type":"string"},"datasetType":{"type":"string","enum":["agent","conversational","rag","g-eval","accuracy"]},"scorerConfigs":{"type":"array","items":{"type":"object","properties":{"scorerId":{"type":"string"},"scorerType":{"type":"string"},"scorerName":{"type":"string"},"threshold":{"type":"number"},"instruction":{"type":"string"},"llmConfig":{"type":"object","properties":{"provider":{"type":"string"},"modelName":{"type":"string"},"temperature":{"type":"number"},"providerId":{"type":"string"}}}},"required":["scorerId","scorerType","scorerName"]}},"defaultFilterConfig":{"type":["object","null"],"properties":{"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100000},"dateFrom":{"type":"string"},"dateTo":{"type":"string"},"environment":{"type":"string"},"hasToolCalls":{"type":"boolean"},"hasRag":{"type":"boolean"},"exitStatus":{"type":"string"},"itemType":{"type":"string"},"scoreFilter":{"type":"object","properties":{"scorerId":{"type":"string"},"operator":{"type":"string","enum":["lt","lte","gt","gte"]},"value":{"type":"number"}},"required":["scorerId","operator","value"]},"scoreFilters":{"type":"array","items":{"type":"object","properties":{"scorerId":{"type":"string"},"operator":{"type":"string","enum":["lt","lte","gt","gte"]},"value":{"type":"number"}},"required":["scorerId","operator","value"]}},"scoreFilterCombinator":{"type":"string","enum":["and","or"]},"hasEvalScores":{"type":"boolean"},"agentName":{"type":"string"},"search":{"type":"string"},"qualityScoreGte":{"type":"number"},"qualityScoreLte":{"type":"number"},"sourceTraceStatus":{"type":"string"},"serviceVersion":{"type":"string"}},"additionalProperties":false},"evalPolicy":{"type":["object","null"],"properties":{"version":{"type":"number","const":1},"sampling":{"type":"object","properties":{"percent":{"type":"number","minimum":0.1,"maximum":100},"boostShare":{"type":"number","minimum":0,"maximum":0.5,"default":0.3},"adaptiveShare":{"type":"number","minimum":0,"maximum":0.5,"default":0.2},"stratifyBy":{"type":"array","items":{"type":"string","enum":["agent_name","duration_bucket","hour_of_day"]},"maxItems":3,"default":["agent_name","duration_bucket"]},"boosts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"trace_error"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"cancelled"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"duration_outlier"},"percentile":{"type":"number","const":95}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"turn_outlier"},"percentile":{"type":"number","const":95}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"attribute"},"key":{"type":"string","minLength":1},"op":{"type":"string","enum":["eq","neq","contains","gt","lt"]},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["type","key","op","value"]}]},"maxItems":20,"default":[{"type":"trace_error"},{"type":"cancelled"},{"type":"duration_outlier"},{"type":"turn_outlier"}]},"llmPrescreen":{"type":"object","properties":{"enabled":{"type":"boolean","const":false}},"required":["enabled"]}},"required":["percent"]},"tiers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scorerIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":100},"escalateIf":{"type":"object","properties":{"conditions":{"type":"array","items":{"type":"object","properties":{"scorerId":{"type":"string","minLength":1},"op":{"type":"string","enum":["failed","lt","lte"]},"value":{"type":"number","minimum":0,"maximum":10}},"required":["scorerId","op"]},"minItems":1,"maxItems":10},"combinator":{"type":"string","enum":["or","and"],"default":"or"},"aggregation":{"type":"string","enum":["any_turn","avg"],"default":"any_turn"}},"required":["conditions"]}},"required":["name","scorerIds"]},"minItems":1,"maxItems":5}},"required":["version","sampling","tiers"]},"isEnabled":{"type":"boolean"}}}}}},"tags":["Eval Jobs"],"summary":"Update an eval job","description":"Update an eval job"},"delete":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"204":{"description":"Eval job deleted successfully"},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Eval job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"deleteApiV1Eval-jobsById","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"tags":["Eval Jobs"],"summary":"Delete an eval job","description":"Delete an eval job"}},"/api/v1/eval-jobs/{id}/evaluation-status":{"get":{"responses":{"200":{"description":"Evaluation status retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"totalItems":{"type":"number"},"alreadyEvaluatedCount":{"type":"number"},"itemsToEvaluate":{"type":"number"},"scorerBreakdown":{"type":"array","items":{"type":"object","properties":{"scorerId":{"type":"string"},"scorerName":{"type":"string"},"evaluatedCount":{"type":"number"}},"required":["scorerId","scorerName","evaluatedCount"]}}},"required":["totalItems","alreadyEvaluatedCount","itemsToEvaluate","scorerBreakdown"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Eval job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Eval-jobsByIdEvaluation-status","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"tags":["Eval Jobs"],"summary":"Get evaluation status for a job","description":"Get evaluation status for a job"}},"/api/v1/eval-jobs/dataset-filter-preview":{"post":{"responses":{"200":{"description":"Returns count of items matching the filter","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number"},"filteredCount":{"type":"number"}},"required":["total","filteredCount"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Eval-jobsDataset-filter-preview","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"datasetSlug":{"type":"string","minLength":1},"filterConfig":{"type":"object","properties":{"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100000},"dateFrom":{"type":"string"},"dateTo":{"type":"string"},"environment":{"type":"string"},"hasToolCalls":{"type":"boolean"},"hasRag":{"type":"boolean"},"exitStatus":{"type":"string"},"itemType":{"type":"string"},"scoreFilter":{"type":"object","properties":{"scorerId":{"type":"string"},"operator":{"type":"string","enum":["lt","lte","gt","gte"]},"value":{"type":"number"}},"required":["scorerId","operator","value"]},"scoreFilters":{"type":"array","items":{"type":"object","properties":{"scorerId":{"type":"string"},"operator":{"type":"string","enum":["lt","lte","gt","gte"]},"value":{"type":"number"}},"required":["scorerId","operator","value"]}},"scoreFilterCombinator":{"type":"string","enum":["and","or"]},"hasEvalScores":{"type":"boolean"},"agentName":{"type":"string"},"search":{"type":"string"},"qualityScoreGte":{"type":"number"},"qualityScoreLte":{"type":"number"},"sourceTraceStatus":{"type":"string"},"serviceVersion":{"type":"string"}},"additionalProperties":false}},"required":["datasetSlug","filterConfig"]}}}},"tags":["Eval Jobs"],"summary":"Preview filtered dataset items by dataset slug (no job required)","description":"Preview filtered dataset items by dataset slug (no job required)"}},"/api/v1/eval-jobs/{id}/filter-preview":{"post":{"responses":{"200":{"description":"Returns count and item IDs matching the filter","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number"},"filteredCount":{"type":"number"},"alreadyEvaluatedCount":{"type":"number"}},"required":["total","filteredCount","alreadyEvaluatedCount"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Eval job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Eval-jobsByIdFilter-preview","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"filterConfig":{"type":"object","properties":{"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100000},"dateFrom":{"type":"string"},"dateTo":{"type":"string"},"environment":{"type":"string"},"hasToolCalls":{"type":"boolean"},"hasRag":{"type":"boolean"},"exitStatus":{"type":"string"},"itemType":{"type":"string"},"scoreFilter":{"type":"object","properties":{"scorerId":{"type":"string"},"operator":{"type":"string","enum":["lt","lte","gt","gte"]},"value":{"type":"number"}},"required":["scorerId","operator","value"]},"scoreFilters":{"type":"array","items":{"type":"object","properties":{"scorerId":{"type":"string"},"operator":{"type":"string","enum":["lt","lte","gt","gte"]},"value":{"type":"number"}},"required":["scorerId","operator","value"]}},"scoreFilterCombinator":{"type":"string","enum":["and","or"]},"hasEvalScores":{"type":"boolean"},"agentName":{"type":"string"},"search":{"type":"string"},"qualityScoreGte":{"type":"number"},"qualityScoreLte":{"type":"number"},"sourceTraceStatus":{"type":"string"},"serviceVersion":{"type":"string"}},"additionalProperties":false},"scorerIds":{"type":"array","items":{"type":"string"}}},"required":["filterConfig"]}}}},"tags":["Eval Jobs"],"summary":"Preview filtered dataset items for an eval job","description":"Preview filtered dataset items for an eval job"}},"/api/v1/eval-jobs/{id}/trigger":{"post":{"responses":{"200":{"description":"Eval job run created and queued","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"evalJobId":{"type":"string"},"status":{"type":"string"},"startTime":{"type":["string","null"]},"endTime":{"type":["string","null"]},"itemsProcessed":{"type":"number"},"itemsFailed":{"type":"number"},"error":{"type":["string","null"]},"results":{"type":"null"},"tier":{"type":["number","null"]},"parentRunId":{"type":["string","null"]},"samplingMeta":{"type":"null"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","evalJobId","status","startTime","endTime","itemsProcessed","itemsFailed","error","createdAt","updatedAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Eval job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Eval-jobsByIdTrigger","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"datasetItemIds":{"type":"array","items":{"type":"string"}},"filterConfig":{"type":"object","properties":{"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100000},"dateFrom":{"type":"string"},"dateTo":{"type":"string"},"environment":{"type":"string"},"hasToolCalls":{"type":"boolean"},"hasRag":{"type":"boolean"},"exitStatus":{"type":"string"},"itemType":{"type":"string"},"scoreFilter":{"type":"object","properties":{"scorerId":{"type":"string"},"operator":{"type":"string","enum":["lt","lte","gt","gte"]},"value":{"type":"number"}},"required":["scorerId","operator","value"]},"scoreFilters":{"type":"array","items":{"type":"object","properties":{"scorerId":{"type":"string"},"operator":{"type":"string","enum":["lt","lte","gt","gte"]},"value":{"type":"number"}},"required":["scorerId","operator","value"]}},"scoreFilterCombinator":{"type":"string","enum":["and","or"]},"hasEvalScores":{"type":"boolean"},"agentName":{"type":"string"},"search":{"type":"string"},"qualityScoreGte":{"type":"number"},"qualityScoreLte":{"type":"number"},"sourceTraceStatus":{"type":"string"},"serviceVersion":{"type":"string"}},"additionalProperties":false},"skipEvaluated":{"type":"boolean"},"forceReevaluate":{"type":"boolean","default":false},"scorerConfigs":{"type":"array","items":{"type":"object","properties":{"scorerId":{"type":"string"},"scorerType":{"type":"string"},"scorerName":{"type":"string"},"threshold":{"type":"number"},"instruction":{"type":"string"},"llmConfig":{"type":"object","properties":{"provider":{"type":"string"},"modelName":{"type":"string"},"temperature":{"type":"number"},"providerId":{"type":"string"}}}},"required":["scorerId","scorerType","scorerName"]},"minItems":1},"useSampling":{"type":"boolean","default":false}}}}}},"tags":["Eval Jobs"],"summary":"Trigger an eval job run","description":"Explicit datasetItemIds take precedence. Otherwise filterConfig replaces the saved defaultFilterConfig; when omitted, the saved filter applies before sampling and skipEvaluated. Use agentName to filter dataset items by agent name."}},"/api/v1/eval-jobs/{id}/runs":{"get":{"responses":{"200":{"description":"Returns all runs for the eval job","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"evalJobId":{"type":"string"},"status":{"type":"string"},"startTime":{"type":["string","null"]},"endTime":{"type":["string","null"]},"itemsProcessed":{"type":"number"},"itemsFailed":{"type":"number"},"error":{"type":["string","null"]},"results":{"type":"null"},"tier":{"type":["number","null"]},"parentRunId":{"type":["string","null"]},"samplingMeta":{"type":"null"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","evalJobId","status","startTime","endTime","itemsProcessed","itemsFailed","error","createdAt","updatedAt"]}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Eval job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Eval-jobsByIdRuns","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"tags":["Eval Jobs"],"summary":"Get all runs for an eval job","description":"Get all runs for an eval job"}},"/api/v1/eval-jobs/{id}/runs/{runId}":{"get":{"responses":{"200":{"description":"Returns the eval job run","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"evalJobId":{"type":"string"},"status":{"type":"string"},"startTime":{"type":["string","null"]},"endTime":{"type":["string","null"]},"itemsProcessed":{"type":"number"},"itemsFailed":{"type":"number"},"error":{"type":["string","null"]},"results":{"type":"null"},"tier":{"type":["number","null"]},"parentRunId":{"type":["string","null"]},"samplingMeta":{"type":"null"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","evalJobId","status","startTime","endTime","itemsProcessed","itemsFailed","error","createdAt","updatedAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Run not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Eval-jobsByIdRunsByRunId","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"runId","required":true}],"tags":["Eval Jobs"],"summary":"Get a single eval job run","description":"Get a single eval job run"}},"/api/v1/eval-jobs/{id}/runs/{runId}/cancel":{"post":{"responses":{"200":{"description":"Job run cancelled successfully"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Cannot cancel job run in current state"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Job run not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Eval-jobsByIdRunsByRunIdCancel","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"runId","required":true}],"tags":["Eval Jobs"],"summary":"Cancel an eval job run","description":"Cancel an eval job run"}},"/api/v1/eval-jobs/{id}/status":{"get":{"responses":{"200":{"description":"Returns eval job status and queue statistics"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Eval job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Eval-jobsByIdStatus","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"tags":["Eval Jobs"],"summary":"Get eval job status and queue stats","description":"Get eval job status and queue stats"}},"/api/v1/eval-jobs/{id}/sampling-state":{"get":{"responses":{"200":{"description":"Sampling state and today's counters"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Eval job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Eval-jobsByIdSampling-state","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"tags":["Eval Jobs"],"summary":"Get the sampling coordinator state for a policy-enabled eval job","description":"Get the sampling coordinator state for a policy-enabled eval job"}},"/api/v1/eval-jobs/{id}/sampling-preview":{"post":{"responses":{"200":{"description":"Trailing-7-day projection per tier"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"No policy to preview"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Eval job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Eval-jobsByIdSampling-preview","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"policy":{"type":"object","properties":{"version":{"type":"number","const":1},"sampling":{"type":"object","properties":{"percent":{"type":"number","minimum":0.1,"maximum":100},"boostShare":{"type":"number","minimum":0,"maximum":0.5,"default":0.3},"adaptiveShare":{"type":"number","minimum":0,"maximum":0.5,"default":0.2},"stratifyBy":{"type":"array","items":{"type":"string","enum":["agent_name","duration_bucket","hour_of_day"]},"maxItems":3,"default":["agent_name","duration_bucket"]},"boosts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"trace_error"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"cancelled"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"duration_outlier"},"percentile":{"type":"number","const":95}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"turn_outlier"},"percentile":{"type":"number","const":95}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"attribute"},"key":{"type":"string","minLength":1},"op":{"type":"string","enum":["eq","neq","contains","gt","lt"]},"value":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["type","key","op","value"]}]},"maxItems":20,"default":[{"type":"trace_error"},{"type":"cancelled"},{"type":"duration_outlier"},{"type":"turn_outlier"}]},"llmPrescreen":{"type":"object","properties":{"enabled":{"type":"boolean","const":false}},"required":["enabled"]}},"required":["percent"]},"tiers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scorerIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":100},"escalateIf":{"type":"object","properties":{"conditions":{"type":"array","items":{"type":"object","properties":{"scorerId":{"type":"string","minLength":1},"op":{"type":"string","enum":["failed","lt","lte"]},"value":{"type":"number","minimum":0,"maximum":10}},"required":["scorerId","op"]},"minItems":1,"maxItems":10},"combinator":{"type":"string","enum":["or","and"],"default":"or"},"aggregation":{"type":"string","enum":["any_turn","avg"],"default":"any_turn"}},"required":["conditions"]}},"required":["name","scorerIds"]},"minItems":1,"maxItems":5}},"required":["version","sampling","tiers"]}}}}}},"tags":["Eval Jobs"],"summary":"Preview sampled volume and credit cost per day for a policy","description":"Preview sampled volume and credit cost per day for a policy"}},"/api/v1/eval-jobs/{id}/sampling-recommendation":{"get":{"responses":{"200":{"description":"A suggested EvalPolicy"},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Eval job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Eval-jobsByIdSampling-recommendation","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"tags":["Eval Jobs"],"summary":"Suggest a sampling policy (percent + tiers) for this eval job","description":"Suggest a sampling policy (percent + tiers) for this eval job"}},"/api/v1/eval-jobs/{id}/results":{"get":{"responses":{"200":{"description":"Returns aggregated scorer results for the eval job","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"scorerId":{"type":"string"},"scorerName":{"type":"string"},"scorerTag":{"type":"string"},"datasetSlug":{"type":"string"},"totalEvaluations":{"type":"number"},"avgScore":{"type":"number"},"minScore":{"type":"number"},"maxScore":{"type":"number"},"p75Score":{"type":"number"},"p90Score":{"type":"number"},"p95Score":{"type":"number"},"p99Score":{"type":"number"},"passedCount":{"type":"number"},"errorCount":{"type":"number"},"avgExecutionTimeMs":{"type":"number"},"results":{"type":"array","items":{"type":"object","properties":{"resultId":{"type":"string"},"itemId":{"type":"string"},"score":{"type":"number"},"passed":{"type":"boolean"},"error":{"type":"string"},"executionTimeMs":{"type":"number"},"reasoning":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"sourceTraceId":{"type":"string"}},"required":["resultId","itemId","score","passed","createdAt","updatedAt"]}}},"required":["scorerId","scorerName","datasetSlug","totalEvaluations","avgScore","minScore","maxScore","p75Score","p90Score","p95Score","p99Score","passedCount","errorCount","avgExecutionTimeMs","results"]}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Eval job not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Eval-jobsByIdResults","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"organizationSlug","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"query","name":"runId","schema":{"type":"string"}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"tags":["Eval Jobs"],"summary":"Get aggregated scorer results for an eval job","description":"Get aggregated scorer results for an eval job"}},"/api/v1/audio":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Audio file uploaded successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the audio file (UUID)"},"originalName":{"type":"string","description":"Original filename from upload"},"mimeType":{"type":"string","description":"MIME type of the audio (e.g., audio/mpeg, audio/wav)"},"size":{"type":"number","description":"File size in bytes"},"traceId":{"type":"string","description":"Associated trace ID"},"spanId":{"type":"string","description":"Associated span ID"},"createdAt":{"type":"string","description":"Creation timestamp (ISO 8601)"},"updatedAt":{"type":"string","description":"Last update timestamp (ISO 8601)"}},"required":["id","originalName","mimeType","size","traceId","spanId","createdAt","updatedAt"]},"timestamp":{"type":"string","description":"Response timestamp (ISO 8601)"}},"required":["success","data","timestamp"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"]},"timestamp":{"type":"string"}},"required":["success","error","timestamp"]}}}},"401":{"description":"Unauthorized - Invalid API key"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Audio","tags":["Audio"],"summary":"Upload audio file","description":"Upload an audio file associated with a trace and span. Supports various audio formats including MP3, WAV, AAC, OGG, FLAC, and M4A. Maximum file size is 100MB.","parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file","traceId","spanId","audio_uuid"],"properties":{"audio_uuid":{"type":"string","description":"Unique identifier for the audio file (UUID)"},"traceId":{"type":"string","description":"Trace ID associated with this audio file"},"spanId":{"type":"string","description":"Span ID associated with this audio file"},"file":{"type":"string","format":"binary","description":"Audio file to upload (MP3, WAV, AAC, OGG, FLAC, M4A)"}}}}}}},"get":{"responses":{"200":{"description":"List of audio files","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the audio file (UUID)"},"filename":{"type":"string","description":"Original filename from upload"},"mimeType":{"type":"string","description":"MIME type of the audio (e.g., audio/mpeg, audio/wav)"},"size":{"type":"number","description":"File size in bytes"},"traceId":{"type":"string","description":"Associated trace ID"},"spanId":{"type":"string","description":"Associated span ID"},"createdAt":{"type":"string","description":"Creation timestamp (ISO 8601)"},"updatedAt":{"type":"string","description":"Last update timestamp (ISO 8601)"}},"required":["id","filename","mimeType","size","traceId","spanId","createdAt","updatedAt"]}},"pagination":{"type":"object","properties":{"total":{"type":"number","description":"Total number of audio files"},"page":{"type":"number","description":"Current page number"},"pageSize":{"type":"number","description":"Number of items per page"},"totalPages":{"type":"number","description":"Total number of pages"}},"required":["total","page","pageSize","totalPages"]},"timestamp":{"type":"string","description":"Response timestamp (ISO 8601)"}},"required":["success","data","pagination","timestamp"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized - Invalid API key"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Audio","parameters":[{"in":"query","name":"page","schema":{"type":"number","minimum":1,"default":1,"description":"Page number (starts at 1)"}},{"in":"query","name":"pageSize","schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"Number of items per page (1-100)"}}],"tags":["Audio"],"summary":"List all audio files","description":"Retrieve a paginated list of all audio files for the organization."}},"/api/v1/audio/{id}":{"get":{"responses":{"200":{"description":"Audio file details","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the audio file (UUID)"},"originalName":{"type":"string","description":"Original filename from upload"},"mimeType":{"type":"string","description":"MIME type of the audio (e.g., audio/mpeg, audio/wav)"},"size":{"type":"number","description":"File size in bytes"},"traceId":{"type":"string","description":"Associated trace ID"},"spanId":{"type":"string","description":"Associated span ID"},"createdAt":{"type":"string","description":"Creation timestamp (ISO 8601)"},"updatedAt":{"type":"string","description":"Last update timestamp (ISO 8601)"}},"required":["id","originalName","mimeType","size","traceId","spanId","createdAt","updatedAt"]},"timestamp":{"type":"string","description":"Response timestamp (ISO 8601)"}},"required":["success","data","timestamp"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized - Invalid API key"},"403":{"description":"Forbidden"},"404":{"description":"Audio file not found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"]},"timestamp":{"type":"string"}},"required":["success","error","timestamp"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1AudioById","tags":["Audio"],"summary":"Get audio file metadata by ID","description":"Retrieve metadata for a specific audio file by its ID","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"Audio file ID (UUID)"},"required":true}]},"delete":{"responses":{"200":{"description":"Audio file deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"timestamp":{"type":"string"}},"required":["success","message","timestamp"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized - Invalid API key"},"403":{"description":"Forbidden"},"404":{"description":"Audio file not found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"]},"timestamp":{"type":"string"}},"required":["success","error","timestamp"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"deleteApiV1AudioById","tags":["Audio"],"summary":"Delete audio file","description":"Delete a specific audio file by its ID. This removes the database record, deletes the file from storage, and invalidates related cache entries.","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"Audio file ID (UUID)"},"required":true}]}},"/api/v1/audio/{id}/serve":{"get":{"responses":{"200":{"description":"Audio file content","content":{"audio/*":{"schema":{"type":"string","format":"binary"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized - Invalid API key"},"403":{"description":"Forbidden"},"404":{"description":"Audio file not found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"]},"timestamp":{"type":"string"}},"required":["success","error","timestamp"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1AudioByIdServe","tags":["Audio"],"summary":"Serve audio file content","description":"Stream the actual audio file content. Uses signed URLs internally to securely fetch and proxy the file from storage.","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"Audio file ID (UUID)"},"required":true}]}},"/api/v1/image":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Image file uploaded successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the image file (UUID)"},"originalName":{"type":"string","description":"Filename from upload"},"mimeType":{"type":"string","description":"MIME type of the image (e.g., image/jpeg, image/png)"},"size":{"type":"number","description":"File size in bytes"},"traceId":{"type":"string","description":"Associated trace ID"},"spanId":{"type":"string","description":"Associated span ID"},"createdAt":{"type":"string","description":"Creation timestamp (ISO 8601)"},"updatedAt":{"type":"string","description":"Last update timestamp (ISO 8601)"}},"required":["id","originalName","mimeType","size","traceId","spanId","createdAt","updatedAt"]},"timestamp":{"type":"string","description":"Response timestamp (ISO 8601)"}},"required":["success","data","timestamp"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"]},"timestamp":{"type":"string"}},"required":["success","error","timestamp"]}}}},"401":{"description":"Unauthorized - Invalid API key"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1Image","tags":["Image"],"summary":"Upload image file","description":"Upload an image file associated with a trace and span. Supports various image formats including JPEG, PNG, GIF, WebP, SVG, BMP, and TIFF. Maximum file size is 50MB.","parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file","traceId","spanId","image_uuid"],"properties":{"image_uuid":{"type":"string","format":"uuid","description":"Unique identifier for the image file in UUID format"},"traceId":{"type":"string","format":"uuid","description":"Trace ID associated with this image file"},"spanId":{"type":"string","format":"uuid","description":"Span ID associated with this image file"},"file":{"type":"string","format":"binary","description":"Image file to upload (JPEG, PNG, GIF, WebP, SVG, BMP, TIFF)"}}}}}}}},"/api/v1/image/{id}":{"get":{"responses":{"200":{"description":"Image file details","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the image file (UUID)"},"originalName":{"type":"string","description":"Filename from upload"},"mimeType":{"type":"string","description":"MIME type of the image (e.g., image/jpeg, image/png)"},"size":{"type":"number","description":"File size in bytes"},"traceId":{"type":"string","description":"Associated trace ID"},"spanId":{"type":"string","description":"Associated span ID"},"createdAt":{"type":"string","description":"Creation timestamp (ISO 8601)"},"updatedAt":{"type":"string","description":"Last update timestamp (ISO 8601)"}},"required":["id","originalName","mimeType","size","traceId","spanId","createdAt","updatedAt"]},"timestamp":{"type":"string","description":"Response timestamp (ISO 8601)"}},"required":["success","data","timestamp"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized - Invalid API key"},"403":{"description":"Forbidden"},"404":{"description":"Image file not found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"]},"timestamp":{"type":"string"}},"required":["success","error","timestamp"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1ImageById","tags":["Image"],"summary":"Get image file metadata by ID","description":"Retrieve metadata for a specific image file by its ID","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"Image file ID (UUID)"},"required":true}]},"delete":{"responses":{"200":{"description":"Image file deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"timestamp":{"type":"string"}},"required":["success","message","timestamp"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized - Invalid API key"},"403":{"description":"Forbidden"},"404":{"description":"Image file not found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"]},"timestamp":{"type":"string"}},"required":["success","error","timestamp"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"deleteApiV1ImageById","tags":["Image"],"summary":"Delete image file","description":"Delete a specific image file by its ID. This removes the database record, deletes the file from storage, and invalidates related cache entries.","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"Image file ID (UUID)"},"required":true}]}},"/api/v1/image/{id}/serve":{"get":{"responses":{"200":{"description":"Signed URL and image metadata","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","properties":{"signedUrl":{"type":"string","description":"Pre-signed URL to fetch the image directly from storage"},"metadata":{"type":"object","properties":{"id":{"type":"string","description":"Image file ID"},"originalName":{"type":"string","description":"Original filename of the uploaded image"},"mimeType":{"type":"string","description":"MIME type of the image file"},"size":{"type":"number","description":"File size in bytes"}},"required":["id","originalName","mimeType","size"]}},"required":["signedUrl","metadata"]},"timestamp":{"type":"string","description":"ISO 8601 timestamp"}},"required":["success","data","timestamp"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized - Invalid API key"},"403":{"description":"Forbidden"},"404":{"description":"Image file not found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"]},"timestamp":{"type":"string"}},"required":["success","error","timestamp"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1ImageByIdServe","tags":["Image"],"summary":"Get signed URL for image file","description":"Returns a signed URL. The signed URL expires after 15 minutes. This endpoint also returns image metadata.","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"Image file ID (UUID)"},"required":true}]}},"/api/v1/novapilot/filter-preview":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovapilotFilter-preview","tags":["NovaPilot"],"summary":"Preview NovaPilot dataset filter counts","description":"Preview NovaPilot dataset filter counts","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"datasetSlug":{"type":"string","minLength":1},"filterConfig":{"type":"object","properties":{"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100000},"dateFrom":{"type":"string"},"dateTo":{"type":"string"},"environment":{"type":"string"},"hasToolCalls":{"type":"boolean"},"hasRag":{"type":"boolean"},"exitStatus":{"type":"string"},"itemType":{"type":"string"},"scoreFilter":{"type":"object","properties":{"scorerId":{"type":"string"},"operator":{"type":"string","enum":["lt","lte","gt","gte"]},"value":{"type":"number"}},"required":["scorerId","operator","value"]},"scoreFilters":{"type":"array","items":{"type":"object","properties":{"scorerId":{"type":"string"},"operator":{"type":"string","enum":["lt","lte","gt","gte"]},"value":{"type":"number"}},"required":["scorerId","operator","value"]}},"scoreFilterCombinator":{"type":"string","enum":["and","or"]},"hasEvalScores":{"type":"boolean"},"agentName":{"type":"string"},"search":{"type":"string"},"qualityScoreGte":{"type":"number"},"qualityScoreLte":{"type":"number"},"sourceTraceStatus":{"type":"string"},"serviceVersion":{"type":"string"}},"additionalProperties":false}},"required":["datasetSlug","filterConfig"]}}}}}},"/api/v1/novapilot/run":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovapilotRun","tags":["NovaPilot"],"summary":"Trigger a NovaPilot analysis report","description":"Trigger a NovaPilot analysis report","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationSlug":{"type":"string","minLength":1},"projectId":{"type":"string","minLength":1},"datasetSlug":{"type":"string","minLength":1},"datasetItemIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":512},"maxItems":10000},"filterConfig":{"type":"object","properties":{"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100000},"dateFrom":{"type":"string"},"dateTo":{"type":"string"},"environment":{"type":"string"},"hasToolCalls":{"type":"boolean"},"hasRag":{"type":"boolean"},"exitStatus":{"type":"string"},"itemType":{"type":"string"},"scoreFilter":{"type":"object","properties":{"scorerId":{"type":"string"},"operator":{"type":"string","enum":["lt","lte","gt","gte"]},"value":{"type":"number"}},"required":["scorerId","operator","value"]},"scoreFilters":{"type":"array","items":{"type":"object","properties":{"scorerId":{"type":"string"},"operator":{"type":"string","enum":["lt","lte","gt","gte"]},"value":{"type":"number"}},"required":["scorerId","operator","value"]}},"scoreFilterCombinator":{"type":"string","enum":["and","or"]},"hasEvalScores":{"type":"boolean"},"agentName":{"type":"string"},"search":{"type":"string"},"qualityScoreGte":{"type":"number"},"qualityScoreLte":{"type":"number"},"sourceTraceStatus":{"type":"string"},"serviceVersion":{"type":"string"}},"additionalProperties":false}},"required":["organizationSlug","projectId","datasetSlug"]}}}}}},"/api/v1/novapilot/reports":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovapilotReports","tags":["NovaPilot"],"summary":"List NovaPilot reports","description":"List NovaPilot reports","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100},"required":false},{"in":"query","name":"offset","schema":{"type":"integer","minimum":0},"required":false}]}},"/api/v1/novapilot/reports/{reportId}/cancel":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovapilotReportsByReportIdCancel","tags":["NovaPilot"],"summary":"Cancel a NovaPilot report","description":"Cancel a NovaPilot report","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"reportId","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novapilot/reports/{reportId}":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovapilotReportsByReportId","tags":["NovaPilot"],"summary":"Get a NovaPilot report by ID","description":"Get a NovaPilot report by ID","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"reportId","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novapilot/reports/{reportId}/pdf":{"get":{"responses":{"200":{"description":"Report PDF","content":{"application/pdf":{}}},"404":{"description":"Not found"},"409":{"description":"Report is not completed"}},"operationId":"getApiV1NovapilotReportsByReportIdPdf","tags":["NovaPilot"],"summary":"Download a NovaPilot report PDF","description":"Renders the completed NovaPilot report to PDF with the same renderer used for report emails.","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"locale","schema":{"type":"string","minLength":1},"required":false},{"in":"path","name":"reportId","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novapilot/reports/{reportId}/send-email":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovapilotReportsByReportIdSend-email","tags":["NovaPilot"],"summary":"Send NovaPilot report email","description":"Send NovaPilot report email","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"reportId","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["me","team"]}},"required":["scope"]}}}}}},"/api/v1/novapilot/schedules":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovapilotSchedules","tags":["NovaPilot"],"summary":"List NovaPilot schedules","description":"List NovaPilot schedules","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true}]},"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovapilotSchedules","tags":["NovaPilot"],"summary":"Create a NovaPilot schedule","description":"Create a NovaPilot schedule","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"datasetSlug":{"type":"string","minLength":1},"cronExpression":{"type":"string","minLength":1},"timezone":{"type":"string","default":"UTC"},"enabled":{"type":"boolean","default":true}},"required":["projectId","name","datasetSlug","cronExpression"]}}}}}},"/api/v1/novapilot/schedules/{scheduleId}":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovapilotSchedulesByScheduleId","tags":["NovaPilot"],"summary":"Get a NovaPilot schedule","description":"Get a NovaPilot schedule","parameters":[{"in":"path","name":"scheduleId","schema":{"type":"string","minLength":1},"required":true}]},"put":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"putApiV1NovapilotSchedulesByScheduleId","tags":["NovaPilot"],"summary":"Update a NovaPilot schedule","description":"Update a NovaPilot schedule","parameters":[{"in":"path","name":"scheduleId","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"datasetSlug":{"type":"string","minLength":1},"cronExpression":{"type":"string","minLength":1},"timezone":{"type":"string"},"enabled":{"type":"boolean"}}}}}}},"delete":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"deleteApiV1NovapilotSchedulesByScheduleId","tags":["NovaPilot"],"summary":"Delete a NovaPilot schedule","description":"Delete a NovaPilot schedule","parameters":[{"in":"path","name":"scheduleId","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novapilot/schedules/{scheduleId}/toggle":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovapilotSchedulesByScheduleIdToggle","tags":["NovaPilot"],"summary":"Toggle a NovaPilot schedule enabled state","description":"Toggle a NovaPilot schedule enabled state","parameters":[{"in":"path","name":"scheduleId","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novapilot/schedules/{scheduleId}/runs":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovapilotSchedulesByScheduleIdRuns","tags":["NovaPilot"],"summary":"List runs for a NovaPilot schedule","description":"List runs for a NovaPilot schedule","parameters":[{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"offset","schema":{"type":"integer","minimum":0}},{"in":"query","name":"status","schema":{"type":"string","enum":["pending","processing","completed","failed"]}},{"in":"path","name":"scheduleId","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novapilot/schedules/{scheduleId}/runs/{runId}":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovapilotSchedulesByScheduleIdRunsByRunId","tags":["NovaPilot"],"summary":"Get a NovaPilot scheduled run","description":"Get a NovaPilot scheduled run","parameters":[{"in":"path","name":"scheduleId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"runId","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novapilot/schedules/{scheduleId}/runs/{runId}/resend-email":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovapilotSchedulesByScheduleIdRunsByRunIdResend-email","tags":["NovaPilot"],"summary":"Resend email for a NovaPilot scheduled run","description":"Resend email for a NovaPilot scheduled run","parameters":[{"in":"path","name":"scheduleId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"runId","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novapilot/schedules/{scheduleId}/analytics":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovapilotSchedulesByScheduleIdAnalytics","tags":["NovaPilot"],"summary":"Get NovaPilot schedule analytics","description":"Get NovaPilot schedule analytics","parameters":[{"in":"query","name":"days","schema":{"type":"integer","minimum":1,"maximum":90}},{"in":"path","name":"scheduleId","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novapilot/email-preferences":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovapilotEmail-preferences","tags":["NovaPilot"],"summary":"Get NovaPilot email preferences","description":"Get NovaPilot email preferences","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"scheduleId","schema":{"type":"string"},"required":false}]},"put":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"putApiV1NovapilotEmail-preferences","tags":["NovaPilot"],"summary":"Update NovaPilot email preferences","description":"Update NovaPilot email preferences","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"scheduleId":{"type":"string","minLength":1},"preferences":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":512},"emailEnabled":{"type":"boolean"}},"required":["userId","emailEnabled"]},"maxItems":100}},"required":["projectId","scheduleId","preferences"]}}}}}},"/api/v1/novasynth/organization":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthOrganization","tags":["NovaSynth"],"summary":"Get NovaSynth organization context","description":"Returns the authenticated organization id and slug for NovaSynth API calls.","parameters":[]}},"/api/v1/novasynth/personas":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthPersonas","tags":["NovaSynth"],"summary":"List synthetic personas","description":"List synthetic personas","parameters":[{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"in":"query","name":"offset","schema":{"type":"integer","minimum":0,"default":0}},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"tags","schema":{"type":"string"}},{"in":"query","name":"categoryId","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}}]},"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthPersonas","tags":["NovaSynth"],"summary":"Create synthetic persona","description":"Create synthetic persona","parameters":[{"in":"query","name":"projectId","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string"},"goal":{"type":"string"},"personalityTraits":{"type":"array","items":{"type":"string"},"default":[]},"tonePreference":{"type":"string","default":"neutral"},"primaryLanguage":{"type":"array","items":{"type":"string"},"default":[]},"understandsLanguages":{"type":"array","items":{"type":"string"},"default":[]},"knowledgeBase":{"type":"array","items":{"type":"string"},"default":[]},"age":{"type":"integer","exclusiveMinimum":0},"occupation":{"type":"string"},"location":{"type":"string"},"educationLevel":{"type":"string"},"gender":{"type":"string"},"tags":{"type":"array","items":{"type":"string"},"default":[]},"ttsVoiceModel":{"type":["string","null"],"description":"Optional TTS provider:model override, for example elevenlabs:eleven_v3. Null clears the override; omission on create uses automatic selection, while omission on update preserves the saved value. An explicit persona model takes precedence over NOVASYNTH_PHONE_TTS_MODEL and language-based defaults. Discover models and languages with GET /api/v1/novasynth/voice-models."},"ttsVoiceId":{"type":"string"},"speakingSpeed":{"type":"number","minimum":0.7,"maximum":1.2,"default":1},"interruptionLevel":{"type":"number","minimum":0,"maximum":1,"default":0.5},"backgroundNoise":{"type":["string","null"],"maxLength":400},"backgroundNoiseLevel":{"type":"number","minimum":5,"maximum":200},"backgroundNoiseDuration":{"type":"number","minimum":5,"maximum":120},"backgroundNoiseMode":{"type":"string","enum":["mix_tts","ambient"],"default":"mix_tts"},"networkPacketLoss":{"type":"number","minimum":0,"maximum":1},"accentDescription":{"type":"string","maxLength":500},"maxDurationS":{"type":"integer","minimum":60,"maximum":600},"libraryCategory":{"type":"string"},"profile":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}},"projectId":{"type":"string"},"isPublic":{"type":"boolean","default":false}},"required":["name","description"]}}}}}},"/api/v1/novasynth/personas/{id}":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthPersonasById","tags":["NovaSynth"],"summary":"Get synthetic persona by id","description":"Get synthetic persona by id","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"patchApiV1NovasynthPersonasById","tags":["NovaSynth"],"summary":"Update synthetic persona","description":"Update synthetic persona","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string"},"goal":{"type":"string"},"personalityTraits":{"type":"array","items":{"type":"string"},"default":[]},"tonePreference":{"type":"string","default":"neutral"},"primaryLanguage":{"type":"array","items":{"type":"string"},"default":[]},"understandsLanguages":{"type":"array","items":{"type":"string"},"default":[]},"knowledgeBase":{"type":"array","items":{"type":"string"},"default":[]},"age":{"type":"integer","exclusiveMinimum":0},"occupation":{"type":"string"},"location":{"type":"string"},"educationLevel":{"type":"string"},"gender":{"type":"string"},"tags":{"type":"array","items":{"type":"string"},"default":[]},"ttsVoiceModel":{"type":["string","null"],"description":"Optional TTS provider:model override, for example elevenlabs:eleven_v3. Null clears the override; omission on create uses automatic selection, while omission on update preserves the saved value. An explicit persona model takes precedence over NOVASYNTH_PHONE_TTS_MODEL and language-based defaults. Discover models and languages with GET /api/v1/novasynth/voice-models."},"ttsVoiceId":{"type":"string"},"speakingSpeed":{"type":"number","minimum":0.7,"maximum":1.2,"default":1},"interruptionLevel":{"type":"number","minimum":0,"maximum":1,"default":0.5},"backgroundNoise":{"type":["string","null"],"maxLength":400},"backgroundNoiseLevel":{"type":"number","minimum":5,"maximum":200},"backgroundNoiseDuration":{"type":"number","minimum":5,"maximum":120},"backgroundNoiseMode":{"type":"string","enum":["mix_tts","ambient"],"default":"mix_tts"},"networkPacketLoss":{"type":"number","minimum":0,"maximum":1},"accentDescription":{"type":"string","maxLength":500},"maxDurationS":{"type":"integer","minimum":60,"maximum":600},"libraryCategory":{"type":"string"},"profile":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}}}}}}}},"delete":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"deleteApiV1NovasynthPersonasById","tags":["NovaSynth"],"summary":"Delete synthetic persona","description":"Delete synthetic persona","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/personas/generate":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthPersonasGenerate","tags":["NovaSynth"],"summary":"Enqueue synthetic persona generation job","description":"Creates a background job to generate personas via the NovaSynth CLI.","parameters":[{"in":"query","name":"projectId","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"systemPrompt":{"type":"string","minLength":1},"count":{"type":"integer","minimum":1,"default":3},"instructions":{"type":"string"},"projectId":{"type":"string"}},"required":["systemPrompt"]}}}}}},"/api/v1/novasynth/scenarios":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthScenarios","tags":["NovaSynth"],"summary":"List synthetic scenarios","description":"List synthetic scenarios","parameters":[{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"in":"query","name":"offset","schema":{"type":"integer","minimum":0,"default":0}},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"tags","schema":{"type":"string"}},{"in":"query","name":"categoryId","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}}]},"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthScenarios","tags":["NovaSynth"],"summary":"Create synthetic scenario","description":"Create synthetic scenario","parameters":[{"in":"query","name":"projectId","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"parent_id":{"type":["string","null"]},"action":{"type":"string","minLength":1},"condition":{"type":["string","null"]}},"required":["id","action"],"additionalProperties":true},"default":[]},"metadata":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/NovaSynthJsonValue"},"default":{}},"tags":{"type":"array","items":{"type":"string"},"default":[]},"scenarioType":{"type":"string","enum":["conversation","workflow","red_team","knowledge_base","edge_case"],"default":"conversation"},"folder":{"type":"string","maxLength":200},"libraryCategory":{"type":"string"},"categoryId":{"type":["string","null"],"minLength":1},"interruptionLevel":{"type":"number","minimum":0,"maximum":1,"default":0.5},"interruptions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["re_explain","hold_on","third_party_aside","hurry_up","bad_audio","not_interested","clarification","correction","premature_answer"]},"marker_turn":{"type":"integer","minimum":1},"intent":{"type":["string","null"]},"opener":{"type":["string","null"]},"after_event_id":{"type":["string","null"]},"gate":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"utterance_elapsed"},"threshold_seconds":{"type":"number","exclusiveMinimum":0,"default":6}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"live_transcript"}},"required":["type"]}]},"window_turns":{"type":"integer","minimum":1,"default":3},"on_miss":{"type":"string","enum":["fire_late","skip_and_log"]}},"required":["type","marker_turn"]},"default":[]},"projectId":{"type":"string"},"isPublic":{"type":"boolean","default":false}},"required":["name","description"]}}}}}},"/api/v1/novasynth/scenarios/{id}":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthScenariosById","tags":["NovaSynth"],"summary":"Get synthetic scenario by id","description":"Get synthetic scenario by id","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"patchApiV1NovasynthScenariosById","tags":["NovaSynth"],"summary":"Update synthetic scenario","description":"Update synthetic scenario","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"parent_id":{"type":["string","null"]},"action":{"type":"string","minLength":1},"condition":{"type":["string","null"]}},"required":["id","action"],"additionalProperties":true},"default":[]},"metadata":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/NovaSynthJsonValue"},"default":{}},"tags":{"type":"array","items":{"type":"string"},"default":[]},"scenarioType":{"type":"string","enum":["conversation","workflow","red_team","knowledge_base","edge_case"],"default":"conversation"},"folder":{"type":"string","maxLength":200},"libraryCategory":{"type":"string"},"categoryId":{"type":["string","null"],"minLength":1},"interruptionLevel":{"type":"number","minimum":0,"maximum":1,"default":0.5},"interruptions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["re_explain","hold_on","third_party_aside","hurry_up","bad_audio","not_interested","clarification","correction","premature_answer"]},"marker_turn":{"type":"integer","minimum":1},"intent":{"type":["string","null"]},"opener":{"type":["string","null"]},"after_event_id":{"type":["string","null"]},"gate":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"utterance_elapsed"},"threshold_seconds":{"type":"number","exclusiveMinimum":0,"default":6}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"live_transcript"}},"required":["type"]}]},"window_turns":{"type":"integer","minimum":1,"default":3},"on_miss":{"type":"string","enum":["fire_late","skip_and_log"]}},"required":["type","marker_turn"]},"default":[]}}}}}}},"delete":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"deleteApiV1NovasynthScenariosById","tags":["NovaSynth"],"summary":"Delete synthetic scenario","description":"Delete synthetic scenario","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/scenarios/generate":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthScenariosGenerate","tags":["NovaSynth"],"summary":"Enqueue synthetic scenario generation job","description":"Creates a background job to generate scenarios via the NovaSynth CLI.","parameters":[{"in":"query","name":"projectId","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"systemPrompt":{"type":"string","minLength":1},"count":{"type":"integer","minimum":1,"default":3},"instructions":{"type":"string"},"projectId":{"type":"string"}},"required":["systemPrompt"]}}}}}},"/api/v1/novasynth/scenario-categories":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthScenario-categories","tags":["NovaSynth"],"summary":"List scenario categories","description":"List scenario categories","parameters":[{"in":"query","name":"projectId","schema":{"type":"string"}}]},"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthScenario-categories","tags":["NovaSynth"],"summary":"Create an org-owned scenario category","description":"Create an org-owned scenario category","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"]}}}}}},"/api/v1/novasynth/scenario-categories/{id}":{"patch":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"patchApiV1NovasynthScenario-categoriesById","tags":["NovaSynth"],"summary":"Rename an org-owned scenario category","description":"Rename an org-owned scenario category","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"]}}}}},"delete":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"deleteApiV1NovasynthScenario-categoriesById","tags":["NovaSynth"],"summary":"Delete an org-owned scenario category","description":"Delete an org-owned scenario category","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/agent-endpoints":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthAgent-endpoints","tags":["NovaSynth"],"summary":"List agent endpoints","description":"List agent endpoints","parameters":[{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"in":"query","name":"offset","schema":{"type":"integer","minimum":0,"default":0}},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"tags","schema":{"type":"string"}},{"in":"query","name":"categoryId","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}}]},"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthAgent-endpoints","tags":["NovaSynth"],"summary":"Create agent endpoint","description":"Associate the endpoint with a project via the `projectId` query parameter or the `projectId` field in the JSON body (query takes precedence).","parameters":[{"in":"query","name":"projectId","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"livekit"},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string"},"isInbound":{"type":"boolean","default":false},"projectId":{"type":"string"},"livekitUrl":{"type":"string","format":"uri"},"livekitApiKey":{"type":"string","minLength":1},"livekitApiSecret":{"type":"string","minLength":1},"livekitAgentName":{"type":"string","minLength":1}},"required":["type","name","livekitUrl","livekitApiKey","livekitApiSecret","livekitAgentName"]},{"type":"object","properties":{"type":{"type":"string","const":"phone"},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string"},"isInbound":{"type":"boolean","default":false},"projectId":{"type":"string"},"phoneNumber":{"type":"string","pattern":"^\\+[1-9]\\d{1,14}$"},"phoneCountryCode":{"type":"string","pattern":"^\\+[1-9]\\d{0,2}$"}},"required":["type","name","phoneNumber","phoneCountryCode"]},{"type":"object","properties":{"type":{"type":"string","const":"websocket"},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string"},"isInbound":{"type":"boolean","default":false},"projectId":{"type":"string"},"websocketUrl":{"type":"string","format":"uri"},"websocketAuthHeader":{"type":"string","minLength":1}},"required":["type","name","websocketUrl"]},{"type":"object","properties":{"type":{"type":"string","const":"pipecat"},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string"},"isInbound":{"type":"boolean","default":false},"projectId":{"type":"string"},"pipecatApiKey":{"type":"string","minLength":1},"pipecatAgentName":{"type":"string","minLength":1},"pipecatAgentConfigJson":{"type":"object","additionalProperties":{}},"pipecatRoomPropertiesJson":{"type":"object","additionalProperties":{}}},"required":["type","name","pipecatApiKey","pipecatAgentName"]},{"type":"object","properties":{"type":{"type":"string","const":"vapi"},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string"},"isInbound":{"type":"boolean","default":false},"projectId":{"type":"string"},"vapiApiKey":{"type":"string","minLength":1},"vapiAssistantId":{"type":"string"}},"required":["type","name","vapiApiKey"]},{"type":"object","properties":{"type":{"type":"string","const":"retell"},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string"},"isInbound":{"type":"boolean","default":false},"projectId":{"type":"string"},"retellApiKey":{"type":"string","minLength":1},"retellAgentId":{"type":"string"}},"required":["type","name","retellApiKey"]},{"type":"object","properties":{"type":{"type":"string","const":"elevenlabs_conversational"},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string"},"isInbound":{"type":"boolean","default":false},"projectId":{"type":"string"},"elevenLabsApiKey":{"type":"string","minLength":1},"elevenLabsAgentId":{"type":"string"}},"required":["type","name","elevenLabsApiKey"]},{"type":"object","properties":{"type":{"type":"string","const":"http_chat"},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string"},"isInbound":{"type":"boolean","default":false},"projectId":{"type":"string"},"url":{"type":"string","format":"uri"},"authType":{"type":"string","enum":["none","bearer","api_key","basic","custom_header"],"default":"none"},"authSecret":{"type":"string"},"model":{"type":"string"},"method":{"type":"string","enum":["POST","GET"],"default":"POST"},"extraHeaders":{"type":"object","additionalProperties":{"type":"string"}},"queryParams":{"type":"object","additionalProperties":{"type":"string"}},"timeoutMs":{"type":"integer","minimum":1000,"maximum":120000,"default":30000},"maxRetries":{"type":"integer","minimum":0,"maximum":5,"default":2},"validateStatusMode":{"type":"string","enum":["2xx","200","any"],"default":"2xx"},"streaming":{"type":"boolean","default":false},"bodyTemplate":{"type":"string"},"responseTransform":{"type":"string"},"sessionMode":{"type":"string","enum":["stateless","session_id"],"default":"stateless"},"sessionParser":{"type":"string"},"toolsPassthrough":{"type":"boolean","default":false},"agentSpeaksFirst":{"type":"boolean","default":true}},"required":["type","name","url"]}]}}}}}},"/api/v1/novasynth/agent-endpoints/{id}":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthAgent-endpointsById","tags":["NovaSynth"],"summary":"Get agent endpoint by id","description":"Get agent endpoint by id","parameters":[{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"patchApiV1NovasynthAgent-endpointsById","tags":["NovaSynth"],"summary":"Update agent endpoint (non-secret fields)","description":"Update agent endpoint (non-secret fields)","parameters":[{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string"},"isActive":{"type":"boolean"},"isInbound":{"type":"boolean"},"livekitUrl":{"type":"string","format":"uri"},"livekitApiKey":{"type":"string"},"livekitAgentName":{"type":"string","minLength":1,"maxLength":200},"phoneNumber":{"type":"string","pattern":"^\\+[1-9]\\d{1,14}$"},"phoneCountryCode":{"type":"string","pattern":"^\\+[1-9]\\d{0,2}$"},"websocketUrl":{"type":"string","format":"uri"},"vapiAssistantId":{"type":"string"},"retellAgentId":{"type":"string"},"pipecatAgentName":{"type":"string"},"elevenLabsAgentId":{"type":"string"},"pipecatAgentConfigJson":{"type":"object","additionalProperties":{}},"pipecatRoomPropertiesJson":{"type":"object","additionalProperties":{}},"url":{"type":"string","format":"uri"},"authType":{"type":"string","enum":["none","bearer","api_key","basic","custom_header"]},"model":{"type":"string"},"method":{"type":"string","enum":["POST","GET"]},"extraHeaders":{"type":"object","additionalProperties":{"type":"string"}},"queryParams":{"type":"object","additionalProperties":{"type":"string"}},"timeoutMs":{"type":"integer","minimum":1000,"maximum":120000},"maxRetries":{"type":"integer","minimum":0,"maximum":5},"validateStatusMode":{"type":"string","enum":["2xx","200","any"]},"streaming":{"type":"boolean"},"bodyTemplate":{"type":"string"},"responseTransform":{"type":"string"},"sessionMode":{"type":"string","enum":["stateless","session_id"]},"sessionParser":{"type":"string"},"toolsPassthrough":{"type":"boolean"},"agentSpeaksFirst":{"type":"boolean"}}}}}}},"delete":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"deleteApiV1NovasynthAgent-endpointsById","tags":["NovaSynth"],"summary":"Delete agent endpoint","description":"Delete agent endpoint","parameters":[{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/agent-endpoints/{id}/webhook-secret":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthAgent-endpointsByIdWebhook-secret","tags":["NovaSynth"],"summary":"Reveal agent endpoint webhook secret","description":"Returns the plaintext webhook secret for provider webhook configuration.","parameters":[{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/agent-endpoints/{id}/http-chat-secret":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthAgent-endpointsByIdHttp-chat-secret","tags":["NovaSynth"],"summary":"Reveal http_chat endpoint auth secret","description":"Returns the plaintext authentication token for an http_chat endpoint so the user can review and edit it.","parameters":[{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/agent-endpoints/{id}/rotate-credentials":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthAgent-endpointsByIdRotate-credentials","tags":["NovaSynth"],"summary":"Rotate agent endpoint credentials","description":"Updates encrypted secrets for the endpoint type (LiveKit, phone, etc.).","parameters":[{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"livekit"},"livekitApiSecret":{"type":"string","minLength":1}},"required":["type","livekitApiSecret"]},{"type":"object","properties":{"type":{"type":"string","const":"websocket"},"websocketAuthHeader":{"type":"string","minLength":1}},"required":["type","websocketAuthHeader"]},{"type":"object","properties":{"type":{"type":"string","const":"pipecat"},"pipecatApiKey":{"type":"string","minLength":1}},"required":["type","pipecatApiKey"]},{"type":"object","properties":{"type":{"type":"string","const":"vapi"},"vapiApiKey":{"type":"string","minLength":1}},"required":["type","vapiApiKey"]},{"type":"object","properties":{"type":{"type":"string","const":"retell"},"retellApiKey":{"type":"string","minLength":1}},"required":["type","retellApiKey"]},{"type":"object","properties":{"type":{"type":"string","const":"elevenlabs_conversational"},"elevenLabsApiKey":{"type":"string","minLength":1}},"required":["type","elevenLabsApiKey"]},{"type":"object","properties":{"type":{"type":"string","const":"http_chat"},"authSecret":{"type":"string","minLength":1}},"required":["type","authSecret"]}]}}}}}},"/api/v1/novasynth/agent-endpoints/{id}/test":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthAgent-endpointsByIdTest","tags":["NovaSynth"],"summary":"Test agent endpoint connectivity","description":"Test the connectivity of an agent endpoint. This endpoint is only implemented for http_chat endpoints.","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/runs":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthRuns","tags":["NovaSynth"],"summary":"List synthetic runs","description":"List synthetic runs","parameters":[{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false},{"in":"query","name":"offset","schema":{"type":"integer","minimum":0,"default":0},"required":false},{"in":"query","name":"status","schema":{"type":"string","enum":["queued","dispatching","awaiting_call","running","completed","failed","expired","cancelled"]},"required":false},{"in":"query","name":"personaId","schema":{"type":"string"},"required":false},{"in":"query","name":"scenarioId","schema":{"type":"string"},"required":false},{"in":"query","name":"batchRunId","schema":{"type":"string"},"required":false},{"in":"query","name":"search","schema":{"type":"string","maxLength":200},"required":false},{"in":"query","name":"sortBy","schema":{"type":"string","enum":["createdAt","duration","turns"],"default":"createdAt"},"required":false},{"in":"query","name":"sortDir","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false},{"in":"query","name":"evalResult","schema":{"type":"string","enum":["passed","failed","eval_error"]},"required":false},{"in":"query","name":"groupBy","schema":{"type":"string","enum":["persona","scenario"]},"required":false},{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true}]},"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthRuns","tags":["NovaSynth"],"summary":"Create and enqueue a synthetic run","description":"Create and enqueue a synthetic run","parameters":[{"in":"query","name":"projectId","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"personaId":{"type":"string"},"scenarioId":{"type":"string"},"endpointId":{"type":"string"},"mode":{"type":"string","enum":["voice","text"],"default":"voice"},"profileData":{"type":"object","additionalProperties":{"type":"string"}},"llmProvider":{"type":"string","enum":["google","openai","anthropic","groq"]},"sttProvider":{"type":"string","enum":["deepgram","groq","openai","assemblyai"]},"ttsProvider":{"type":"string","enum":["elevenlabs","openai","cartesia"]},"projectId":{"type":"string"}},"required":["personaId","scenarioId","endpointId"]}}}}}},"/api/v1/novasynth/runs/{id}":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthRunsById","tags":["NovaSynth"],"summary":"Get synthetic run by id","description":"Get synthetic run by id","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/runs/{id}/cancel":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthRunsByIdCancel","tags":["NovaSynth"],"summary":"Cancel a synthetic run","description":"Cancel a synthetic run","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/runs/{id}/retry":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthRunsByIdRetry","tags":["NovaSynth"],"summary":"Retry a failed or expired synthetic run","description":"Retry a failed or expired synthetic run","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/runs/{runId}/audio":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthRunsByRunIdAudio","tags":["NovaSynth"],"summary":"Get signed URL for synthetic run audio","description":"Get signed URL for synthetic run audio","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"runId","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/batch-runs/compare":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthBatch-runsCompare","tags":["NovaSynth"],"summary":"Compare batch runs","description":"Returns pass rate, criteria, coverage and duration metrics for 2 to 4 batch runs, in the order requested.","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"batchRunIds","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/batch-runs":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthBatch-runs","tags":["NovaSynth"],"summary":"List batch runs","description":"Returns a paginated list of synthetic batch runs for the organization, enriched with eval summaries.","parameters":[{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"in":"query","name":"offset","schema":{"type":"integer","minimum":0,"default":0}},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"tags","schema":{"type":"string"}},{"in":"query","name":"categoryId","schema":{"type":"string"}},{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"query","name":"status","schema":{"type":"string"}},{"in":"query","name":"dateFrom","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"in":"query","name":"dateTo","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}]},"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthBatch-runs","tags":["NovaSynth"],"summary":"Create a batch run","description":"Creates a new synthetic batch run from a set of persona/scenario pairs and enqueues the runs.","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string"},"endpointId":{"type":"string"},"pairs":{"type":"array","items":{"type":"object","properties":{"personaId":{"type":"string","minLength":1},"scenarioId":{"type":"string","minLength":1}},"required":["personaId","scenarioId"]},"minItems":1,"maxItems":1000},"personaIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":100},"scenarioIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":100},"mode":{"type":"string","enum":["voice","text"],"default":"voice"},"testType":{"type":"string","minLength":1,"maxLength":64},"direction":{"type":"string","enum":["outbound","inbound"],"default":"outbound"},"profileData":{"type":"object","additionalProperties":{"type":"string"}},"llmProvider":{"type":"string","enum":["google","openai","anthropic","groq"]},"sttProvider":{"type":"string","enum":["deepgram","groq","openai","assemblyai"]},"ttsProvider":{"type":"string","enum":["elevenlabs","openai","cartesia"]},"projectId":{"type":"string"},"concurrencyLimit":{"type":"integer","minimum":1,"maximum":20,"default":1},"maxCallDurationS":{"type":"integer","minimum":60,"maximum":600,"default":300},"callDelayMs":{"type":"integer","minimum":0,"maximum":30000,"default":2000},"retryFailedRuns":{"type":"boolean","default":false},"testProfileId":{"type":"string"},"selectedMetrics":{"type":"array","items":{"type":"string","minLength":1},"maxItems":50},"scorerIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":50}},"required":["name","endpointId"]}}}}}},"/api/v1/novasynth/batch-runs/{id}/duplicate":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthBatch-runsByIdDuplicate","tags":["NovaSynth"],"summary":"Duplicate a batch run","description":"Creates a new batch run by duplicating the persona/scenario pairs from an existing one.","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"]}}}}}},"/api/v1/novasynth/batch-runs/test-types":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthBatch-runsTest-types","tags":["NovaSynth"],"summary":"List distinct batch run test types","description":"Returns the distinct, non-empty test type tags used by batch runs in the project.","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/batch-runs/{id}":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthBatch-runsById","tags":["NovaSynth"],"summary":"Get a batch run","description":"Returns full details for a single batch run, including endpoint, personas, scenarios, and per-status run counts.","parameters":[{"in":"query","name":"projectId","schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/batch-runs/{id}/report":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthBatch-runsByIdReport","tags":["NovaSynth"],"summary":"Generate a batch run report","description":"Enqueues PDF report generation for a batch run. The body is optional: omit it to use a default scorer-to-category layout derived from the scorers that ran, or supply a custom layout (incl. which scorers gate call success).","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"categories":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string","minLength":1}}},"labels":{"type":"object","additionalProperties":{"type":"string"}},"failureGateCategoryTitle":{"type":"string","minLength":1,"default":"Affects Call Success"}},"required":["categories"]}}}}},"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthBatch-runsByIdReport","tags":["NovaSynth"],"summary":"Get batch run report status / URL","description":"Returns the report generation status and, when completed, a short-lived signed URL for downloading the PDF.","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/batch-runs/{id}/report/pdf":{"get":{"responses":{"200":{"description":"Report PDF","content":{"application/pdf":{}}},"404":{"description":"Not found"},"409":{"description":"Report is not ready"}},"operationId":"getApiV1NovasynthBatch-runsByIdReportPdf","tags":["NovaSynth"],"summary":"Download a batch run report PDF","description":"Renders the completed batch run report to PDF with the same renderer used for report emails.","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"locale","schema":{"type":"string","minLength":1},"required":false},{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/batch-runs/{id}/report/send-email":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthBatch-runsByIdReportSend-email","tags":["NovaSynth"],"summary":"Email a batch run report","description":"Generates the report PDF from the stored data and emails it to the requester or the whole organization.","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["me","team"],"default":"me"}}}}}}}},"/api/v1/novasynth/batch-runs/{id}/matrix":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthBatch-runsByIdMatrix","tags":["NovaSynth"],"summary":"Get batch run matrix","description":"Returns a paginated persona × scenario matrix with the status of each run cell.","parameters":[{"in":"query","name":"personaLimit","schema":{"type":"integer","minimum":1,"maximum":100,"default":10},"required":false},{"in":"query","name":"personaOffset","schema":{"type":"integer","minimum":0,"default":0},"required":false},{"in":"query","name":"scenarioLimit","schema":{"type":"integer","minimum":1,"maximum":100,"default":10},"required":false},{"in":"query","name":"scenarioOffset","schema":{"type":"integer","minimum":0,"default":0},"required":false},{"in":"query","name":"scenarioSearch","schema":{"type":"string","maxLength":200},"required":false},{"in":"query","name":"scenarioCategoryId","schema":{"type":"string","minLength":1},"required":false},{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/batch-runs/{id}/cancel":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthBatch-runsByIdCancel","tags":["NovaSynth"],"summary":"Cancel a batch run","description":"Cancels all queued and dispatching runs in a batch and marks the batch as cancelled if no active runs remain.","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/batch-runs/{id}/novapilot":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthBatch-runsByIdNovapilot","tags":["NovaSynth"],"summary":"Get the NovaPilot analysis scoped to a batch run","description":"Returns the most recent NovaPilot analysis for the batch run alongside eligibility, so the detail card needs a single request.","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]},"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthBatch-runsByIdNovapilot","tags":["NovaSynth"],"summary":"Run a NovaPilot analysis scoped to a batch run","description":"Resolves the batch run's dataset items and enqueues a NovaPilot analysis through the existing NovaPilot enqueue path.","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/inbound/runs/{runId}/claim":{"post":{"responses":{"200":{"description":"Claim outcome","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"status":{"type":"string","enum":["waiting","arming","ready","in_progress","completed","failed","expired","cancelled"]},"runId":{"type":"string"},"phoneNumber":{"type":["string","null"]},"dialWindowClosesAt":{"type":["string","null"]},"profile":{"type":"object","additionalProperties":{"type":"string"}},"personaName":{"type":"string"},"scenarioName":{"type":"string"},"retryAfterMs":{"type":"number"},"reason":{"type":"string"}},"required":["success","status"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthInboundRunsByRunIdClaim","tags":["NovaSynth"],"summary":"Claim an inbound run","description":"Reserves a Noveum phone number for this run and starts a NovaSynth listener. Returns status 'arming' once a number is reserved; poll the run until status is 'ready' before dialling. A claim without the idempotency key that armed the run returns its current status with reason 'already_claimed', and the caller must not dial it.","parameters":[{"schema":{"type":"string"},"in":"path","name":"runId","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"type":"object","additionalProperties":{"type":"string"}},"idempotencyKey":{"type":"string","minLength":1,"maxLength":200}}}}},"required":true}}},"/api/v1/novasynth/inbound/batch-runs/{batchRunId}/claim-next":{"post":{"responses":{"200":{"description":"Claim outcome","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"status":{"type":"string","enum":["waiting","arming","ready","in_progress","completed","failed","expired","cancelled"]},"runId":{"type":"string"},"phoneNumber":{"type":["string","null"]},"dialWindowClosesAt":{"type":["string","null"]},"profile":{"type":"object","additionalProperties":{"type":"string"}},"personaName":{"type":"string"},"scenarioName":{"type":"string"},"retryAfterMs":{"type":"number"},"reason":{"type":"string"}},"required":["success","status"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthInboundBatch-runsByBatchRunIdClaim-next","tags":["NovaSynth"],"summary":"Claim the next inbound run in a batch","description":"Picks the oldest unclaimed inbound run in the batch and arms it. Returns status 'waiting' when every run is already claimed or no number is free.","parameters":[{"schema":{"type":"string"},"in":"path","name":"batchRunId","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"type":"object","additionalProperties":{"type":"string"}},"idempotencyKey":{"type":"string","minLength":1,"maxLength":200}}}}},"required":true}}},"/api/v1/novasynth/inbound/runs/{runId}":{"get":{"responses":{"200":{"description":"Run status","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"status":{"type":"string","enum":["waiting","arming","ready","in_progress","completed","failed","expired","cancelled"]},"runId":{"type":"string"},"phoneNumber":{"type":["string","null"]},"dialWindowClosesAt":{"type":["string","null"]},"profile":{"type":"object","additionalProperties":{"type":"string"}},"personaName":{"type":"string"},"scenarioName":{"type":"string"},"retryAfterMs":{"type":"number"},"reason":{"type":"string"}},"required":["success","status"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthInboundRunsByRunId","tags":["NovaSynth"],"summary":"Poll an inbound run","description":"Organization-scoped run status for the claim/poll loop. Unlike GET /novasynth/runs/:id this does not require a projectId, because a client that claimed a run only holds its id.","parameters":[{"schema":{"type":"string"},"in":"path","name":"runId","required":true}]}},"/api/v1/novasynth/generation-jobs":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthGeneration-jobs","tags":["NovaSynth"],"summary":"List persona/scenario generation jobs","description":"List persona/scenario generation jobs","parameters":[{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"in":"query","name":"offset","schema":{"type":"integer","minimum":0,"default":0}},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"tags","schema":{"type":"string"}},{"in":"query","name":"categoryId","schema":{"type":"string"}},{"in":"query","name":"type","schema":{"type":"string","enum":["persona","scenario"]}}]}},"/api/v1/novasynth/generation-jobs/{id}":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthGeneration-jobsById","tags":["NovaSynth"],"summary":"Get generation job by id","description":"Get generation job by id","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/agent-config":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthAgent-config","tags":["NovaSynth"],"summary":"Get NovaSynth agent config for project","description":"Get NovaSynth agent config for project","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true}]},"put":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"putApiV1NovasynthAgent-config","tags":["NovaSynth"],"summary":"Create or update NovaSynth agent config","description":"Upserts config and may trigger first-time dataset/eval auto-setup.","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string"},"agentName":{"type":"string","minLength":1,"maxLength":100},"systemPrompt":{"type":"string","minLength":1,"maxLength":50000},"additionalInstructions":{"type":"string","maxLength":100000000},"agentType":{"type":"string","enum":["voice","chatbot","phone"],"default":"voice"},"language":{"type":"string","default":"en"},"contactNumber":{"type":"string"},"isInbound":{"type":"boolean","default":false},"conversationSyncEnabled":{"type":"boolean","default":false},"mockToolsEnabled":{"type":"boolean","default":false},"mockToolDefinitions":{"type":"array","items":{"type":"object","properties":{"tool_name":{"type":"string","maxLength":200},"mock_response":{"type":"string","maxLength":2000}},"required":["tool_name","mock_response"]},"maxItems":50},"promptSyncEnabled":{"type":"boolean","default":false}},"required":["systemPrompt"]}}}}}},"/api/v1/novasynth/agent-config/success-criteria":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthAgent-configSuccess-criteria","tags":["NovaSynth"],"summary":"List success-criteria metrics from linked eval job","description":"List success-criteria metrics from linked eval job","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/agent-config/sync-token":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthAgent-configSync-token","tags":["NovaSynth"],"summary":"Get conversation sync token","description":"Returns the token used for external conversation sync callbacks.","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/agent-config/regenerate-sync-token":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthAgent-configRegenerate-sync-token","tags":["NovaSynth"],"summary":"Regenerate conversation sync token","description":"Regenerate conversation sync token","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/agent-config/prompt-sync":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthAgent-configPrompt-sync","tags":["NovaSynth"],"summary":"Trigger prompt sync","description":"Reserved; currently returns 501 Not Implemented.","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/test-profiles":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthTest-profiles","tags":["NovaSynth"],"summary":"List synthetic test profiles","description":"List synthetic test profiles","parameters":[{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false},{"in":"query","name":"offset","schema":{"type":"integer","minimum":0,"default":0},"required":false},{"in":"query","name":"search","schema":{"type":"string"},"required":false},{"in":"query","name":"tags","schema":{"type":"string"},"required":false},{"in":"query","name":"categoryId","schema":{"type":"string"},"required":false},{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true}]},"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthTest-profiles","tags":["NovaSynth"],"summary":"Create synthetic test profile","description":"Create synthetic test profile","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string"},"attributes":{"type":"object","additionalProperties":{"type":"string"}}},"required":["name","attributes"]}}}}}},"/api/v1/novasynth/test-profiles/{id}":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthTest-profilesById","tags":["NovaSynth"],"summary":"Get synthetic test profile","description":"Get synthetic test profile","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]},"put":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"putApiV1NovasynthTest-profilesById","tags":["NovaSynth"],"summary":"Update synthetic test profile","description":"Update synthetic test profile","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string"},"attributes":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"delete":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"deleteApiV1NovasynthTest-profilesById","tags":["NovaSynth"],"summary":"Delete synthetic test profile","description":"Delete synthetic test profile","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/voice-profiles":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthVoice-profiles","tags":["NovaSynth"],"summary":"List bundled TTS voice profiles","description":"Filterable catalog (provider, gender, accent, style) for synthetic voice selection.","parameters":[{"in":"query","name":"provider","schema":{"type":"string","enum":["elevenlabs","cartesia","openai","all"],"default":"all"}},{"in":"query","name":"gender","schema":{"type":"string"}},{"in":"query","name":"accent","schema":{"type":"string"}},{"in":"query","name":"style","schema":{"type":"string"}}]}},"/api/v1/novasynth/voice-models":{"get":{"responses":{"200":{"description":"Voice models, supported language aliases, source documentation, per-model compatibility and an optional recommendation.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string"},"model":{"type":"string"},"name":{"type":"string"},"languageCodes":{"type":"array","items":{"type":"string"}},"runtimeSupported":{"type":"boolean"},"transport":{"type":"string"},"deprecated":{"type":"boolean"}},"required":["id","provider","model","name","languageCodes","runtimeSupported","transport"]}},"total":{"type":"integer"},"languages":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"}}},"required":["code","name","aliases"]}},"source":{"type":"string"},"verifiedAt":{"type":"string"},"runtime":{"type":"object","properties":{"livekit":{"type":"string"},"agents":{"type":"string"},"elevenlabsPlugin":{"type":"string"},"requiresNovaEvalV3Adapter":{"type":"boolean"}},"required":["livekit","agents","elevenlabsPlugin","requiresNovaEvalV3Adapter"]},"languageCodes":{"type":"array","items":{"type":"string"}},"unknownLanguages":{"type":"array","items":{"type":"string"}},"recommendation":{"type":["object","null"],"properties":{"id":{"type":"string"},"provider":{"type":"string"},"model":{"type":"string"},"name":{"type":"string"},"languageCodes":{"type":"array","items":{"type":"string"}},"runtimeSupported":{"type":"boolean"},"transport":{"type":"string"},"deprecated":{"type":"boolean"}},"required":["id","provider","model","name","languageCodes","runtimeSupported","transport"]},"compatibility":{"type":"array","items":{"type":"object","properties":{"modelId":{"type":"string"},"unsupportedLanguages":{"type":"array","items":{"type":"string"}},"runtimeSupported":{"type":"boolean"},"compatible":{"type":"boolean"}},"required":["modelId","unsupportedLanguages","runtimeSupported","compatible"]}}},"required":["success","data","total","languages","source","verifiedAt","runtime","languageCodes","unknownLanguages","recommendation","compatibility"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthVoice-models","tags":["NovaSynth"],"summary":"List voice models and language compatibility","description":"Documentation-backed ElevenLabs TTS model catalog with language coverage and compatibility with the pinned NovaSynth voice runtime. Unknown languages and runtime-incompatible transports are never advertised as supported. Use persona.ttsVoiceModel in Developer Calls or saved personas for an explicit model override.","parameters":[{"in":"query","name":"language","schema":{"type":"string","description":"Optional comma-separated spoken language names or codes, such as Marathi,English or mr-IN,en. Recommendations cover every recognized requested language; unknown languages prevent automatic recommendations."}}]}},"/api/v1/novasynth/persona-scenario-links":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthPersona-scenario-links","tags":["NovaSynth"],"summary":"List persona–scenario links","description":"Requires query `personaId` and/or `scenarioId`. Returns links for the authenticated org.","parameters":[{"in":"query","name":"personaId","schema":{"type":"string"}},{"in":"query","name":"scenarioId","schema":{"type":"string"}}]},"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthPersona-scenario-links","tags":["NovaSynth"],"summary":"Link a persona to a scenario","description":"Link a persona to a scenario","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"personaId":{"type":"string","minLength":1},"scenarioId":{"type":"string","minLength":1}},"required":["personaId","scenarioId"]}}}}}},"/api/v1/novasynth/persona-scenario-links/{personaId}/{scenarioId}":{"delete":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"deleteApiV1NovasynthPersona-scenario-linksByPersonaIdByScenarioId","tags":["NovaSynth"],"summary":"Remove persona–scenario link","description":"Remove persona–scenario link","parameters":[{"in":"path","name":"personaId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"scenarioId","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/library/personas":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthLibraryPersonas","tags":["NovaSynth"],"summary":"List public library personas","description":"Globally shared personas (isPublic) with optional filters.","parameters":[{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"in":"query","name":"offset","schema":{"type":"integer","minimum":0,"default":0}},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"tags","schema":{"type":"string"}},{"in":"query","name":"categoryId","schema":{"type":"string"}},{"in":"query","name":"category","schema":{"type":"string"}},{"in":"query","name":"language","schema":{"type":"string"}},{"in":"query","name":"accent","schema":{"type":"string"}}]}},"/api/v1/novasynth/library/scenarios":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthLibraryScenarios","tags":["NovaSynth"],"summary":"List public library scenarios","description":"Globally shared scenarios (isPublic) with optional filters.","parameters":[{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"in":"query","name":"offset","schema":{"type":"integer","minimum":0,"default":0}},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"tags","schema":{"type":"string"}},{"in":"query","name":"categoryId","schema":{"type":"string"}},{"in":"query","name":"category","schema":{"type":"string"}},{"in":"query","name":"type","schema":{"type":"string","enum":["conversation","workflow","red_team","knowledge_base","edge_case"]}}]}},"/api/v1/novasynth/library/personas/{id}/import":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthLibraryPersonasByIdImport","tags":["NovaSynth"],"summary":"Copy library persona into project","description":"Copy library persona into project","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/library/scenarios/{id}/import":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthLibraryScenariosByIdImport","tags":["NovaSynth"],"summary":"Copy library scenario into project","description":"Copy library scenario into project","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/webhooks/vapi/{endpointId}":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthWebhooksVapiByEndpointId","tags":["NovaSynth","Webhooks"],"summary":"Vapi provider webhook","description":"Inbound transcript/completion webhook for a Vapi agent endpoint. Authenticated via `X-Novasynth-Signature` (or legacy query secret).","parameters":[{"in":"path","name":"endpointId","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"call":{"type":"object","properties":{"id":{"type":"string","minLength":1},"messages":{"type":"array","items":{}},"stereoRecordingUrl":{"type":"string"},"recordingUrl":{"type":"string"},"cost":{"type":"number"},"duration":{"type":"number"}},"required":["id"],"additionalProperties":true}},"required":["call"],"additionalProperties":true}}}}}},"/api/v1/novasynth/webhooks/retell/{endpointId}":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthWebhooksRetellByEndpointId","tags":["NovaSynth","Webhooks"],"summary":"Retell provider webhook","description":"Same signing model as Vapi/Pipecat until native Retell signing is implemented.","parameters":[{"in":"path","name":"endpointId","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"call":{"type":"object","properties":{"call_id":{"type":"string","minLength":1},"transcript":{"type":"string"},"transcript_object":{"type":"array","items":{}},"recording_url":{"type":"string"},"call_cost":{},"duration_ms":{"type":"number"}},"required":["call_id"],"additionalProperties":true}},"required":["call"],"additionalProperties":true}}}}}},"/api/v1/novasynth/webhooks/pipecat/{endpointId}":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthWebhooksPipecatByEndpointId","tags":["NovaSynth","Webhooks"],"summary":"Pipecat provider webhook","description":"Pipecat provider webhook","parameters":[{"in":"path","name":"endpointId","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"conversation_id":{"type":"string","minLength":1},"messages":{"type":"array","items":{}},"recording_url":{"type":"string"},"metadata":{"type":"object","additionalProperties":{}}},"required":["conversation_id"],"additionalProperties":true}}}}}},"/api/v1/novasynth/conversation-sync/{projectId}/{token}":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthConversation-syncByProjectIdByToken","tags":["NovaSynth"],"summary":"Ingest conversation sync payload (token in path)","description":"Webhook-style endpoint authenticated by `conversationSyncToken` in the URL (not the org API key). Enqueues ETL for the mapped dataset.","parameters":[{"in":"path","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"token","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"transcript":{"type":"string"},"runId":{"type":"string"},"recordingUrl":{"type":"string"},"metadata":{"type":"object","additionalProperties":{}}},"required":["transcript"],"additionalProperties":true}}}}}},"/api/v1/novasynth/run-analysis/{runId}":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthRun-analysisByRunId","tags":["NovaSynth"],"summary":"Get NovaSynth run analysis record","description":"Returns `SyntheticRunAnalysis` for a run, or 404 if none exists yet.","parameters":[{"in":"path","name":"runId","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/run-analysis/{runId}/rebuild":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthRun-analysisByRunIdRebuild","tags":["NovaSynth"],"summary":"Rebuild NovaSynth analysis (enqueue ETL)","description":"Requires `traceId` on the run. Returns 422 when rebuild is not possible.","parameters":[{"in":"path","name":"runId","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/batch-analysis/{batchRunId}":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthBatch-analysisByBatchRunId","tags":["NovaSynth"],"summary":"Aggregate NovaSynth analysis status for a batch run","description":"Aggregate NovaSynth analysis status for a batch run","parameters":[{"in":"path","name":"batchRunId","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/batch-analysis/{batchRunId}/rebuild":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1NovasynthBatch-analysisByBatchRunIdRebuild","tags":["NovaSynth"],"summary":"Rebuild analysis for all runs in a batch","description":"Rebuild analysis for all runs in a batch","parameters":[{"in":"path","name":"batchRunId","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/analytics":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthAnalytics","tags":["NovaSynth"],"summary":"NovaSynth run analytics for a project","description":"Aggregated pass rates, scenario breakdown, and latency by endpoint over a date range.","parameters":[{"in":"query","name":"startDate","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":false},{"in":"query","name":"endDate","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":false},{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/analytics/persona-scenario-trend":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthAnalyticsPersona-scenario-trend","tags":["NovaSynth"],"summary":"Critical success rate trend for a persona/scenario pairing","description":"Returns per-batch critical success rate and criteria-met counts for runs of a given persona against a given scenario.","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"personaId","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"scenarioId","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"startDate","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":false},{"in":"query","name":"endDate","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":false}]}},"/api/v1/novasynth/analytics/scorer-trend":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthAnalyticsScorer-trend","tags":["NovaSynth"],"summary":"Critical success rate trend for a scorer","description":"Returns per-batch pass rate for a single scorer, counting only runs whose scorer results include that scorer.","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"scorerId","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"startDate","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":false},{"in":"query","name":"endDate","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":false}]}},"/api/v1/novasynth/overview":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthOverview","tags":["NovaSynth"],"summary":"NovaSynth overview state for a project","description":"Guided setup progress, project counts, and the configured agent summary.","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/novasynth/coverage":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1NovasynthCoverage","tags":["NovaSynth"],"summary":"Scenario and persona run coverage for a project","description":"Run counts with average and total duration, grouped by scenario and by persona. Configured scenarios and personas with zero runs are included as zero-count rows.","parameters":[{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/developer/calls":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1DeveloperCalls","tags":["Developer API"],"summary":"Create a test call (developer API)","description":"Creates endpoint, persona, scenario and call in one request. Supply optional projectId to use an existing project. For direction inbound, arms a Noveum number; poll returned statusUrl until ready before dialing. Outbound dials the endpoint. Voice mode only; webhook delivery is unavailable.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"description":"An existing project in the connected organization. Defaults to the Developer API project."},"direction":{"type":"string","enum":["outbound","inbound"],"default":"outbound","description":"Inbound reserves a Noveum number for the caller; outbound dials the endpoint."},"endpoint":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"phone"},"phoneNumber":{"type":"string","pattern":"^\\+[1-9]\\d{1,14}$"},"phoneCountryCode":{"type":"string","pattern":"^\\+[1-9]\\d{0,2}$"}},"required":["type","phoneNumber","phoneCountryCode"]},{"type":"object","properties":{"type":{"type":"string","const":"livekit"},"livekitUrl":{"type":"string","format":"uri"},"livekitApiKey":{"type":"string","minLength":1},"livekitApiSecret":{"type":"string","minLength":1},"livekitAgentName":{"type":"string","minLength":1}},"required":["type","livekitUrl","livekitApiKey","livekitApiSecret","livekitAgentName"]},{"type":"object","properties":{"type":{"type":"string","const":"websocket"},"websocketUrl":{"type":"string","format":"uri"},"websocketAuthHeader":{"type":"string","minLength":1}},"required":["type","websocketUrl"]},{"type":"object","properties":{"type":{"type":"string","const":"retell"},"retellApiKey":{"type":"string","minLength":1},"retellAgentId":{"type":"string"}},"required":["type","retellApiKey"]},{"type":"object","properties":{"type":{"type":"string","const":"vapi"},"vapiApiKey":{"type":"string","minLength":1},"vapiAssistantId":{"type":"string"}},"required":["type","vapiApiKey"]},{"type":"object","properties":{"type":{"type":"string","const":"pipecat"},"pipecatApiKey":{"type":"string","minLength":1},"pipecatAgentName":{"type":"string","minLength":1},"pipecatAgentConfigJson":{"type":"object","additionalProperties":{}}},"required":["type","pipecatApiKey","pipecatAgentName"]},{"type":"object","properties":{"type":{"type":"string","const":"elevenlabs_conversational"},"elevenLabsApiKey":{"type":"string","minLength":1},"elevenLabsAgentId":{"type":"string"}},"required":["type","elevenLabsApiKey"]},{"type":"object","properties":{"type":{"type":"string","const":"existing"},"endpointId":{"type":"string","minLength":1}},"required":["type","endpointId"]}]},"persona":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","default":""},"goal":{"type":"string","minLength":1},"personalityTraits":{"type":"array","items":{"type":"string"},"default":[]},"tonePreference":{"type":"string","default":"neutral"},"primaryLanguage":{"type":"array","items":{"type":"string"},"default":[]},"understandsLanguages":{"type":"array","items":{"type":"string"},"default":[]},"knowledgeBase":{"type":"array","items":{"type":"string"},"default":[]},"age":{"type":"integer","exclusiveMinimum":0},"occupation":{"type":"string"},"location":{"type":"string"},"educationLevel":{"type":"string"},"gender":{"type":"string"},"ttsVoiceModel":{"type":["string","null"],"description":"Optional TTS provider:model override, for example elevenlabs:eleven_v3. Null clears the override; omission on create uses automatic selection, while omission on update preserves the saved value. An explicit persona model takes precedence over NOVASYNTH_PHONE_TTS_MODEL and language-based defaults. Discover models and languages with GET /api/v1/novasynth/voice-models."},"ttsVoiceId":{"type":"string"},"speakingSpeed":{"type":"number","minimum":0.7,"maximum":1.2,"default":1},"interruptionLevel":{"type":"number","minimum":0,"maximum":1,"default":0.5},"backgroundNoise":{"type":["string","null"],"maxLength":400},"backgroundNoiseLevel":{"type":"number","minimum":5,"maximum":200},"backgroundNoiseDuration":{"type":"number","minimum":5,"maximum":120},"backgroundNoiseMode":{"type":"string","enum":["mix_tts","ambient"],"default":"mix_tts"},"networkPacketLoss":{"type":"number","minimum":0,"maximum":1},"accentDescription":{"type":"string","maxLength":500},"maxDurationS":{"type":"integer","minimum":30,"maximum":600}},"required":["name","goal"]},"scenario":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"parent_id":{"type":["string","null"]},"action":{"type":"string","minLength":1},"condition":{"type":["string","null"]}},"required":["id","action"],"additionalProperties":true},"default":[]},"metadata":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/NovaSynthJsonValue"},"default":{}},"tags":{"type":"array","items":{"type":"string"},"default":[]},"scenarioType":{"type":"string","enum":["conversation","workflow","red_team","knowledge_base","edge_case"],"default":"conversation"},"folder":{"type":"string","maxLength":200},"libraryCategory":{"type":"string"},"categoryId":{"type":["string","null"],"minLength":1},"interruptionLevel":{"type":"number","minimum":0,"maximum":1,"default":0.5},"interruptions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["re_explain","hold_on","third_party_aside","hurry_up","bad_audio","not_interested","clarification","correction","premature_answer"]},"marker_turn":{"type":"integer","minimum":1},"intent":{"type":["string","null"]},"opener":{"type":["string","null"]},"after_event_id":{"type":["string","null"]},"gate":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"utterance_elapsed"},"threshold_seconds":{"type":"number","exclusiveMinimum":0,"default":6}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"live_transcript"}},"required":["type"]}]},"window_turns":{"type":"integer","minimum":1,"default":3},"on_miss":{"type":"string","enum":["fire_late","skip_and_log"]}},"required":["type","marker_turn"]},"default":[]},"projectId":{"type":"string"},"isPublic":{"type":"boolean","default":false}},"required":["name","description"]},"eval":{"type":"boolean","default":true},"mode":{"type":"string","enum":["voice","text"],"default":"voice"},"maxCallDurationS":{"type":"integer","minimum":60,"maximum":600,"default":300},"webhook":{"type":"string","format":"uri"},"serviceVersion":{"type":"string","maxLength":100}},"required":["endpoint","persona","scenario"]}}}}}},"/api/v1/developer/calls/batch":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1DeveloperCallsBatch","tags":["Developer API"],"summary":"Create a batch of test calls (developer API)","description":"Creates inline personas, scenarios and calls in one request. Inbound batches arm only the first call; poll inbound.statusUrl until ready, finish it, then use claimNextUrl to arm the next call. Voice mode only.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"description":"An existing project in the connected organization. Defaults to the Developer API project."},"direction":{"type":"string","enum":["outbound","inbound"],"default":"outbound","description":"Inbound reserves a Noveum number for the caller; outbound dials the endpoint."},"endpoint":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"phone"},"phoneNumber":{"type":"string","pattern":"^\\+[1-9]\\d{1,14}$"},"phoneCountryCode":{"type":"string","pattern":"^\\+[1-9]\\d{0,2}$"}},"required":["type","phoneNumber","phoneCountryCode"]},{"type":"object","properties":{"type":{"type":"string","const":"livekit"},"livekitUrl":{"type":"string","format":"uri"},"livekitApiKey":{"type":"string","minLength":1},"livekitApiSecret":{"type":"string","minLength":1},"livekitAgentName":{"type":"string","minLength":1}},"required":["type","livekitUrl","livekitApiKey","livekitApiSecret","livekitAgentName"]},{"type":"object","properties":{"type":{"type":"string","const":"websocket"},"websocketUrl":{"type":"string","format":"uri"},"websocketAuthHeader":{"type":"string","minLength":1}},"required":["type","websocketUrl"]},{"type":"object","properties":{"type":{"type":"string","const":"retell"},"retellApiKey":{"type":"string","minLength":1},"retellAgentId":{"type":"string"}},"required":["type","retellApiKey"]},{"type":"object","properties":{"type":{"type":"string","const":"vapi"},"vapiApiKey":{"type":"string","minLength":1},"vapiAssistantId":{"type":"string"}},"required":["type","vapiApiKey"]},{"type":"object","properties":{"type":{"type":"string","const":"pipecat"},"pipecatApiKey":{"type":"string","minLength":1},"pipecatAgentName":{"type":"string","minLength":1},"pipecatAgentConfigJson":{"type":"object","additionalProperties":{}}},"required":["type","pipecatApiKey","pipecatAgentName"]},{"type":"object","properties":{"type":{"type":"string","const":"elevenlabs_conversational"},"elevenLabsApiKey":{"type":"string","minLength":1},"elevenLabsAgentId":{"type":"string"}},"required":["type","elevenLabsApiKey"]},{"type":"object","properties":{"type":{"type":"string","const":"existing"},"endpointId":{"type":"string","minLength":1}},"required":["type","endpointId"]}]},"calls":{"type":"array","items":{"type":"object","properties":{"persona":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","default":""},"goal":{"type":"string","minLength":1},"personalityTraits":{"type":"array","items":{"type":"string"},"default":[]},"tonePreference":{"type":"string","default":"neutral"},"primaryLanguage":{"type":"array","items":{"type":"string"},"default":[]},"understandsLanguages":{"type":"array","items":{"type":"string"},"default":[]},"knowledgeBase":{"type":"array","items":{"type":"string"},"default":[]},"age":{"type":"integer","exclusiveMinimum":0},"occupation":{"type":"string"},"location":{"type":"string"},"educationLevel":{"type":"string"},"gender":{"type":"string"},"ttsVoiceModel":{"type":["string","null"],"description":"Optional TTS provider:model override, for example elevenlabs:eleven_v3. Null clears the override; omission on create uses automatic selection, while omission on update preserves the saved value. An explicit persona model takes precedence over NOVASYNTH_PHONE_TTS_MODEL and language-based defaults. Discover models and languages with GET /api/v1/novasynth/voice-models."},"ttsVoiceId":{"type":"string"},"speakingSpeed":{"type":"number","minimum":0.7,"maximum":1.2,"default":1},"interruptionLevel":{"type":"number","minimum":0,"maximum":1,"default":0.5},"backgroundNoise":{"type":["string","null"],"maxLength":400},"backgroundNoiseLevel":{"type":"number","minimum":5,"maximum":200},"backgroundNoiseDuration":{"type":"number","minimum":5,"maximum":120},"backgroundNoiseMode":{"type":"string","enum":["mix_tts","ambient"],"default":"mix_tts"},"networkPacketLoss":{"type":"number","minimum":0,"maximum":1},"accentDescription":{"type":"string","maxLength":500},"maxDurationS":{"type":"integer","minimum":30,"maximum":600}},"required":["name","goal"]},"scenario":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"parent_id":{"type":["string","null"]},"action":{"type":"string","minLength":1},"condition":{"type":["string","null"]}},"required":["id","action"],"additionalProperties":true},"default":[]},"metadata":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/NovaSynthJsonValue"},"default":{}},"tags":{"type":"array","items":{"type":"string"},"default":[]},"scenarioType":{"type":"string","enum":["conversation","workflow","red_team","knowledge_base","edge_case"],"default":"conversation"},"folder":{"type":"string","maxLength":200},"libraryCategory":{"type":"string"},"categoryId":{"type":["string","null"],"minLength":1},"interruptionLevel":{"type":"number","minimum":0,"maximum":1,"default":0.5},"interruptions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["re_explain","hold_on","third_party_aside","hurry_up","bad_audio","not_interested","clarification","correction","premature_answer"]},"marker_turn":{"type":"integer","minimum":1},"intent":{"type":["string","null"]},"opener":{"type":["string","null"]},"after_event_id":{"type":["string","null"]},"gate":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"utterance_elapsed"},"threshold_seconds":{"type":"number","exclusiveMinimum":0,"default":6}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"live_transcript"}},"required":["type"]}]},"window_turns":{"type":"integer","minimum":1,"default":3},"on_miss":{"type":"string","enum":["fire_late","skip_and_log"]}},"required":["type","marker_turn"]},"default":[]},"projectId":{"type":"string"},"isPublic":{"type":"boolean","default":false}},"required":["name","description"]}},"required":["persona","scenario"]},"minItems":1,"maxItems":100},"eval":{"type":"boolean","default":true},"mode":{"type":"string","enum":["voice","text"],"default":"voice"},"maxCallDurationS":{"type":"integer","minimum":60,"maximum":600,"default":300},"concurrencyLimit":{"type":"integer","minimum":1,"maximum":20,"default":5},"webhook":{"type":"string","format":"uri"},"serviceVersion":{"type":"string","maxLength":100}},"required":["endpoint","calls"]}}}}}},"/api/v1/developer/calls/{id}":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1DeveloperCallsById","tags":["Developer API"],"summary":"Get a test call result (developer API)","description":"Get a test call result (developer API)","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/api/v1/developer/calls/batch/{id}":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1DeveloperCallsBatchById","tags":["Developer API"],"summary":"Get a batch call result (developer API)","description":"Get a batch call result (developer API)","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/api/v1/developer/calls/{id}/config":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1DeveloperCallsByIdConfig","tags":["Developer API"],"summary":"Export a call config (developer API)","description":"Export a call config (developer API)","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","python","curl"]}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/api/v1/developer/calls/batch/{id}/config":{"get":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1DeveloperCallsBatchByIdConfig","tags":["Developer API"],"summary":"Export a batch config (developer API)","description":"Export a batch config (developer API)","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","python","curl"]}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/api/v1/developer/calls/{id}/replay":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1DeveloperCallsByIdReplay","tags":["Developer API"],"summary":"Replay a previous call (developer API)","description":"Replay a previous call (developer API)","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/api/v1/leads":{"get":{"responses":{"200":{"description":"Waitlist entries","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":["string","null"]},"notes":{"type":["string","null"]},"isApproved":{"type":"boolean"},"approvedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","email","name","notes","isApproved","approvedAt","createdAt"]}},"nextCursor":{"type":"string"}},"required":["entries"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized - invalid API key or session"},"403":{"description":"Forbidden - caller is not a platform super-admin"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiV1Leads","parameters":[{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"in":"query","name":"before","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"isApproved","schema":{"type":"string","enum":["true","false"]}}],"tags":["Leads"],"summary":"List inbound waitlist signups (super-admin only, read-only, newest first)","description":"List inbound waitlist signups (super-admin only, read-only, newest first)"}},"/api/v1/usage/entitlements":{"get":{"responses":{},"operationId":"getApiV1UsageEntitlements","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"},"required":true}]}},"/api/v1/usage/summary":{"get":{"responses":{},"operationId":"getApiV1UsageSummary","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"},"required":true}]}},"/api/v1/usage/wallet":{"get":{"responses":{},"operationId":"getApiV1UsageWallet","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"},"required":true}]}},"/api/v1/usage/eval-jobs":{"get":{"responses":{},"operationId":"getApiV1UsageEval-jobs","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"},"required":true},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false},{"in":"query","name":"offset","schema":{"type":"integer","minimum":0,"default":0},"required":false}]}},"/api/v1/usage/novasynth-runs":{"get":{"responses":{},"operationId":"getApiV1UsageNovasynth-runs","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"},"required":true},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false},{"in":"query","name":"offset","schema":{"type":"integer","minimum":0,"default":0},"required":false}]}},"/api/v1/usage/history":{"get":{"responses":{},"operationId":"getApiV1UsageHistory","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"},"required":true},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false},{"in":"query","name":"offset","schema":{"type":"integer","minimum":0,"default":0},"required":false}]}},"/api/waitlist":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Email already registered"},"422":{"description":"Unprocessable entity"},"500":{"description":"Server error"}},"operationId":"postApiWaitlist","tags":["Web"],"summary":"Public waitlist signup","description":"Marketing-site endpoint; adds an email to the waitlist (same backend as `/api/waitlist`).","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"name":{"type":"string","minLength":1},"notes":{"type":"string"}},"required":["email","name"]}}},"required":true}}},"/api/waitlist/check/{email}":{"get":{"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Server error"}},"operationId":"getApiWaitlistCheckByEmail","parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Waitlist"],"summary":"Check if a waitlist email is approved (session auth)","description":"Check if a waitlist email is approved (session auth)"}},"/api/waitlist/approve":{"post":{"responses":{"200":{"description":"Approved","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Server error"}},"operationId":"postApiWaitlistApprove","tags":["Waitlist"],"summary":"Approve a waitlist user (session auth)","description":"Approve a waitlist user (session auth)","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"}},"required":["email"]}}},"required":true}}}},"components":{"schemas":{"DirectoryTreeNode":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["organization","project","environment","filter"]},"children":{"type":"array","items":{"$ref":"#/components/schemas/DirectoryTreeNode"}},"isExpanded":{"type":"boolean"},"isSelected":{"type":"boolean"},"metadata":{"type":"object","properties":{"traceCount":{"type":"number"},"lastActivity":{"type":"string"}},"additionalProperties":{}}},"required":["id","name","type"]},"NovaSynthJsonValue":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/NovaSynthJsonValue"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/NovaSynthJsonValue"}}]},"User":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"emailVerified":{"type":"boolean"},"image":{"type":"string"},"createdAt":{"type":"date"},"updatedAt":{"type":"date"},"username":{"type":"string"},"role":{"type":"string"},"banned":{"type":"boolean"},"banReason":{"type":"string"},"banExpires":{"type":"date"},"locale":{"type":"string"}}},"Session":{"type":"object","properties":{"id":{"type":"string"},"expiresAt":{"type":"date"},"token":{"type":"string"},"createdAt":{"type":"date"},"updatedAt":{"type":"date"},"ipAddress":{"type":"string"},"userAgent":{"type":"string"},"userId":{"type":"string"},"impersonatedBy":{"type":"string"},"activeOrganizationId":{"type":"string"}}},"Account":{"type":"object","properties":{"id":{"type":"string"},"accountId":{"type":"string"},"providerId":{"type":"string"},"userId":{"type":"string"},"accessToken":{"type":"string"},"refreshToken":{"type":"string"},"idToken":{"type":"string"},"accessTokenExpiresAt":{"type":"date"},"refreshTokenExpiresAt":{"type":"date"},"scope":{"type":"string"},"password":{"type":"string"},"createdAt":{"type":"date"},"updatedAt":{"type":"date"}}},"Verification":{"type":"object","properties":{"id":{"type":"string"},"identifier":{"type":"string"},"value":{"type":"string"},"expiresAt":{"type":"date"},"createdAt":{"type":"date"},"updatedAt":{"type":"date"}}},"Passkey":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publicKey":{"type":"string"},"userId":{"type":"string"},"credentialID":{"type":"string"},"counter":{"type":"number"},"deviceType":{"type":"string"},"backedUp":{"type":"boolean"},"transports":{"type":"string"},"createdAt":{"type":"date"}}},"Organization":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"logo":{"type":"string"},"createdAt":{"type":"date"},"metadata":{"type":"string"}}},"Member":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"userId":{"type":"string"},"role":{"type":"string"},"createdAt":{"type":"date"}}},"Invitation":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"status":{"type":"string"},"expiresAt":{"type":"date"},"inviterId":{"type":"string"}}}},"securitySchemes":{"apiKeyCookie":{"type":"apiKey","in":"cookie","name":"apiKeyCookie","description":"API Key authentication via cookie"},"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token authentication"}}}}