{"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/lifecycle/customerio/reporting":{"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":"postApiLifecycleCustomerioReporting","tags":["Organizations"],"summary":"Receive signed Customer.io delivery and preference callbacks","description":"Receive signed Customer.io delivery and preference callbacks","parameters":[]}},"/api/lifecycle/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":"getApiLifecyclePreferences","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]+$","minLength":1,"maxLength":200}}],"tags":["Organizations"],"summary":"Read your organization email preferences","description":"Read your organization email preferences"},"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":"patchApiLifecyclePreferences","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","pattern":"^[A-Za-z0-9_.:-]+$","minLength":1,"maxLength":200},"activationOptIn":{"type":"boolean"},"digestOptIn":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[],"tags":["Organizations"],"summary":"Update your own email preferences; never subscribe other members","description":"Update your own email preferences; never subscribe other members"}},"/api/lifecycle/scope":{"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":"putApiLifecycleScope","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","pattern":"^[A-Za-z0-9_.:-]+$","minLength":1,"maxLength":200},"projectId":{"type":"string","pattern":"^[A-Za-z0-9_.:-]+$","minLength":1,"maxLength":200},"environment":{"type":"string","minLength":1,"maxLength":80},"monitoringWanted":{"type":"boolean"},"requiredScorerIds":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_.:-]+$","minLength":1,"maxLength":200},"maxItems":30},"targetCoverage":{"type":["number","null"],"minimum":0,"maximum":1},"targetFreshDays":{"type":["integer","null"],"minimum":1,"maximum":30}},"required":["organizationId","projectId","environment","monitoringWanted","requiredScorerIds","targetCoverage","targetFreshDays"],"additionalProperties":false}}}},"parameters":[],"tags":["Organizations"],"summary":"Confirm the intended project and evaluation target","description":"Confirm the intended project and evaluation target"}},"/api/lifecycle/human-handoff":{"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":"postApiLifecycleHuman-handoff","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","pattern":"^[A-Za-z0-9_.:-]+$","minLength":1,"maxLength":200},"organizationId":{"type":"string","pattern":"^[A-Za-z0-9_.:-]+$","minLength":1,"maxLength":200},"reason":{"type":"string","enum":["reply_observed","support_conversation","qualified_sales"]}},"required":["userId","reason"],"additionalProperties":false}}}},"parameters":[],"tags":["Organizations"],"summary":"Pause lifecycle messages for an observed human conversation","description":"Pause lifecycle messages for an observed human conversation"}},"/api/lifecycle/events":{"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":"postApiLifecycleEvents","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","pattern":"^[A-Za-z0-9_.:-]+$","minLength":1,"maxLength":200},"projectId":{"type":"string","pattern":"^[A-Za-z0-9_.:-]+$","minLength":1,"maxLength":200},"resourceId":{"type":"string","pattern":"^[A-Za-z0-9_.:-]+$","minLength":1,"maxLength":200},"eventName":{"type":"string","enum":["evaluation_results_viewed","evaluation_reviewed","novasynth_results_viewed","novapilot_report_viewed","novabot_response_viewed","integration_instructions_copied","evaluation_cost_quote_viewed","evaluation_cost_quote_accepted"]}},"required":["organizationId","resourceId","eventName"],"additionalProperties":false}}}},"parameters":[],"tags":["Organizations"],"summary":"Record an authorized view or explicit review; outcomes are server-only","description":"Record an authorized view or explicit review; outcomes are server-only"}},"/api/payments/purchases":{"get":{"responses":{"200":{"description":"Purchases","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":["string","null"]},"userId":{"type":["string","null"]},"type":{"type":"string","enum":["SUBSCRIPTION","ONE_TIME"]},"customerId":{"type":"string"},"subscriptionId":{"type":["string","null"]},"productId":{"type":"string"},"status":{"type":["string","null"]},"cancelAtPeriodEnd":{"type":"boolean"},"pendingProductId":{"type":["string","null"]},"pendingChangeAt":{"type":["string","null"]},"scheduleId":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","customerId","productId","cancelAtPeriodEnd","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":"getApiPaymentsPurchases","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}}],"tags":["Payments"],"summary":"List purchases","description":"Lists the subscriptions and one-time purchases of the organization, or of the current user when no organization is given."}},"/api/payments/create-checkout-link":{"post":{"responses":{"200":{"description":"Checkout link for the user to open","content":{"application/json":{"schema":{"type":"object","properties":{"checkoutLink":{"type":"string"}},"required":["checkoutLink"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"BILLING_MANAGED_BY_AWS_MARKETPLACE: the organization pays through AWS Marketplace","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiPaymentsCreate-checkout-link","parameters":[{"in":"query","name":"type","schema":{"type":"string","enum":["one-time","subscription"]},"required":true},{"in":"query","name":"productId","schema":{"type":"string"},"required":true},{"in":"query","name":"redirectUrl","schema":{"type":"string"},"required":false},{"in":"query","name":"organizationId","schema":{"type":"string"},"required":false}],"tags":["Payments"],"summary":"Create a checkout link","description":"Creates a Stripe checkout link for a one-time or subscription product. The user opens the link to pay."}},"/api/payments/create-customer-portal-link":{"post":{"responses":{"200":{"description":"Customer portal link for the user to open","content":{"application/json":{"schema":{"type":"object","properties":{"customerPortalLink":{"type":"string"}},"required":["customerPortalLink"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"BILLING_MANAGED_BY_AWS_MARKETPLACE: the organization pays through AWS Marketplace","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiPaymentsCreate-customer-portal-link","parameters":[{"in":"query","name":"purchaseId","schema":{"type":"string"}},{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"redirectUrl","schema":{"type":"string"}}],"tags":["Payments"],"summary":"Create a customer portal link","description":"Creates a Stripe customer portal link where the user manages payment methods, invoices and the subscription. Provide a purchaseId for a specific purchase or an organizationId for that organization's customer; with neither, the current user's customer is used. With both, the purchase must belong to the organization."}},"/api/payments/cancel-subscription":{"post":{"responses":{"200":{"description":"Subscription set to cancel","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":"BILLING_MANAGED_BY_AWS_MARKETPLACE: the organization pays through AWS Marketplace","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiPaymentsCancel-subscription","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"},"required":true}],"tags":["Payments"],"summary":"Cancel the subscription at the end of the period","description":"Cancel the subscription at the end of the period"}},"/api/payments/reactivate-subscription":{"post":{"responses":{"200":{"description":"Subscription reactivated","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":"BILLING_MANAGED_BY_AWS_MARKETPLACE: the organization pays through AWS Marketplace","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiPaymentsReactivate-subscription","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"},"required":true}],"tags":["Payments"],"summary":"Reactivate a subscription that is set to cancel","description":"Reactivate a subscription that is set to cancel"}},"/api/payments/proration-preview":{"get":{"responses":{"200":{"description":"What changing to the new price would charge now","content":{"application/json":{"schema":{"type":"object","properties":{"immediateCharge":{"type":"number"},"currency":{"type":"string"},"nextInvoiceDate":{"type":["string","null"]}},"required":["immediateCharge","currency","nextInvoiceDate"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"BILLING_MANAGED_BY_AWS_MARKETPLACE: the organization pays through AWS Marketplace","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiPaymentsProration-preview","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"},"required":true},{"in":"query","name":"newPriceId","schema":{"type":"string"},"required":true}],"tags":["Payments"],"summary":"Preview the charge for a plan or billing interval change","description":"Preview the charge for a plan or billing interval change"}},"/api/payments/change-plan":{"post":{"responses":{"200":{"description":"Subscription updated or scheduled","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"scheduledFor":{"type":["string","null"]}},"required":["success"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"BILLING_MANAGED_BY_AWS_MARKETPLACE: the organization pays through AWS Marketplace","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiPaymentsChange-plan","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"},"required":true},{"in":"query","name":"newPriceId","schema":{"type":"string"},"required":true},{"in":"query","name":"prorationBehavior","schema":{"type":"string","enum":["always_invoice","create_prorations","none"],"default":"always_invoice"},"required":false},{"in":"query","name":"applyAt","schema":{"type":"string","enum":["now","period_end"],"default":"now"},"required":false}],"tags":["Payments"],"summary":"Change the subscription plan or billing interval","description":"Moves the subscription to another price now, or at the end of the period with applyAt period_end."}},"/api/payments/checkout-status":{"get":{"responses":{"200":{"description":"Provider payment and wallet fulfillment status","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["pending","fulfilled"]},"packKey":{"type":"string"}},"required":["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":"getApiPaymentsCheckout-status","parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"},"required":true},{"in":"query","name":"sessionId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}],"tags":["Payments"],"summary":"Verify credit pack checkout fulfillment","description":"Verify credit pack checkout fulfillment"}},"/api/payments/buy-credits-pack":{"post":{"responses":{"200":{"description":"Checkout link for the user to open","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"BILLING_MANAGED_BY_AWS_MARKETPLACE: the organization pays through AWS Marketplace","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiPaymentsBuy-credits-pack","parameters":[{"in":"query","name":"packKey","schema":{"type":"string","enum":["boost","accelerate","scale"]},"required":true},{"in":"query","name":"organizationId","schema":{"type":"string"},"required":true}],"tags":["Payments"],"summary":"Buy a credit add-on pack","description":"Creates a Stripe checkout link for a credit pack. The user opens the link to pay."}},"/api/organizations/generate-slug":{"get":{"responses":{"200":{"description":"A slug no organization uses yet","content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"No free slug was found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiOrganizationsGenerate-slug","parameters":[{"in":"query","name":"name","schema":{"type":"string"},"required":true}],"tags":["Organizations"],"summary":"Suggest a free organization slug for a name","description":"Suggest a free organization slug for a name"}},"/api/organizations/invitations":{"get":{"responses":{"200":{"description":"Your pending invitations","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":["string","null"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":["string","null"]}},"required":["id","name","slug"]}},"required":["id","role","organization"]}}},"required":["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":"getApiOrganizationsInvitations","tags":["Organizations"],"summary":"List the invitations waiting for you","description":"Lists the pending, unexpired invitations to join other organizations sent to your email address.","parameters":[]}},"/api/organizations/invitation/{id}":{"get":{"responses":{"200":{"description":"The pending invitation","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":["string","null"]},"status":{"type":"string"},"expiresAt":{"type":"string"},"organizationId":{"type":"string"},"inviterId":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":["string","null"]},"logo":{"type":["string","null"]}},"required":["id","name","slug","logo"]}},"required":["id","email","role","status","expiresAt","organizationId","inviterId","organization"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"The invitation was sent to someone else","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"No pending invitation with this ID","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":"getApiOrganizationsInvitationById","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["Organizations"],"summary":"Get an invitation sent to you","description":"Get an invitation sent to you"}},"/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/live":{"get":{"responses":{"200":{"description":"Server is answering requests"},"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":"getApiHealthLive","tags":["Health"],"summary":"Liveness check","description":"Returns 200 while this server can answer requests, without checking Postgres, ClickHouse or Redis. Readiness probes and load balancer health checks use it, so an outage of a shared dependency does not remove every server at once.","parameters":[]}},"/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/telemetry/plugins":{"get":{"responses":{"200":{"description":"Telemetry plugins","content":{"application/json":{"schema":{"type":"object","properties":{"plugins":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":{}},"organizationId":{"type":"string"},"enabled":{"type":"boolean"},"isDefault":{"type":"boolean"},"environment":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","type","config","organizationId","enabled","isDefault","environment","createdAt","updatedAt"]}}},"required":["plugins"]}}}},"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":"getApiTelemetryPlugins","tags":["Telemetry Plugins"],"summary":"List the organization's telemetry plugins","description":"Lists the bring-your-own ClickHouse telemetry plugins with their secrets masked.","parameters":[]},"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"The created telemetry plugin","content":{"application/json":{"schema":{"type":"object","properties":{"plugin":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":{}},"organizationId":{"type":"string"},"enabled":{"type":"boolean"},"isDefault":{"type":"boolean"},"environment":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","type","config","organizationId","enabled","isDefault","environment","createdAt","updatedAt"]}},"required":["plugin"]}}}},"400":{"description":"Invalid input or plugin type already exists"},"401":{"description":"Unauthorized"},"403":{"description":"The organization's plan does not include storing traces in its own ClickHouse"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiTelemetryPlugins","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","const":"clickhouse"},"config":{"type":"object","additionalProperties":{}},"enabled":{"type":"boolean","default":true},"isDefault":{"type":"boolean","default":false},"environment":{"type":"string","enum":["development","staging","production"],"default":"production"}},"required":["name","type","config"]}}}},"parameters":[],"tags":["Telemetry Plugins"],"summary":"Create a telemetry plugin","description":"Connects a bring-your-own ClickHouse server. config takes host, port, ssl, database, username and password."}},"/api/telemetry/plugins/{id}":{"get":{"responses":{"200":{"description":"The telemetry plugin with its secrets masked","content":{"application/json":{"schema":{"type":"object","properties":{"plugin":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":{}},"organizationId":{"type":"string"},"enabled":{"type":"boolean"},"isDefault":{"type":"boolean"},"environment":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","type","config","organizationId","enabled","isDefault","environment","createdAt","updatedAt"]}},"required":["plugin"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Plugin not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryPluginsById","tags":["Telemetry Plugins"],"summary":"Get a telemetry plugin","description":"Get a telemetry plugin","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}]},"put":{"responses":{"200":{"description":"The updated telemetry plugin","content":{"application/json":{"schema":{"type":"object","properties":{"plugin":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":{}},"organizationId":{"type":"string"},"enabled":{"type":"boolean"},"isDefault":{"type":"boolean"},"environment":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","type","config","organizationId","enabled","isDefault","environment","createdAt","updatedAt"]}},"required":["plugin"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"The host, port or username changed without a new password"},"401":{"description":"Unauthorized"},"403":{"description":"The organization's plan does not include storing traces in its own ClickHouse"},"404":{"description":"Plugin not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"putApiTelemetryPluginsById","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","const":"clickhouse"},"config":{"type":"object","additionalProperties":{}},"enabled":{"type":"boolean","default":true},"isDefault":{"type":"boolean","default":false},"environment":{"type":"string","enum":["development","staging","production"],"default":"production"}}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["Telemetry Plugins"],"summary":"Update a telemetry plugin","description":"Updates a telemetry plugin. A config without a password, or with the masked one, keeps the stored password, unless it changes the host, port or username: then the password must be entered again."},"delete":{"responses":{"204":{"description":"Plugin deleted"},"404":{"description":"Plugin not found"}},"operationId":"deleteApiTelemetryPluginsById","tags":["Telemetry Plugins"],"summary":"Delete a telemetry plugin","description":"Delete a telemetry plugin","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}]}},"/api/telemetry/plugins/{id}/test/connection":{"post":{"responses":{"200":{"description":"Connection test result","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"step":{"type":"object","properties":{"name":{"type":"string"},"status":{"type":"string","enum":["success","error"]},"message":{"type":"string"},"error":{"type":"string"}},"required":["name","status"]},"timestamp":{"type":"string"}},"required":["success","step","timestamp"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"The organization's plan does not include storing traces in its own ClickHouse"},"404":{"description":"Plugin not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiTelemetryPluginsByIdTestConnection","tags":["Telemetry Plugins"],"summary":"Test the ClickHouse connection (step 1)","description":"Test the ClickHouse connection (step 1)","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}]}},"/api/telemetry/plugins/{id}/test/access":{"post":{"responses":{"200":{"description":"Access test result","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"step":{"type":"object","properties":{"name":{"type":"string"},"status":{"type":"string","enum":["success","error"]},"message":{"type":"string"},"error":{"type":"string"}},"required":["name","status"]},"timestamp":{"type":"string"}},"required":["success","step","timestamp"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"The organization's plan does not include storing traces in its own ClickHouse"},"404":{"description":"Plugin not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiTelemetryPluginsByIdTestAccess","tags":["Telemetry Plugins"],"summary":"Test the ClickHouse user's access (step 2)","description":"Test the ClickHouse user's access (step 2)","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}]}},"/api/telemetry/plugins/{id}/test/verify-table":{"post":{"responses":{"200":{"description":"Table verification result","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"step":{"type":"object","properties":{"name":{"type":"string"},"status":{"type":"string","enum":["success","error"]},"message":{"type":"string"},"error":{"type":"string"}},"required":["name","status"]},"timestamp":{"type":"string"},"table":{"type":"string"},"exists":{"type":"boolean"}},"required":["success","step","timestamp","table"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid or unknown table name"},"401":{"description":"Unauthorized"},"403":{"description":"The organization's plan does not include storing traces in its own ClickHouse"},"404":{"description":"Plugin not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiTelemetryPluginsByIdTestVerify-table","tags":["Telemetry Plugins"],"summary":"Check that one required ClickHouse table exists","description":"Check that one required ClickHouse table exists","parameters":[{"in":"query","name":"table","schema":{"type":"string"},"required":true},{"in":"path","name":"id","schema":{"type":"string"},"required":true}]}},"/api/telemetry/plugins/{id}/test/required-tables":{"get":{"responses":{"200":{"description":"Required table names","content":{"application/json":{"schema":{"type":"object","properties":{"tables":{"type":"array","items":{"type":"string"}}},"required":["tables"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"The organization's plan does not include storing traces in its own ClickHouse"},"404":{"description":"Plugin not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiTelemetryPluginsByIdTestRequired-tables","tags":["Telemetry Plugins"],"summary":"List the ClickHouse tables the plugin needs","description":"List the ClickHouse tables the plugin needs","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}]}},"/api/telemetry/plugins/{id}/test/create-table":{"post":{"responses":{"200":{"description":"Create table result","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"step":{"type":"object","properties":{"name":{"type":"string"},"status":{"type":"string","enum":["success","error"]},"message":{"type":"string"},"error":{"type":"string"}},"required":["name","status"]},"timestamp":{"type":"string"},"table":{"type":"string"},"exists":{"type":"boolean"}},"required":["success","step","timestamp","table"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid or unknown table name"},"401":{"description":"Unauthorized"},"403":{"description":"The organization's plan does not include storing traces in its own ClickHouse"},"404":{"description":"Plugin not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiTelemetryPluginsByIdTestCreate-table","tags":["Telemetry Plugins"],"summary":"Create one required ClickHouse table if it is missing","description":"Create one required ClickHouse table if it is missing","parameters":[{"in":"query","name":"table","schema":{"type":"string"},"required":true},{"in":"path","name":"id","schema":{"type":"string"},"required":true}]}},"/api/telemetry/plugins/{id}/test/verify":{"post":{"responses":{"200":{"description":"Verification result","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"step":{"type":"object","properties":{"name":{"type":"string"},"status":{"type":"string","enum":["success","error"]},"message":{"type":"string"},"error":{"type":"string"}},"required":["name","status"]},"timestamp":{"type":"string"}},"required":["success","step","timestamp"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"The organization's plan does not include storing traces in its own ClickHouse"},"404":{"description":"Plugin not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiTelemetryPluginsByIdTestVerify","tags":["Telemetry Plugins"],"summary":"Verify the whole ClickHouse configuration (step 5)","description":"Verify the whole ClickHouse configuration (step 5)","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}]}},"/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"},"503":{"description":"Usage measurement unavailable; retry after 30 seconds"}},"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/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","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.","parameters":[],"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","minLength":1},"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"]}},"chunk":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":1,"maximum":1000}},"required":["index","count"]}},"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}},"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","minLength":1},"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"]}},"chunk":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":1,"maximum":1000}},"required":["index","count"]}},"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/chunks":{"post":{"responses":{"200":{"description":"Trace chunk 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":"postApiV1TracesChunks","tags":["Traces"],"summary":"Ingest one chunk of a large trace","description":"Ingest one chunk of a trace too large for one request. Every chunk repeats the trace fields with the trace_id and the total span_count, carries its own spans, and sets chunk: { index, count }. Send the chunks in order with index count - 1 last; post-ingest work runs once every chunk is stored.","parameters":[],"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","minLength":1},"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"]}},"chunk":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":1,"maximum":1000}},"required":["index","count"]}},"required":["name","start_time","end_time","duration_ms","status","span_count","project","sdk","spans"]},"minItems":1,"maxItems":1},"timestamp":{"type":"number"}},"required":["traces"]}}},"required":true}}},"/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. Without size, returns up to 10,000 matching IDs; pagination.total is the full match count and has_more is true when more IDs match than were returned. 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","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.","parameters":[],"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","minLength":1},"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"]}},"chunk":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":1,"maximum":1000}},"required":["index","count"]}},"required":["name","start_time","end_time","duration_ms","status","span_count","project","sdk","spans"]}}},"required":true}}},"/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","minLength":1},"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"]}},"chunk":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":1,"maximum":1000}},"required":["index","count"]}},"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 (DATASET_SLUG_EXISTS), or a dataset with this slug is still being deleted (DATASET_DELETION_IN_PROGRESS)"},"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 (3-14 credits by prompt size; 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 2 credits plus 1 per 2,000 estimated prompt tokens, rounded up (3 to 14 credits), 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":"A scorerId does not match an available scorer","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":"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":"A scorerId does not match an available scorer","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":"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":"The organization's plan does not include creating or editing custom scorers"},"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 on a plan that includes custom scorers. 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, or the plan does not include custom scorers","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}},"description":"Only temperature is used. The platform chooses the agent's provider and model; provider and modelName are ignored."}},"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, or a base URL or endpoint that is not a public http or https address.","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 - The stored base URL or endpoint is not a public http or https address.","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":"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. A stored base URL or endpoint that is not a public http or https address is refused with 400."}},"/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":"Project deletion is already in progress"},"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/organization":{"get":{"responses":{"200":{"description":"The organization","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":["string","null"]},"logo":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","name","slug","logo","createdAt"]}}}},"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":"getApiV1Organization","tags":["Organizations"],"summary":"Get the organization's name, slug and logo","description":"Get the organization's name, slug and logo","parameters":[]},"patch":{"responses":{"200":{"description":"The updated organization","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":["string","null"]},"logo":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","name","slug","logo","createdAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Your organization role does not allow this","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"patchApiV1Organization","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"logo":{"type":["string","null"],"format":"uri","maxLength":2000}},"additionalProperties":false}}}},"parameters":[],"tags":["Organizations"],"summary":"Rename the organization or change its logo","description":"Owners and admins may update the organization. The slug never changes: telemetry history is stored under it."}},"/api/v1/organization/invitations":{"get":{"responses":{"200":{"description":"Pending, unexpired invitations","content":{"application/json":{"schema":{"type":"object","properties":{"invitations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":["string","null"]},"status":{"type":"string"},"expiresAt":{"type":"string"},"inviterId":{"type":"string"}},"required":["id","email","role","status","expiresAt","inviterId"]}}},"required":["invitations"]}}}},"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":"getApiV1OrganizationInvitations","tags":["Organizations"],"summary":"List the organization's pending invitations","description":"List the organization's pending invitations","parameters":[]},"post":{"responses":{"200":{"description":"The invitation","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":["string","null"]},"status":{"type":"string"},"expiresAt":{"type":"string"},"inviterId":{"type":"string"}},"required":["id","email","role","status","expiresAt","inviterId"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Already a member, already invited, or an address the role does not allow","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Your organization role does not allow this","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"429":{"description":"Invitation email must be retried","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Internal server error"},"503":{"description":"Invitation email delivery could not be confirmed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}},"operationId":"postApiV1OrganizationInvitations","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","maxLength":320},"role":{"type":"string","enum":["owner","admin","ai-engineer","developer","product-manager","viewer"]}},"required":["email","role"],"additionalProperties":false}}}},"parameters":[],"tags":["Organizations"],"summary":"Invite someone to the organization with a role","description":"Owners and admins may invite. Only owners may invite another owner. The invitee gets an email with a link to join."}},"/api/v1/organization/invitations/{invitationId}/cancel":{"post":{"responses":{"200":{"description":"The canceled invitation","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":["string","null"]},"status":{"type":"string"},"expiresAt":{"type":"string"},"inviterId":{"type":"string"}},"required":["id","email","role","status","expiresAt","inviterId"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Your organization role does not allow this","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"404":{"description":"No invitation with this ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1OrganizationInvitationsByInvitationIdCancel","parameters":[{"in":"path","name":"invitationId","schema":{"type":"string","minLength":1},"required":true}],"tags":["Organizations"],"summary":"Cancel a pending invitation","description":"Owners and admins may cancel invitations."}},"/api/v1/organization/members/{memberId}":{"delete":{"responses":{"200":{"description":"The removed member","content":{"application/json":{"schema":{"type":"object","properties":{"member":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"role":{"type":"string"}},"required":["id","userId","role"]}},"required":["member"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"The member is an owner or yourself","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Your organization role does not allow this","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"404":{"description":"No member with this ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"deleteApiV1OrganizationMembersByMemberId","parameters":[{"in":"path","name":"memberId","schema":{"type":"string","minLength":1},"required":true}],"tags":["Organizations"],"summary":"Remove a member from the organization","description":"Owners and admins may remove members. Owners cannot be removed, and you leave with the leave operation instead. The member's API keys and connected apps for the organization are revoked."}},"/api/v1/organization/leave":{"post":{"responses":{"200":{"description":"You left the organization","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":"You are the only owner","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1OrganizationLeave","tags":["Organizations"],"summary":"Leave the organization","description":"Removes you from the organization and revokes your API keys and connected apps for it. The only owner cannot leave.","parameters":[]}},"/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"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","projectId","datasetSlug","organizationId","isEnabled","datasetDeleted","mapperCode","userId","isConfigurationDone","environment","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"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","projectId","datasetSlug","organizationId","isEnabled","datasetDeleted","mapperCode","userId","isConfigurationDone","environment","createdAt","updatedAt"]}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Mapper code is rejected by the NovaEval transform sandbox","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["MAPPER_REJECTED_BY_SANDBOX","MAPPER_SANDBOX_UNAVAILABLE","RATE_LIMIT_EXCEEDED"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Too many mapper code checks for this organization","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["MAPPER_REJECTED_BY_SANDBOX","MAPPER_SANDBOX_UNAVAILABLE","RATE_LIMIT_EXCEEDED"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Internal server error"},"503":{"description":"The NovaEval transform sandbox is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["MAPPER_REJECTED_BY_SANDBOX","MAPPER_SANDBOX_UNAVAILABLE","RATE_LIMIT_EXCEEDED"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["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"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","projectId","datasetSlug","organizationId","isEnabled","datasetDeleted","mapperCode","userId","isConfigurationDone","environment","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"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","projectId","datasetSlug","organizationId","isEnabled","datasetDeleted","mapperCode","userId","isConfigurationDone","environment","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":"Mapper code is rejected by the NovaEval transform sandbox","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["MAPPER_REJECTED_BY_SANDBOX","MAPPER_SANDBOX_UNAVAILABLE","RATE_LIMIT_EXCEEDED"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Too many mapper code checks for this organization","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["MAPPER_REJECTED_BY_SANDBOX","MAPPER_SANDBOX_UNAVAILABLE","RATE_LIMIT_EXCEEDED"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Internal server error"},"503":{"description":"The NovaEval transform sandbox is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["MAPPER_REJECTED_BY_SANDBOX","MAPPER_SANDBOX_UNAVAILABLE","RATE_LIMIT_EXCEEDED"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["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"}}},"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"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","projectId","datasetSlug","organizationId","isEnabled","datasetDeleted","mapperCode","userId","isConfigurationDone","environment","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":"Mapper code is rejected by the NovaEval transform sandbox","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["MAPPER_REJECTED_BY_SANDBOX","MAPPER_SANDBOX_UNAVAILABLE","RATE_LIMIT_EXCEEDED"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Too many mapper code checks for this organization","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["MAPPER_REJECTED_BY_SANDBOX","MAPPER_SANDBOX_UNAVAILABLE","RATE_LIMIT_EXCEEDED"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Internal server error"},"503":{"description":"The NovaEval transform sandbox is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["MAPPER_REJECTED_BY_SANDBOX","MAPPER_SANDBOX_UNAVAILABLE","RATE_LIMIT_EXCEEDED"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["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":"Another run of this ETL job is queued or processing"},"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 the code versions, newest first","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"},"origin":{"type":"string"},"novaEvalJobRunId":{"type":["string","null"]},"createdBy":{"type":["string","null"]},"createdByName":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","etlJobId","version","code","description","source","origin","novaEvalJobRunId","createdBy","createdByName","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":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":200}},{"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"},"origin":{"type":"string"},"novaEvalJobRunId":{"type":["string","null"]},"createdBy":{"type":["string","null"]},"createdByName":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","etlJobId","version","code","description","source","origin","novaEvalJobRunId","createdBy","createdByName","createdAt"]}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"ETL job not found"},"409":{"description":"A newer version was saved after baseVersionId, so nothing was saved","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"VERSION_CONFLICT"},"message":{"type":"string"},"latestVersionId":{"type":["string","null"]},"latestVersion":{"type":["number","null"]}},"required":["code","message","latestVersionId","latestVersion"]}},"required":["error"]}}}},"422":{"description":"Mapper code is rejected by the NovaEval transform sandbox","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["MAPPER_REJECTED_BY_SANDBOX","MAPPER_SANDBOX_UNAVAILABLE","RATE_LIMIT_EXCEEDED"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Too many mapper code checks for this organization","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["MAPPER_REJECTED_BY_SANDBOX","MAPPER_SANDBOX_UNAVAILABLE","RATE_LIMIT_EXCEEDED"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Internal server error"},"503":{"description":"The NovaEval transform sandbox is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["MAPPER_REJECTED_BY_SANDBOX","MAPPER_SANDBOX_UNAVAILABLE","RATE_LIMIT_EXCEEDED"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["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"},"baseVersionId":{"type":["string","null"],"description":"The latest version id the change was made on, or null when the job had no versions. The save fails with 409 VERSION_CONFLICT when a newer version exists. Omit to save without the check."},"novaEvalJobRunId":{"type":"string","description":"The completed NovaEval run whose output code is saved"}},"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"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","projectId","datasetSlug","organizationId","isEnabled","datasetDeleted","mapperCode","userId","isConfigurationDone","environment","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":"A newer version was saved after baseVersionId","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"VERSION_CONFLICT"},"message":{"type":"string"},"latestVersionId":{"type":["string","null"]},"latestVersion":{"type":["number","null"]}},"required":["code","message","latestVersionId","latestVersion"]}},"required":["error"]}}}},"422":{"description":"Mapper code is rejected by the NovaEval transform sandbox","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["MAPPER_REJECTED_BY_SANDBOX","MAPPER_SANDBOX_UNAVAILABLE","RATE_LIMIT_EXCEEDED"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Too many mapper code checks for this organization","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["MAPPER_REJECTED_BY_SANDBOX","MAPPER_SANDBOX_UNAVAILABLE","RATE_LIMIT_EXCEEDED"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Internal server error"},"503":{"description":"The NovaEval transform sandbox is unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["MAPPER_REJECTED_BY_SANDBOX","MAPPER_SANDBOX_UNAVAILABLE","RATE_LIMIT_EXCEEDED"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["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":"query","name":"baseVersionId","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":"Job run reached a terminal state before it could be cancelled","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"cancelled":{"type":"boolean"},"id":{"type":"string"},"status":{"type":"string"},"message":{"type":"string"}},"required":["success","cancelled","id","status","message"]}}}},"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"},"origin":{"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","origin","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},"chatMessage":{"type":"string","maxLength":4000}},"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"},"origin":{"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","origin","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"},"origin":{"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","origin","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"},"origin":{"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","origin","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/etl-jobs/{id}/chat-messages":{"get":{"responses":{"200":{"description":"Chat messages in order, with their NovaEval run","content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string","enum":["user","assistant"]},"origin":{"type":"string"},"content":{"type":"string"},"jobRunId":{"type":["string","null"]},"isApplied":{"type":"boolean"},"appliedVersionId":{"type":["string","null"]},"novabotWorkId":{"type":["string","null"]},"novabotAgentId":{"type":["string","null"]},"novabotConversationId":{"type":["string","null"]},"createdBy":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"run":{"type":["object","null"],"properties":{"jobType":{"type":"string"},"status":{"type":"string"},"error":{"type":["string","null"]},"errorCode":{"type":["string","null"]},"outputCode":{"type":["string","null"]},"inputCode":{"type":["string","null"]},"suggestionText":{"type":["string","null"]},"origin":{"type":"string"}},"required":["jobType","status","error","errorCode","outputCode","inputCode","suggestionText","origin"]}},"required":["id","role","origin","content","jobRunId","isApplied","appliedVersionId","novabotWorkId","novabotAgentId","novabotConversationId","createdBy","createdAt","updatedAt","run"]}}},"required":["messages"]}}}},"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-jobsByIdChat-messages","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"],"summary":"List the mapper chat history shared by the ETL chat and NovaBot","description":"List the mapper chat history shared by the ETL chat and NovaBot"},"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"The appended message","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"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-jobsByIdChat-messages","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":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string","minLength":1,"maxLength":20000}},"required":["role","content"]}}}},"tags":["ETL Jobs"],"summary":"Append a note to the mapper chat history","description":"Append a note to the mapper chat history"},"delete":{"responses":{"200":{"description":"History cleared","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"number"},"cancelledRuns":{"type":"number"}},"required":["deleted","cancelledRuns"]}}}},"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":"deleteApiV1Etl-jobsByIdChat-messages","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"],"summary":"Clear the mapper chat history and stop its pending NovaEval runs","description":"Clear the mapper chat history and stop its pending NovaEval runs"}},"/api/v1/etl-jobs/{id}/chat-messages/{messageId}":{"patch":{"responses":{"200":{"description":"The message was updated","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"boolean"}},"required":["updated"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Message not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"patchApiV1Etl-jobsByIdChat-messagesByMessageId","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":"messageId","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"isApplied":{"type":"boolean"}},"required":["isApplied"]}}}},"tags":["ETL Jobs"],"summary":"Mark a mapper chat message as applied to the editor","description":"Mark a mapper chat message as applied to the editor"}},"/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":"Project not found in the caller organization"},"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"},"criteria":{"type":"string","minLength":1},"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"},"agentNameExact":{"type":"string","pattern":"\\S","minLength":1},"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"},"criteria":{"type":"string","minLength":1},"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"},"criteria":{"type":"string","minLength":1},"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"},"criteria":{"type":"string","minLength":1},"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"},"agentNameExact":{"type":"string","pattern":"\\S","minLength":1},"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"},"agentNameExact":{"type":"string","pattern":"\\S","minLength":1},"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"},"agentNameExact":{"type":"string","pattern":"\\S","minLength":1},"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":"The evaluation includes a custom scorer and the organization's plan does not include custom scorers"},"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"},"agentNameExact":{"type":"string","pattern":"\\S","minLength":1},"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"},"criteria":{"type":"string","minLength":1},"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":"A saved agentNameExact scope always constrains the run, including explicit item IDs. Otherwise datasetItemIds take precedence and 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"},"agentNameExact":{"type":"string","pattern":"\\S","minLength":1},"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"},"agentNameExact":{"type":"string","pattern":"\\S","minLength":1},"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"},"429":{"description":"Report email rate limit exceeded"},"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},"autoFix":{"type":"object","properties":{"enabled":{"type":"boolean"},"preset":{"type":"string","enum":["quick","balanced","thorough"],"default":"balanced"},"reviewPlan":{"type":"boolean","default":true}},"required":["enabled"]}},"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"},"autoFix":{"type":"object","properties":{"enabled":{"type":"boolean"},"preset":{"type":"string","enum":["quick","balanced","thorough"]},"reviewPlan":{"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/autofix/runs":{"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":"postApiV1AutofixRuns","tags":["AutoFix"],"summary":"Start an AutoFix run from a NovaPilot report","description":"Start an AutoFix run from a NovaPilot report","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string","minLength":1,"maxLength":200}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"maxLength":200},"sourceReportId":{"type":"string","minLength":1,"maxLength":200},"preset":{"type":"string","enum":["quick","balanced","thorough"],"default":"balanced"},"reviewPlan":{"type":"boolean","default":true},"timeLimitMinutes":{"type":"integer"},"experiments":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"sourceRecId":{"type":"string","minLength":1,"maxLength":256},"label":{"type":"string","maxLength":2000},"agentName":{"type":"string","minLength":1,"maxLength":256},"affectedScorers":{"type":"array","items":{"type":"string","maxLength":256},"maxItems":64},"type":{"type":"string","const":"prompt.searchReplace"},"edit":{"type":"object","properties":{"search":{"type":"string","minLength":1,"maxLength":20000},"replace":{"type":"string","maxLength":20000}},"required":["search","replace"]}},"required":["sourceRecId","type","edit"]},{"type":"object","properties":{"sourceRecId":{"type":"string","minLength":1,"maxLength":256},"label":{"type":"string","maxLength":2000},"agentName":{"type":"string","minLength":1,"maxLength":256},"affectedScorers":{"type":"array","items":{"type":"string","maxLength":256},"maxItems":64},"type":{"type":"string","const":"prompt.append"},"replace":{"type":"string","minLength":1,"maxLength":20000}},"required":["sourceRecId","type","replace"]},{"type":"object","properties":{"sourceRecId":{"type":"string","minLength":1,"maxLength":256},"label":{"type":"string","maxLength":2000},"agentName":{"type":"string","minLength":1,"maxLength":256},"affectedScorers":{"type":"array","items":{"type":"string","maxLength":256},"maxItems":64},"type":{"type":"string","const":"tool.schemaEdit"},"toolName":{"type":"string","minLength":1,"maxLength":256},"patch":{"type":"object","properties":{"description":{"type":"string","maxLength":20000},"required_add":{"type":"array","items":{"type":"string","maxLength":256},"maxItems":64},"required_remove":{"type":"array","items":{"type":"string","maxLength":256},"maxItems":64},"properties":{"type":"object","additionalProperties":{}}}}},"required":["sourceRecId","type","toolName","patch"]}]},"maxItems":20}},"required":["projectId","sourceReportId"]}}}}},"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":"getApiV1AutofixRuns","tags":["AutoFix"],"summary":"List AutoFix runs","description":"List AutoFix runs","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string","minLength":1,"maxLength":200},"required":false},{"in":"query","name":"projectId","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"query","name":"sourceReportId","schema":{"type":"string","minLength":1,"maxLength":200},"required":false},{"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/autofix/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":"getApiV1AutofixRunsByRunId","tags":["AutoFix"],"summary":"Get an AutoFix run with its plan and report","description":"Get an AutoFix run with its plan and report","parameters":[{"in":"path","name":"runId","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"query","name":"organizationSlug","schema":{"type":"string","minLength":1,"maxLength":200}},{"in":"query","name":"projectId","schema":{"type":"string","minLength":1,"maxLength":200}}]}},"/api/v1/autofix/runs/{runId}/plan":{"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":"putApiV1AutofixRunsByRunIdPlan","tags":["AutoFix"],"summary":"Save the reviewed AutoFix plan","description":"Save the reviewed AutoFix plan","parameters":[{"in":"path","name":"runId","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"query","name":"organizationSlug","schema":{"type":"string","minLength":1,"maxLength":200}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"maxLength":200},"plan":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"run":{"type":"boolean","default":true},"label":{"type":["string","null"],"maxLength":2000},"origin":{"type":["string","null"],"enum":["seed","authored","mutation","crossover","merge","user","tool-authored","prior_run"]},"parentId":{"type":["string","null"],"maxLength":256},"sourceRecId":{"type":["string","null"],"maxLength":256},"agentName":{"type":["string","null"],"maxLength":256},"affectedScorers":{"type":"array","items":{"type":"string","maxLength":256},"maxItems":64,"default":[]},"pass":{"type":["string","null"],"maxLength":256},"untestable":{"type":["object","null"],"properties":{"reason":{"type":"string","enum":["too_few_items","scorer_not_backtestable","multi_turn_scorer"]},"matchingItems":{"type":"integer","minimum":0},"neededItems":{"type":["integer","null"],"minimum":0}},"required":["reason","matchingItems","neededItems"]},"priorRunId":{"type":["string","null"],"maxLength":256},"type":{"type":"string","const":"prompt.searchReplace"},"edit":{"type":"object","properties":{"search":{"type":"string","minLength":1,"maxLength":20000},"replace":{"type":"string","maxLength":20000}},"required":["search","replace"]}},"required":["id","type","edit"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"run":{"type":"boolean","default":true},"label":{"type":["string","null"],"maxLength":2000},"origin":{"type":["string","null"],"enum":["seed","authored","mutation","crossover","merge","user","tool-authored","prior_run"]},"parentId":{"type":["string","null"],"maxLength":256},"sourceRecId":{"type":["string","null"],"maxLength":256},"agentName":{"type":["string","null"],"maxLength":256},"affectedScorers":{"type":"array","items":{"type":"string","maxLength":256},"maxItems":64,"default":[]},"pass":{"type":["string","null"],"maxLength":256},"untestable":{"type":["object","null"],"properties":{"reason":{"type":"string","enum":["too_few_items","scorer_not_backtestable","multi_turn_scorer"]},"matchingItems":{"type":"integer","minimum":0},"neededItems":{"type":["integer","null"],"minimum":0}},"required":["reason","matchingItems","neededItems"]},"priorRunId":{"type":["string","null"],"maxLength":256},"type":{"type":"string","const":"prompt.append"},"replace":{"type":"string","minLength":1,"maxLength":20000}},"required":["id","type","replace"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":256},"run":{"type":"boolean","default":true},"label":{"type":["string","null"],"maxLength":2000},"origin":{"type":["string","null"],"enum":["seed","authored","mutation","crossover","merge","user","tool-authored","prior_run"]},"parentId":{"type":["string","null"],"maxLength":256},"sourceRecId":{"type":["string","null"],"maxLength":256},"agentName":{"type":["string","null"],"maxLength":256},"affectedScorers":{"type":"array","items":{"type":"string","maxLength":256},"maxItems":64,"default":[]},"pass":{"type":["string","null"],"maxLength":256},"untestable":{"type":["object","null"],"properties":{"reason":{"type":"string","enum":["too_few_items","scorer_not_backtestable","multi_turn_scorer"]},"matchingItems":{"type":"integer","minimum":0},"neededItems":{"type":["integer","null"],"minimum":0}},"required":["reason","matchingItems","neededItems"]},"priorRunId":{"type":["string","null"],"maxLength":256},"type":{"type":"string","const":"tool.schemaEdit"},"toolName":{"type":"string","minLength":1,"maxLength":256},"patch":{"type":"object","properties":{"description":{"type":"string","maxLength":20000},"required_add":{"type":"array","items":{"type":"string","maxLength":256},"maxItems":64},"required_remove":{"type":"array","items":{"type":"string","maxLength":256},"maxItems":64},"properties":{"type":"object","additionalProperties":{}}}}},"required":["id","type","toolName","patch"]}]},"minItems":1,"maxItems":200}},"required":["projectId","plan"]}}}}}},"/api/v1/autofix/runs/{runId}/experiments":{"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":"postApiV1AutofixRunsByRunIdExperiments","tags":["AutoFix"],"summary":"Add an experiment to a review-first AutoFix run","description":"Adds one prompt or tool-schema change, written by a person, to a review-first run. The change names the report issue it fixes with sourceRecId, a prompt edit's search text must appear in the agent's prompt and a tool change must name a recorded tool. While the plan waits for review the change is added to it, turned on; while AutoFix still drafts the plan it is kept and added once the plan is drafted. Other runs answer 409.","parameters":[{"in":"path","name":"runId","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"query","name":"organizationSlug","schema":{"type":"string","minLength":1,"maxLength":200}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"maxLength":200},"experiment":{"oneOf":[{"type":"object","properties":{"sourceRecId":{"type":"string","minLength":1,"maxLength":256},"label":{"type":"string","maxLength":2000},"agentName":{"type":"string","minLength":1,"maxLength":256},"affectedScorers":{"type":"array","items":{"type":"string","maxLength":256},"maxItems":64},"type":{"type":"string","const":"prompt.searchReplace"},"edit":{"type":"object","properties":{"search":{"type":"string","minLength":1,"maxLength":20000},"replace":{"type":"string","maxLength":20000}},"required":["search","replace"]}},"required":["sourceRecId","type","edit"]},{"type":"object","properties":{"sourceRecId":{"type":"string","minLength":1,"maxLength":256},"label":{"type":"string","maxLength":2000},"agentName":{"type":"string","minLength":1,"maxLength":256},"affectedScorers":{"type":"array","items":{"type":"string","maxLength":256},"maxItems":64},"type":{"type":"string","const":"prompt.append"},"replace":{"type":"string","minLength":1,"maxLength":20000}},"required":["sourceRecId","type","replace"]},{"type":"object","properties":{"sourceRecId":{"type":"string","minLength":1,"maxLength":256},"label":{"type":"string","maxLength":2000},"agentName":{"type":"string","minLength":1,"maxLength":256},"affectedScorers":{"type":"array","items":{"type":"string","maxLength":256},"maxItems":64},"type":{"type":"string","const":"tool.schemaEdit"},"toolName":{"type":"string","minLength":1,"maxLength":256},"patch":{"type":"object","properties":{"description":{"type":"string","maxLength":20000},"required_add":{"type":"array","items":{"type":"string","maxLength":256},"maxItems":64},"required_remove":{"type":"array","items":{"type":"string","maxLength":256},"maxItems":64},"properties":{"type":"object","additionalProperties":{}}}}},"required":["sourceRecId","type","toolName","patch"]}]}},"required":["projectId","experiment"]}}}}}},"/api/v1/autofix/runs/{runId}/start":{"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":"postApiV1AutofixRunsByRunIdStart","tags":["AutoFix"],"summary":"Run the reviewed AutoFix plan","description":"Run the reviewed AutoFix plan","parameters":[{"in":"path","name":"runId","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"query","name":"organizationSlug","schema":{"type":"string","minLength":1,"maxLength":200}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"maxLength":200},"timeLimitMinutes":{"type":"integer"}},"required":["projectId"]}}}}}},"/api/v1/autofix/runs/{runId}/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":"postApiV1AutofixRunsByRunIdCancel","tags":["AutoFix"],"summary":"Cancel an AutoFix run","description":"Cancel an AutoFix run","parameters":[{"in":"path","name":"runId","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"query","name":"organizationSlug","schema":{"type":"string","minLength":1,"maxLength":200}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"maxLength":200}},"required":["projectId"]}}}}}},"/api/v1/autofix/runs/{runId}/decisions":{"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":"putApiV1AutofixRunsByRunIdDecisions","tags":["AutoFix"],"summary":"Adopt one fix for an issue, reject the issue or clear its decision","description":"Adopt one fix for an issue, reject the issue or clear its decision","parameters":[{"in":"path","name":"runId","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"query","name":"organizationSlug","schema":{"type":"string","minLength":1,"maxLength":200}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"maxLength":200},"recommendationId":{"type":"string","minLength":1,"maxLength":512},"decision":{"type":"string","enum":["adopt","reject","clear"]},"note":{"type":"string","maxLength":2000}},"required":["projectId","recommendationId","decision"]}}}}}},"/api/v1/autofix/runs/{runId}/continue":{"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":"postApiV1AutofixRunsByRunIdContinue","tags":["AutoFix"],"summary":"Continue an AutoFix run that stopped on its time limit","description":"Re-queues a run whose issues stopped on the time limit. The engine keeps every completed test and spends only the credits left from the run's original authorization (planning and testing holds together). A second request while the continued run is queued or running returns the same run and starts nothing.","parameters":[{"in":"path","name":"runId","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"query","name":"organizationSlug","schema":{"type":"string","minLength":1,"maxLength":200}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"maxLength":200},"timeLimitMinutes":{"type":"integer"}},"required":["projectId"]}}}}}},"/api/v1/autofix/runs/{runId}/pdf":{"get":{"responses":{"200":{"description":"Report PDF","content":{"application/pdf":{}}},"404":{"description":"Run not found"},"409":{"description":"Run has no finished report"},"422":{"description":"Stored report data is invalid"},"429":{"description":"Report PDF rate limit exceeded"}},"operationId":"getApiV1AutofixRunsByRunIdPdf","tags":["AutoFix"],"summary":"Download an AutoFix report PDF","description":"Download an AutoFix report PDF","parameters":[{"in":"path","name":"runId","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"query","name":"organizationSlug","schema":{"type":"string","minLength":1,"maxLength":200},"required":false},{"in":"query","name":"projectId","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"query","name":"locale","schema":{"type":"string","minLength":2,"maxLength":10},"required":false}]}},"/api/v1/autofix/runs/{runId}/send-email":{"post":{"responses":{"200":{"description":"Delivery counts","content":{"application/json":{"schema":{"type":"object","properties":{"sent":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0}},"required":["sent","failed"]}}}},"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":"Run has no finished report"},"422":{"description":"Stored report data is invalid"},"429":{"description":"Report email rate limit exceeded"},"500":{"description":"Internal server error"}},"operationId":"postApiV1AutofixRunsByRunIdSend-email","tags":["AutoFix"],"summary":"Email an AutoFix report with its PDF attached","description":"Email an AutoFix report with its PDF attached","parameters":[{"in":"path","name":"runId","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"query","name":"organizationSlug","schema":{"type":"string","minLength":1,"maxLength":200}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"maxLength":200},"scope":{"type":"string","enum":["me","team"]}},"required":["projectId","scope"]}}}}}},"/api/v1/autofix/runs/{runId}/adoptions":{"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":"getApiV1AutofixRunsByRunIdAdoptions","tags":["AutoFix"],"summary":"Check whether adopted AutoFix prompt changes appear in recent system prompts anywhere in the project","description":"Check whether adopted AutoFix prompt changes appear in recent system prompts anywhere in the project","parameters":[{"in":"path","name":"runId","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"query","name":"organizationSlug","schema":{"type":"string","minLength":1,"maxLength":200}},{"in":"query","name":"projectId","schema":{"type":"string","minLength":1,"maxLength":200}}]}},"/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":1800},"libraryCategory":{"type":"string"},"profile":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}},"projectId":{"type":"string"}},"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":1800},"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,"maximum":50,"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. Set novaSynthSpeaksFirst to true to have NovaSynth speak first, for example to play an IVR greeting or menu on inbound calls, except on HTTP chat endpoints, which use the endpoint's own agentSpeaksFirst setting instead.","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"},"novaSynthSpeaksFirst":{"type":"boolean","description":"Optional. true sets metadata.agent_speaks_first to false so NovaSynth speaks first; false removes that key; omission leaves it unchanged. When metadata is also sent, metadata is applied first and this field on top."}},"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. Set novaSynthSpeaksFirst to true to have NovaSynth speak first, for example to play an IVR greeting or menu on inbound calls, except on HTTP chat endpoints, which use the endpoint's own agentSpeaksFirst setting instead.","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":[]},"novaSynthSpeaksFirst":{"type":"boolean","description":"Optional. true sets metadata.agent_speaks_first to false so NovaSynth speaks first; false removes that key; omission leaves it unchanged. When metadata is also sent, metadata is applied first and this field on top."}}}}}}},"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,"maximum":50,"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). The response carries the generated `webhookSecret`; it is shown only here, so store it now.","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":"Preview agent endpoint webhook secret","description":"Returns the first and last four characters of the webhook secret so it can be recognised. The full secret is shown only when the endpoint is created or the secret is regenerated.","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}/regenerate-webhook-secret":{"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-endpointsByIdRegenerate-webhook-secret","tags":["NovaSynth"],"summary":"Regenerate agent endpoint webhook secret","description":"Replaces the webhook secret and returns the new one. It is shown only in this response, and requests signed with the previous secret are rejected from now on.","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":"Preview http_chat endpoint auth secret","description":"Returns the auth type and the first and last four characters of the stored authentication token. The token itself is never returned; replace it through rotate-credentials.","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":1800,"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, dispatching and awaiting_call runs in a batch, releases the inbound numbers they hold, 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 opens its dial window. Returns status 'ready' with the number to dial; the synthetic persona picks up after a few seconds of ringing. 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. When this call first enables conversation sync, the response carries the new `syncToken`; it is shown only here.","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":"Preview conversation sync token","description":"Returns the first and last four characters of the conversation sync token so it can be recognised. The full token is shown only when it is created or regenerated.","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":"Replaces the conversation sync token and returns the new one. It is shown only in this response, and the previous sync URL stops working.","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"}},"usesModelsFor":{"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`, an HMAC-SHA256 of `{X-Novasynth-Timestamp}.{raw body}`; the timestamp is required and must be within five minutes.","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/voice/options":{"get":{"responses":{"200":{"description":"The values the spec accepts for each field","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"languages":{"type":"array","items":{"type":"string","enum":["English","Hindi","Hinglish","Kannada","Tamil","Telugu","Marathi","Gujarati","Bengali","Arabic"]}},"stt":{"type":"array","items":{"type":"string","enum":["deepgram:nova-3","deepgram:nova-2-general","deepgram:nova-2-phonecall","elevenlabs:scribe_v2_realtime"]}},"tts":{"type":"array","items":{"type":"string","enum":["elevenlabs:eleven_turbo_v2_5","elevenlabs:eleven_flash_v2_5","elevenlabs:eleven_multilingual_v2","elevenlabs:eleven_v3","cartesia:sonic-3","cartesia:sonic-2"]}},"llm":{"type":"array","items":{"type":"string","enum":["google:gemini-2.5-flash","google:gemini-3.1-flash-lite","sarvam:sarvam-105b-conversations"]}}},"required":["success","languages","stt","tts","llm"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal server error"}},"operationId":"getApiV1VoiceOptions","tags":["Voice agents"],"summary":"List the languages, STT, TTS and LLM values a voice agent can use","description":"List the languages, STT, TTS and LLM values a voice agent can use","parameters":[]}},"/api/v1/voice/voices":{"get":{"responses":{"200":{"description":"The voices of the TTS provider","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"provider":{"type":"string","enum":["elevenlabs","cartesia"]},"voices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"gender":{"type":["string","null"]},"languages":{"type":"array","items":{"type":"string"}},"accent":{"type":["string","null"]},"age":{"type":["string","null"]}},"required":["id","name","gender","languages","accent","age"]}}},"required":["success","provider","voices"]}}}},"400":{"description":"tts missing or not one of the TTS values"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal server error"}},"operationId":"getApiV1VoiceVoices","tags":["Voice agents"],"summary":"List the voices a TTS choice can speak with","description":"Pass tts as one of the TTS values; the voices of its provider come back. language narrows the list to voices that speak it.","parameters":[{"in":"query","name":"tts","schema":{"type":"string","enum":["elevenlabs:eleven_turbo_v2_5","elevenlabs:eleven_flash_v2_5","elevenlabs:eleven_multilingual_v2","elevenlabs:eleven_v3","cartesia:sonic-3","cartesia:sonic-2"]},"required":true},{"in":"query","name":"language","schema":{"type":"string"},"required":false}]}},"/api/v1/voice/agents":{"get":{"responses":{"200":{"description":"A page of voice agents","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"projectId":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"latestVersion":{"type":"integer"},"secretHints":{"type":"object","additionalProperties":{"type":"string"}},"archivedAt":{"type":["string","null"]},"createdById":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"numbers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"phoneNumber":{"type":"string"},"label":{"type":["string","null"]},"assignedAt":{"type":["string","null"]}},"required":["id","phoneNumber","label","assignedAt"]}}},"required":["id","organizationId","projectId","slug","name","latestVersion","secretHints","archivedAt","createdById","createdAt","updatedAt","numbers"]}},"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"}},"required":["success","agents","total","limit","offset"]}}}},"400":{"description":"Invalid query parameters"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal server error"}},"operationId":"getApiV1VoiceAgents","tags":["Voice agents"],"summary":"List voice agents","description":"List voice agents","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":"includeArchived","schema":{"type":"string","enum":["true","false"]}},{"in":"query","name":"projectId","schema":{"type":"string"}}]},"post":{"responses":{"200":{"description":"The created agent; its version 1 holds the spec","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"agent":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"projectId":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"latestVersion":{"type":"integer"},"secretHints":{"type":"object","additionalProperties":{"type":"string"}},"archivedAt":{"type":["string","null"]},"createdById":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","projectId","slug","name","latestVersion","secretHints","archivedAt","createdById","createdAt","updatedAt"]}},"required":["success","agent"]}}}},"400":{"description":"Invalid body, a tool URL that is not public, or a name with no letter or digit"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Project not found"},"409":{"description":"A live agent already has this name, or the project is being deleted"},"500":{"description":"Internal server error"}},"operationId":"postApiV1VoiceAgents","tags":["Voice agents"],"summary":"Create voice agent","description":"Creates the agent and its version 1 from the given spec. The name must not belong to another live agent of the organization. The slug is derived from the name; when another agent (a renamed or archived one) already holds it, a numbered suffix such as support_bot_2 is added. Spec rules beyond the schema: name uses only lowercase a-z, 0-9, _ and -; exactly one of system_prompt or stages; greeting is required unless opener is model_after_answer; voice_id must come from GET /api/v1/voice/voices for the spec's tts; every {{placeholder}} is a plain name (letters, digits, _); tool names are identifiers, unique ignoring case, and never end_call; a tool's auth.secret_ref is tool/<lowercased tool name>/auth and its token is set afterwards in the app, through a NovaBot approval card or over REST, never written into url or headers; a tool url is https with no placeholder in its host; stage names are unique, a stage lists only declared tools, and its transitions go to another existing stage with a tool_name used nowhere else; at most 32 tools, 10 stages and 10 transitions per stage. A minimal valid spec: {\"name\":\"support\",\"language\":\"English\",\"voice_id\":\"<id from the voice list>\",\"opener\":\"greeting_after_answer\",\"greeting\":\"Hello, how can I help?\",\"system_prompt\":\"You help callers with their orders.\"}. The full schema, these rules and an example are in the MCP resource noveum://voice-agent-spec.","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[a-z0-9_-]*$","minLength":1,"maxLength":80},"spec":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9_-]*$","minLength":1,"maxLength":80},"language":{"type":"string","enum":["English","Hindi","Hinglish","Kannada","Tamil","Telugu","Marathi","Gujarati","Bengali","Arabic"]},"stt":{"type":"string","enum":["deepgram:nova-3","deepgram:nova-2-general","deepgram:nova-2-phonecall","elevenlabs:scribe_v2_realtime"],"default":"deepgram:nova-3"},"tts":{"type":"string","enum":["elevenlabs:eleven_turbo_v2_5","elevenlabs:eleven_flash_v2_5","elevenlabs:eleven_multilingual_v2","elevenlabs:eleven_v3","cartesia:sonic-3","cartesia:sonic-2"],"default":"cartesia:sonic-3"},"llm":{"type":"string","enum":["google:gemini-2.5-flash","google:gemini-3.1-flash-lite","sarvam:sarvam-105b-conversations"],"default":"google:gemini-3.1-flash-lite"},"voice_id":{"type":"string","minLength":1,"maxLength":200},"opener":{"type":"string","enum":["agent_first","greeting_after_answer","model_after_answer"]},"greeting":{"type":["string","null"],"minLength":1,"maxLength":2000,"default":null},"max_duration_seconds":{"type":"integer","minimum":60,"maximum":1800,"default":600},"system_prompt":{"type":["string","null"],"minLength":1,"maxLength":32000,"default":null},"stages":{"type":["array","null"],"items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","minLength":1,"maxLength":64},"system_prompt":{"type":"string","minLength":1,"maxLength":32000},"tools":{"type":"array","items":{"type":"string","minLength":1},"maxItems":32,"default":[]},"transitions":{"type":"array","items":{"type":"object","properties":{"tool_name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","minLength":1,"maxLength":64},"description":{"type":"string","minLength":1,"maxLength":2000},"to":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","minLength":1,"maxLength":64}},"required":["tool_name","description","to"],"additionalProperties":false},"maxItems":10,"default":[]},"enter_instructions":{"type":["string","null"],"minLength":1,"maxLength":32000,"default":null}},"required":["name","system_prompt"],"additionalProperties":false},"minItems":1,"maxItems":10,"default":null},"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","minLength":1,"maxLength":64},"description":{"type":"string","minLength":1,"maxLength":2000},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"url":{"type":"string","minLength":1,"maxLength":2000},"parameters":{"type":"object","properties":{"type":{"type":"string","const":"object"},"properties":{"type":"object","additionalProperties":{}},"required":{"type":"array","items":{"type":"string"}}},"required":["type"],"additionalProperties":true},"preset_parameters":{"type":"object","additionalProperties":{}},"headers":{"type":"object","propertyNames":{"type":"string","pattern":"^[!#$%&'*+.^_`|~0-9A-Za-z-]+$","minLength":1,"maxLength":64},"additionalProperties":{"type":"string","maxLength":1024}},"auth":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer","api_key","basic"]},"header":{"type":"string","pattern":"^[!#$%&'*+.^_`|~0-9A-Za-z-]+$","minLength":1,"maxLength":64},"prefix":{"type":"string","maxLength":32},"secret_ref":{"type":"string","pattern":"^tool\\/[a-z0-9_]+\\/auth$"}},"required":["scheme","secret_ref"],"additionalProperties":false},"response_instruction":{"type":"string","minLength":1,"maxLength":2000},"timeout_ms":{"type":"integer","minimum":100,"maximum":30000}},"required":["name","description","method","url","parameters"],"additionalProperties":false},"maxItems":32,"default":[]},"prefetch":{"type":"array","items":{"type":"object","properties":{"tool":{"type":"string","minLength":1},"arguments":{"type":"object","additionalProperties":{}},"variables":{"type":"object","additionalProperties":{"type":"string","minLength":1}},"timeout_ms":{"type":"integer","minimum":100,"maximum":10000,"default":2500}},"required":["tool","variables"],"additionalProperties":false},"maxItems":16,"default":[]},"stt_keyterms":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":100,"default":[]}},"required":["name","language","voice_id","opener"],"additionalProperties":false}},"required":["projectId","name","spec"],"additionalProperties":false}}}}}},"/api/v1/voice/agents/{id}":{"get":{"responses":{"200":{"description":"The voice agent","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"agent":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"projectId":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"latestVersion":{"type":"integer"},"secretHints":{"type":"object","additionalProperties":{"type":"string"}},"archivedAt":{"type":["string","null"]},"createdById":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"numbers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"phoneNumber":{"type":"string"},"label":{"type":["string","null"]},"assignedAt":{"type":["string","null"]}},"required":["id","phoneNumber","label","assignedAt"]}}},"required":["id","organizationId","projectId","slug","name","latestVersion","secretHints","archivedAt","createdById","createdAt","updatedAt","numbers"]},"version":{"type":["object","null"],"properties":{"id":{"type":"string"},"version":{"type":"integer"},"createdAt":{"type":"string"},"createdById":{"type":["string","null"]},"spec":{"type":["object","null"],"additionalProperties":{}},"specFormat":{"type":"integer"},"specProblems":{"type":"array","items":{"type":"string"}}},"required":["id","version","createdAt","createdById","spec","specFormat"]},"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"createdAt":{"type":"string"},"createdById":{"type":["string","null"]}},"required":["id","version","createdAt","createdById"]}}},"required":["success","agent","version","versions"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Voice agent not found"},"500":{"description":"Internal server error"}},"operationId":"getApiV1VoiceAgentsById","tags":["Voice agents"],"summary":"Get voice agent by id","description":"Returns the agent, its latest version and the version history. When the stored spec no longer passes the spec schema, version.spec is null and version.specProblems lists why.","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]},"delete":{"responses":{"200":{"description":"The agent is archived, or already was","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true}},"required":["success"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Voice agent not found"},"409":{"description":"A number still answers with this voice agent"},"500":{"description":"Internal server error"}},"operationId":"deleteApiV1VoiceAgentsById","tags":["Voice agents"],"summary":"Archive voice agent","description":"Archives the agent: it can no longer be edited, launched or assigned to a number, and is refused with 409 while a number still answers with it. Calls already queued or on the line are not stopped and run to the end.","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/voice/agents/{id}/versions":{"post":{"responses":{"200":{"description":"The new version, with the stored tool tokens it dropped or moved","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"version":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"createdAt":{"type":"string"},"createdById":{"type":["string","null"]},"spec":{"type":"object","additionalProperties":{}},"specFormat":{"type":"integer"}},"required":["id","version","createdAt","createdById","spec","specFormat"]},"droppedSecretRefs":{"type":"array","items":{"type":"string"}},"movedSecretRefs":{"type":"object","additionalProperties":{"type":"string"}}},"required":["success","version","droppedSecretRefs","movedSecretRefs"]}}}},"400":{"description":"Invalid body or spec, a tool URL that is not public, or a placeholder an assigned number's fixed variables do not cover"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Voice agent not found"},"409":{"description":"Agent archived, stale baseVersion, name taken, or a needed tool token dropped while a number answers with the agent"},"500":{"description":"Internal server error"}},"operationId":"postApiV1VoiceAgentsByIdVersions","tags":["Voice agents"],"summary":"Create a new voice agent version","description":"Saves the spec as the next version, which answers from then on. With baseVersion, a save made since that version answers 409 (stale version). A renamed tool keeps its stored token when renamedSecretRefs maps its old secret ref to the new one and the host is unchanged; those moves come back as movedSecretRefs. Any other token whose tool was removed, renamed, lost its auth or points at another host is dropped and listed in droppedSecretRefs; while a number answers with the agent, that is refused with 409 if the token is still needed. A new name must not belong to another live agent; the slug never changes. Spec rules beyond the schema: name uses only lowercase a-z, 0-9, _ and -; exactly one of system_prompt or stages; greeting is required unless opener is model_after_answer; voice_id must come from GET /api/v1/voice/voices for the spec's tts; every {{placeholder}} is a plain name (letters, digits, _); tool names are identifiers, unique ignoring case, and never end_call; a tool's auth.secret_ref is tool/<lowercased tool name>/auth and its token is set afterwards in the app, through a NovaBot approval card or over REST, never written into url or headers; a tool url is https with no placeholder in its host; stage names are unique, a stage lists only declared tools, and its transitions go to another existing stage with a tool_name used nowhere else; at most 32 tools, 10 stages and 10 transitions per stage. A minimal valid spec: {\"name\":\"support\",\"language\":\"English\",\"voice_id\":\"<id from the voice list>\",\"opener\":\"greeting_after_answer\",\"greeting\":\"Hello, how can I help?\",\"system_prompt\":\"You help callers with their orders.\"}. The full schema, these rules and an example are in the MCP resource noveum://voice-agent-spec.","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"spec":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9_-]*$","minLength":1,"maxLength":80},"language":{"type":"string","enum":["English","Hindi","Hinglish","Kannada","Tamil","Telugu","Marathi","Gujarati","Bengali","Arabic"]},"stt":{"type":"string","enum":["deepgram:nova-3","deepgram:nova-2-general","deepgram:nova-2-phonecall","elevenlabs:scribe_v2_realtime"],"default":"deepgram:nova-3"},"tts":{"type":"string","enum":["elevenlabs:eleven_turbo_v2_5","elevenlabs:eleven_flash_v2_5","elevenlabs:eleven_multilingual_v2","elevenlabs:eleven_v3","cartesia:sonic-3","cartesia:sonic-2"],"default":"cartesia:sonic-3"},"llm":{"type":"string","enum":["google:gemini-2.5-flash","google:gemini-3.1-flash-lite","sarvam:sarvam-105b-conversations"],"default":"google:gemini-3.1-flash-lite"},"voice_id":{"type":"string","minLength":1,"maxLength":200},"opener":{"type":"string","enum":["agent_first","greeting_after_answer","model_after_answer"]},"greeting":{"type":["string","null"],"minLength":1,"maxLength":2000,"default":null},"max_duration_seconds":{"type":"integer","minimum":60,"maximum":1800,"default":600},"system_prompt":{"type":["string","null"],"minLength":1,"maxLength":32000,"default":null},"stages":{"type":["array","null"],"items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","minLength":1,"maxLength":64},"system_prompt":{"type":"string","minLength":1,"maxLength":32000},"tools":{"type":"array","items":{"type":"string","minLength":1},"maxItems":32,"default":[]},"transitions":{"type":"array","items":{"type":"object","properties":{"tool_name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","minLength":1,"maxLength":64},"description":{"type":"string","minLength":1,"maxLength":2000},"to":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","minLength":1,"maxLength":64}},"required":["tool_name","description","to"],"additionalProperties":false},"maxItems":10,"default":[]},"enter_instructions":{"type":["string","null"],"minLength":1,"maxLength":32000,"default":null}},"required":["name","system_prompt"],"additionalProperties":false},"minItems":1,"maxItems":10,"default":null},"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","minLength":1,"maxLength":64},"description":{"type":"string","minLength":1,"maxLength":2000},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"url":{"type":"string","minLength":1,"maxLength":2000},"parameters":{"type":"object","properties":{"type":{"type":"string","const":"object"},"properties":{"type":"object","additionalProperties":{}},"required":{"type":"array","items":{"type":"string"}}},"required":["type"],"additionalProperties":true},"preset_parameters":{"type":"object","additionalProperties":{}},"headers":{"type":"object","propertyNames":{"type":"string","pattern":"^[!#$%&'*+.^_`|~0-9A-Za-z-]+$","minLength":1,"maxLength":64},"additionalProperties":{"type":"string","maxLength":1024}},"auth":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer","api_key","basic"]},"header":{"type":"string","pattern":"^[!#$%&'*+.^_`|~0-9A-Za-z-]+$","minLength":1,"maxLength":64},"prefix":{"type":"string","maxLength":32},"secret_ref":{"type":"string","pattern":"^tool\\/[a-z0-9_]+\\/auth$"}},"required":["scheme","secret_ref"],"additionalProperties":false},"response_instruction":{"type":"string","minLength":1,"maxLength":2000},"timeout_ms":{"type":"integer","minimum":100,"maximum":30000}},"required":["name","description","method","url","parameters"],"additionalProperties":false},"maxItems":32,"default":[]},"prefetch":{"type":"array","items":{"type":"object","properties":{"tool":{"type":"string","minLength":1},"arguments":{"type":"object","additionalProperties":{}},"variables":{"type":"object","additionalProperties":{"type":"string","minLength":1}},"timeout_ms":{"type":"integer","minimum":100,"maximum":10000,"default":2500}},"required":["tool","variables"],"additionalProperties":false},"maxItems":16,"default":[]},"stt_keyterms":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":100,"default":[]}},"required":["name","language","voice_id","opener"],"additionalProperties":false},"name":{"type":"string","pattern":"^[a-z0-9_-]*$","minLength":1,"maxLength":80},"baseVersion":{"type":"integer","minimum":0},"renamedSecretRefs":{"type":"object","propertyNames":{"type":"string","pattern":"^tool\\/[a-z0-9_]+\\/auth$"},"additionalProperties":{"type":"string","pattern":"^tool\\/[a-z0-9_]+\\/auth$"}}},"required":["spec"],"additionalProperties":false}}}}}},"/api/v1/voice/agents/{id}/secrets":{"put":{"responses":{"200":{"description":"The hints of the secrets now stored","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"secretHints":{"type":"object","additionalProperties":{"type":"string"}}},"required":["success","secretHints"]}}}},"400":{"description":"Invalid body, or a secret ref the latest version's tools do not declare"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Voice agent or its latest version not found"},"409":{"description":"Agent archived and the body sets a value, or the stored secrets are unreadable and the body does not replace them all"},"500":{"description":"Internal server error"}},"operationId":"putApiV1VoiceAgentsByIdSecrets","tags":["Voice agents"],"summary":"Set voice agent tool secrets","description":"Merges the given secrets into the agent's encrypted store. A null value removes that secret. Keys must be secret refs declared by the latest version's tools. An archived agent only accepts removals.","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"secrets":{"type":"object","propertyNames":{"type":"string","pattern":"^tool\\/[a-z0-9_]+\\/auth$"},"additionalProperties":{"type":["string","null"],"minLength":1,"maxLength":8192}}},"required":["secrets"],"additionalProperties":false}}}}}},"/api/v1/voice/agents/{id}/restore":{"post":{"responses":{"200":{"description":"The agent is live","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true}},"required":["success"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Voice agent or its project not found"},"409":{"description":"A live agent has taken its name, or the project is being deleted"},"500":{"description":"Internal server error"}},"operationId":"postApiV1VoiceAgentsByIdRestore","tags":["Voice agents"],"summary":"Restore an archived voice agent","description":"Undoes an archive: the agent can be edited, launched and assigned to a number again. Refused with 409 when a live agent of the organization has taken its name since, or the project is being deleted. Restoring a live agent does nothing.","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/voice/agents/{id}/calls":{"post":{"responses":{"200":{"description":"The batch and one call per target","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"batchId":{"type":"string"},"calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"toNumber":{"type":"string"},"status":{"type":"string","enum":["queued","dialing","ringing","in_progress","completed","failed","cancelled"]}},"required":["id","toNumber","status"]}}},"required":["success","batchId","calls"]}}}},"400":{"description":"Invalid body, a phone number that is not E.164 or repeats, a placeholder no target covers, or a tool secret not set"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Voice agent, its latest version or its project not found"},"409":{"description":"Agent archived, the project is being deleted, or the idempotencyKey was already used with a different set of targets"},"429":{"description":"Not enough credits for the batch"},"500":{"description":"Internal server error"},"503":{"description":"The calls could not be queued; retry with the same idempotencyKey"}},"operationId":"postApiV1VoiceAgentsByIdCalls","tags":["Voice agents"],"summary":"Start outbound voice agent calls","description":"Queues one outbound call per target on the agent's latest version. Every {{placeholder}} the spec uses must be covered by each target's variables or a built-in; prefetch only runs on inbound calls. Phone numbers are E.164 with the country code. Send an idempotencyKey to make a retry safe: the same key returns the batch already created and dials nobody new.","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"targets":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string","minLength":1,"maxLength":32},"variables":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","minLength":1,"maxLength":64},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"}]},"default":{}}},"required":["phone"]},"minItems":1,"maxItems":500},"idempotencyKey":{"type":"string","minLength":1,"maxLength":200}},"required":["targets"],"additionalProperties":false}}}}},"get":{"responses":{"200":{"description":"A page of the agent's calls","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"agentVersionId":{"type":"string"},"batchId":{"type":["string","null"]},"numberId":{"type":["string","null"]},"direction":{"type":"string","enum":["outbound","inbound"]},"status":{"type":"string","enum":["queued","dialing","ringing","in_progress","completed","failed","cancelled"]},"toNumber":{"type":"string"},"fromNumber":{"type":["string","null"]},"variables":{"type":"object","additionalProperties":{}},"roomName":{"type":["string","null"]},"sipCallId":{"type":["string","null"]},"traceId":{"type":["string","null"]},"audioUuid":{"type":["string","null"]},"answeredAt":{"type":["string","null"]},"endedAt":{"type":["string","null"]},"durationSeconds":{"type":["number","null"]},"endReason":{"type":["string","null"]},"toolNames":{"type":"array","items":{"type":"string"}},"error":{"type":["string","null"]},"creditsUsed":{"type":"integer"},"attempt":{"type":"integer"},"retryOfId":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","agentId","agentVersionId","batchId","numberId","direction","status","toNumber","fromNumber","variables","roomName","sipCallId","traceId","audioUuid","answeredAt","endedAt","durationSeconds","endReason","toolNames","error","creditsUsed","attempt","retryOfId","createdAt","updatedAt"]}},"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"}},"required":["success","calls","total","limit","offset"]}}}},"400":{"description":"Invalid query parameters"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Voice agent not found"},"500":{"description":"Internal server error"}},"operationId":"getApiV1VoiceAgentsByIdCalls","tags":["Voice agents"],"summary":"List voice agent calls","description":"List voice agent calls","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":"batchId","schema":{"type":"string"}},{"in":"query","name":"numberId","schema":{"type":"string"}},{"in":"query","name":"direction","schema":{"type":"string","enum":["outbound","inbound"]}},{"in":"query","name":"status","schema":{"type":"string","enum":["queued","dialing","ringing","in_progress","completed","failed","cancelled"]}},{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/voice/agents/{id}/calls/cancel":{"post":{"responses":{"200":{"description":"The calls cancelled and how many were left alone","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"batchId":{"type":"string"},"cancelled":{"type":"array","items":{"type":"string"}},"skipped":{"type":"integer"}},"required":["success","batchId","cancelled","skipped"]}}}},"400":{"description":"Invalid body"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Voice agent not found"},"500":{"description":"Internal server error"}},"operationId":"postApiV1VoiceAgentsByIdCallsCancel","tags":["Voice agents"],"summary":"Cancel the queued calls of a batch","description":"Every call of the batch that has not been dialled yet becomes cancelled and its job is removed. Calls already on the line are not touched.","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"batchId":{"type":"string","minLength":1}},"required":["batchId"],"additionalProperties":false}}}}}},"/api/v1/voice/numbers":{"get":{"responses":{"200":{"description":"The organization's assigned numbers","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"numbers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"phoneNumber":{"type":"string"},"countryCode":{"type":"string"},"label":{"type":["string","null"]},"fixedVariables":{"type":"object","additionalProperties":{}},"assignedAt":{"type":["string","null"]},"voiceAgentId":{"type":["string","null"]},"voiceAgent":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"]}},"required":["id","phoneNumber","countryCode","label","fixedVariables","assignedAt","voiceAgentId","voiceAgent"]}}},"required":["success","numbers"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal server error"}},"operationId":"getApiV1VoiceNumbers","tags":["Voice agents"],"summary":"List phone numbers assigned to the organization for voice agents","description":"List phone numbers assigned to the organization for voice agents","parameters":[]}},"/api/v1/voice/numbers/{id}/assign":{"post":{"responses":{"200":{"description":"The number, now answering with the agent","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"number":{"type":"object","properties":{"id":{"type":"string"},"phoneNumber":{"type":"string"},"countryCode":{"type":"string"},"label":{"type":["string","null"]},"fixedVariables":{"type":"object","additionalProperties":{}},"assignedAt":{"type":["string","null"]},"voiceAgentId":{"type":["string","null"]},"voiceAgent":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"]}},"required":["id","phoneNumber","countryCode","label","fixedVariables","assignedAt","voiceAgentId","voiceAgent"]}},"required":["success","number"]}}}},"400":{"description":"Invalid body, a placeholder the fixed variables do not cover, a tool secret not set, or a wallet that cannot cover one call"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Number, voice agent, its latest version or its project not found"},"409":{"description":"The project is being deleted"},"500":{"description":"Internal server error"}},"operationId":"postApiV1VoiceNumbersByIdAssign","tags":["Voice agents"],"summary":"Point an assigned number at a voice agent","description":"Refused while the agent's latest version cannot be answered with: a placeholder the fixed variables do not cover, a tool secret not set, or a wallet that cannot cover one call of the agent's maximum length.","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1},"fixedVariables":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","minLength":1,"maxLength":64},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"}]}},"label":{"type":["string","null"],"minLength":1,"maxLength":80}},"required":["agentId"],"additionalProperties":false}}}}}},"/api/v1/voice/numbers/{id}/stop":{"post":{"responses":{"200":{"description":"The number, no longer answering with a voice agent","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"number":{"type":"object","properties":{"id":{"type":"string"},"phoneNumber":{"type":"string"},"countryCode":{"type":"string"},"label":{"type":["string","null"]},"fixedVariables":{"type":"object","additionalProperties":{}},"assignedAt":{"type":["string","null"]},"voiceAgentId":{"type":["string","null"]},"voiceAgent":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"]}},"required":["id","phoneNumber","countryCode","label","fixedVariables","assignedAt","voiceAgentId","voiceAgent"]}},"required":["success","number"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Number not found"},"500":{"description":"Internal server error"}},"operationId":"postApiV1VoiceNumbersByIdStop","tags":["Voice agents"],"summary":"Stop a number answering with its voice agent","description":"Clears the voice agent on the number. The number stays assigned to the organization.","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/voice/calls/{id}":{"get":{"responses":{"200":{"description":"The voice call with its result","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"call":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"agentVersionId":{"type":"string"},"batchId":{"type":["string","null"]},"numberId":{"type":["string","null"]},"direction":{"type":"string","enum":["outbound","inbound"]},"status":{"type":"string","enum":["queued","dialing","ringing","in_progress","completed","failed","cancelled"]},"toNumber":{"type":"string"},"fromNumber":{"type":["string","null"]},"variables":{"type":"object","additionalProperties":{}},"roomName":{"type":["string","null"]},"sipCallId":{"type":["string","null"]},"traceId":{"type":["string","null"]},"audioUuid":{"type":["string","null"]},"answeredAt":{"type":["string","null"]},"endedAt":{"type":["string","null"]},"durationSeconds":{"type":["number","null"]},"endReason":{"type":["string","null"]},"toolNames":{"type":"array","items":{"type":"string"}},"error":{"type":["string","null"]},"creditsUsed":{"type":"integer"},"attempt":{"type":"integer"},"retryOfId":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"result":{"type":["object","null"],"additionalProperties":{}}},"required":["id","organizationId","agentId","agentVersionId","batchId","numberId","direction","status","toNumber","fromNumber","variables","roomName","sipCallId","traceId","audioUuid","answeredAt","endedAt","durationSeconds","endReason","toolNames","error","creditsUsed","attempt","retryOfId","createdAt","updatedAt","result"]}},"required":["success","call"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Voice call not found"},"500":{"description":"Internal server error"}},"operationId":"getApiV1VoiceCallsById","tags":["Voice agents"],"summary":"Get voice call by id","description":"Get voice call by id","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/v1/voice/calls/{id}/cancel":{"post":{"responses":{"200":{"description":"The call is cancelled, or already was","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"call":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","const":"cancelled"}},"required":["id","status"]}},"required":["success","call"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Voice call not found"},"409":{"description":"The call is past queued, or a worker took it first"},"500":{"description":"Internal server error"}},"operationId":"postApiV1VoiceCallsByIdCancel","tags":["Voice agents"],"summary":"Cancel a queued voice call","description":"A call that has not been dialled yet becomes cancelled and its job is removed. A call already on the line answers 409.","parameters":[{"in":"path","name":"id","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":1800}},"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"}},"required":["name","description"]},"eval":{"type":"boolean","default":true},"mode":{"type":"string","enum":["voice","text"],"default":"voice"},"maxCallDurationS":{"type":"integer","minimum":60,"maximum":1800,"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":1800}},"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"}},"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":1800,"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/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},{"in":"query","name":"activityPage","schema":{"type":"integer","minimum":1,"maximum":100,"default":1},"required":false}]}},"/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/v1/otlp/v1/traces":{"post":{"responses":{"200":{"description":"Spans accepted for processing. Spans that could not be converted are counted in partialSuccess.rejectedSpans."},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid OTLP payload"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Project deletion in progress"},"413":{"description":"Payload too large or too deeply nested"},"415":{"description":"Protobuf and gRPC encodings are not supported"},"422":{"description":"Unprocessable entity"},"429":{"description":"Rate limit or span quota exceeded"},"500":{"description":"Internal server error"}},"operationId":"postApiV1OtlpV1Traces","tags":["Traces"],"summary":"Ingest OTLP/HTTP JSON traces","description":"OpenTelemetry OTLP/HTTP trace export endpoint with JSON encoding, optionally gzip compressed. Use it as the OpenRouter Broadcast OpenTelemetry Collector destination. Set x-noveum-project to choose the project (defaults to the resource service.name) and x-noveum-environment to override the environment.","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"]},"failureReason":{"type":["string","null"],"enum":["insufficient_credits"]},"startedAt":{"type":["string","null"]},"endedAt":{"type":["string","null"]}},"required":["novaPilotRunId","status","failureReason","startedAt","endedAt"]},"reportUrl":{"type":["string","null"]},"externalSetupDetected":{"type":"boolean"},"externalSetupProjectId":{"type":["string","null"]},"goal":{"type":["string","null"]},"firstValueAt":{"type":["string","null"]}},"required":["currentStep","completedAt","primaryProjectId","mapperStatus","mapperAttempts","buildType","traceProgress","recommendScorersJobId","evalJobId","evalProgress","novaPilotRunId","novaPilotProgress","reportUrl","externalSetupDetected","externalSetupProjectId","goal","firstValueAt"]}}}},"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/api-key":{"get":{"responses":{"200":{"description":"Onboarding API key","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"lastFour":{"type":"string"},"expiresAt":{"type":["string","null"]}},"required":["id","lastFour","expiresAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Caller did not create the key, which acts with its creator's permissions"},"404":{"description":"Organization, onboarding record, or API key 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":"getApiV1OnboardingApi-key","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"},"required":true}],"tags":["Onboarding"],"summary":"Get onboarding API key details (session auth)","description":"Returns the last four characters and expiry of the onboarding API key. The full key is returned only once, when it is issued."},"post":{"responses":{"200":{"description":"Newly issued onboarding API key","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"lastFour":{"type":"string"},"expiresAt":{"type":["string","null"]},"key":{"type":"string"}},"required":["id","lastFour","expiresAt","key"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Caller may not create API keys, or another member created the current onboarding key"},"404":{"description":"Organization or onboarding record not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"409":{"description":"The onboarding key changed while this one was issued","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"},"503":{"description":"The previous onboarding key could not be revoked","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"operationId":"postApiV1OnboardingApi-key","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"},"required":true}],"tags":["Onboarding"],"summary":"Issue a new onboarding API key (session auth)","description":"Issues a new onboarding API key for the caller and returns the full key once. The caller's previous onboarding key stops working."}},"/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"},"402":{"description":"The organization's credits cannot cover this bounded evaluation","content":{"application/json":{"schema":{"type":"object","properties":{"quoteId":{"type":"string","format":"uuid"},"quoteVersion":{"type":"string"},"asOf":{"type":"string","format":"date-time"},"itemCount":{"type":"number"},"datasetItemCount":{"type":"number"},"maxItems":{"type":"number"},"scorerCount":{"type":"number"},"checkCount":{"type":"number"},"evalCredits":{"type":"number"},"requiredCredits":{"type":"number"},"availableCredits":{"type":"number"},"unlimited":{"type":"boolean"},"hasEnoughCredits":{"type":"boolean"},"error":{"type":"string","const":"INSUFFICIENT_CREDITS"}},"required":["itemCount","datasetItemCount","maxItems","scorerCount","checkCount","evalCredits","requiredCredits","availableCredits","unlimited","hasEnoughCredits","error"]}}}},"403":{"description":"Caller lacks evals:write, evals:execute, datasets:read or scorers:read"},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Invalid onboarding state, eval already running, or the onboarding dataset has no valid items","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"evalJobId":{"type":"string"}},"required":["error"]}}}},"422":{"description":"A selected scorer cannot be priced for these items, such as an audio scorer on items without a recording duration","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","const":"UNPRICEABLE_SCORER_INPUT"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Dataset not found, its items could not be sampled, or the eval trigger failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"503":{"description":"The organization's credits could not be checked, so no evaluation was started","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"},"criteria":{"type":"string","minLength":1},"llmConfig":{"type":"object","properties":{"provider":{"type":"string"},"modelName":{"type":"string"},"temperature":{"type":"number"},"providerId":{"type":"string"}}}},"required":["scorerId","scorerType","scorerName"]},"minItems":1,"maxItems":200}},"required":["organizationSlug","scorerConfigs"]}}},"required":true},"parameters":[],"tags":["Onboarding"],"summary":"Create and trigger evaluation job for onboarding","description":"Creates an eval job over a bounded cohort of the most recent valid dataset items and triggers it. Idempotent on the create side: if evalJobId already exists, returns 409 with the existing ID so the client can recover."}},"/api/v1/onboarding/eval/estimate":{"post":{"responses":{"200":{"description":"Credit estimate","content":{"application/json":{"schema":{"type":"object","properties":{"quoteId":{"type":"string","format":"uuid"},"quoteVersion":{"type":"string"},"asOf":{"type":"string","format":"date-time"},"itemCount":{"type":"number"},"datasetItemCount":{"type":"number"},"maxItems":{"type":"number"},"scorerCount":{"type":"number"},"checkCount":{"type":"number"},"evalCredits":{"type":"number"},"requiredCredits":{"type":"number"},"availableCredits":{"type":"number"},"unlimited":{"type":"boolean"},"hasEnoughCredits":{"type":"boolean"}},"required":["itemCount","datasetItemCount","maxItems","scorerCount","checkCount","evalCredits","requiredCredits","availableCredits","unlimited","hasEnoughCredits"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Caller lacks evals:write, evals:execute, datasets:read or scorers:read"},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Invalid onboarding state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"422":{"description":"A selected scorer cannot be priced for these items, such as an audio scorer on items without a recording duration","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","const":"UNPRICEABLE_SCORER_INPUT"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Dataset not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"operationId":"postApiV1OnboardingEvalEstimate","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"},"criteria":{"type":"string","minLength":1},"llmConfig":{"type":"object","properties":{"provider":{"type":"string"},"modelName":{"type":"string"},"temperature":{"type":"number"},"providerId":{"type":"string"}}}},"required":["scorerId","scorerType","scorerName"]},"minItems":1,"maxItems":200}},"required":["organizationSlug","scorerConfigs"]}}},"required":true},"parameters":[],"tags":["Onboarding"],"summary":"Estimate the credits an onboarding evaluation will use","description":"Prices the bounded cohort of the most recent onboarding dataset items against the selected scorers and compares the total with the organization's available credits."}},"/api/v1/onboarding/eval/retry":{"post":{"responses":{"200":{"description":"Onboarding evaluation reset","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":"Caller lacks evals:write, evals:execute, datasets:read or scorers:read"},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"409":{"description":"No onboarding evaluation to reset, or its latest run is in flight or produced a valid result","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"postApiV1OnboardingEvalRetry","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"organizationSlug":{"type":"string","minLength":1}},"required":["organizationSlug"]}}},"required":true},"parameters":[],"tags":["Onboarding"],"summary":"Reset a failed onboarding evaluation so it can be run again","description":"Clears the onboarding evaluation when its latest run failed or was cancelled, or completed without a single validly evaluated conversation, returning the user to scorer selection. Also accepts a journey already moved to the NOVAPILOT step while it has no first result, and moves it back to EVAL. Refuses while the run is queued or running, or once it produced a valid result."}},"/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":"Caller lacks the write permissions for the demo project, traces, dataset, ETL job, eval job and NovaPilot run"},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"409":{"description":"The durable demo project id is being deleted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"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/onboarding/goal":{"post":{"responses":{"200":{"description":"Goal saved","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"goal":{"type":"string","enum":["connect_agent","test_endpoint"]}},"required":["success","goal"]}}}},"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":"postApiV1OnboardingGoal","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"organizationSlug":{"type":"string","minLength":1},"goal":{"type":"string","enum":["connect_agent","test_endpoint"]}},"required":["organizationSlug","goal"]}}},"required":true},"parameters":[],"tags":["Onboarding"],"summary":"Choose the onboarding goal (session auth)","description":"Stores what the user wants to do first. It never creates a project or starts work."}},"/api/v1/onboarding/journey":{"get":{"responses":{"200":{"description":"Journey payload","content":{"application/json":{"schema":{"type":"object","properties":{"goal":{"type":["string","null"],"enum":["connect_agent","test_endpoint"]},"stage":{"type":"string","enum":["connect","verify","first_result","done"]},"resumeState":{"type":"string","enum":["fresh","demo_only","awaiting_traces","endpoint_configured","traces_without_mapper","mapper_without_items","items_without_evaluation","evaluation_running","evaluation_failed","evaluation_without_result","test_running","result_ready"]},"currentStep":{"type":"string"},"buildType":{"type":["string","null"]},"primaryProjectId":{"type":["string","null"]},"agentProjectId":{"type":["string","null"]},"primaryDatasetSlug":{"type":["string","null"]},"externalSetupDetected":{"type":"boolean"},"externalSetupProjectId":{"type":["string","null"]},"firstValue":{"type":["object","null"],"properties":{"at":{"type":"string"},"source":{"type":["string","null"]},"ref":{"type":["string","null"]}},"required":["at","source","ref"]},"facts":{"type":"object","properties":{"ownTraceCount":{"type":"integer","minimum":0},"demoTraceCount":{"type":"integer","minimum":0},"datasetItemCount":{"type":"integer","minimum":0},"endpointCount":{"type":"integer","minimum":0},"evalRunStatus":{"type":["string","null"],"enum":["queued","processing","completed","failed"]},"batchRunId":{"type":["string","null"]},"batchRunStatus":{"type":["string","null"],"enum":["active","completed","failed"]},"canRestartPreparation":{"type":"boolean"}},"required":["ownTraceCount","demoTraceCount","datasetItemCount","endpointCount","evalRunStatus","batchRunId","batchRunStatus","canRestartPreparation"]}},"required":["goal","stage","resumeState","currentStep","buildType","primaryProjectId","agentProjectId","primaryDatasetSlug","externalSetupDetected","externalSetupProjectId","firstValue","facts"]}}}},"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":"getApiV1OnboardingJourney","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"},"required":true}],"tags":["Onboarding"],"summary":"Get the onboarding journey (session auth)","description":"Returns the customer-facing stage and the resume state, both derived from verified platform facts rather than clicks."}},"/api/v1/onboarding/preparation/restart":{"post":{"responses":{"200":{"description":"Preparation queued","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":"Caller lacks etl:write or datasets:write"},"404":{"description":"Organization or onboarding record not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Preparation is running, done, or cannot start yet","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"422":{"description":"Unprocessable entity"},"500":{"description":"The preparation job could not be queued","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"operationId":"postApiV1OnboardingPreparationRestart","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"organizationSlug":{"type":"string"}},"required":["organizationSlug"]}}},"required":true},"parameters":[],"tags":["Onboarding"],"summary":"Restart evaluation data preparation (session auth)","description":"Starts preparing evaluation examples again when enough conversations arrived but preparation never started, failed, or stalled. Concurrent calls start one preparation."}},"/api/v1/onboarding/readiness":{"get":{"responses":{"200":{"description":"Readiness payload","content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":["string","null"]},"traceCount":{"type":"integer","minimum":0},"sufficiencyThreshold":{"type":"integer","minimum":1},"evidence":{"type":["object","null"],"properties":{"traceId":{"type":"string"},"name":{"type":"string"},"environment":{"type":"string"},"spanCount":{"type":"integer","minimum":0},"receivedAt":{"type":"string"}},"required":["traceId","name","environment","spanCount","receivedAt"]},"checks":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["traceStructure","conversationContext","speechCost","customerIdentity"]},"state":{"type":"string","enum":["ready","partial","missing","not_applicable"]},"blocksEvaluation":{"type":"boolean"},"missingMeasures":{"type":"array","items":{"type":"string","enum":["stt","tts"]}}},"required":["key","state","blocksEvaluation","missingMeasures"]}}},"required":["projectId","traceCount","sufficiencyThreshold","evidence","checks"]}}}},"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":"getApiV1OnboardingReadiness","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"},"required":true},{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":false}],"tags":["Onboarding"],"summary":"Check telemetry readiness for an agent (session auth)","description":"Reads the latest received conversation for the project and reports which evaluation inputs and optional measures are present. Read-only."}},"/api/v1/onboarding/readiness/count":{"get":{"responses":{"200":{"description":"Trace count payload","content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":["string","null"]},"traceCount":{"type":"integer","minimum":0}},"required":["projectId","traceCount"]}}}},"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":"getApiV1OnboardingReadinessCount","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"},"required":true},{"in":"query","name":"projectId","schema":{"type":"string","minLength":1},"required":false}],"tags":["Onboarding"],"summary":"Count received conversations for an agent (session auth)","description":"Returns only the trace count for the project the readiness check reads, so the Verify step can keep the count current without reading the latest conversation again. Read-only."}},"/api/v1/onboarding/assistant":{"get":{"responses":{"200":{"description":"Assistant access payload","content":{"application/json":{"schema":{"type":"object","properties":{"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["oauth","apiKey"]},"clientName":{"type":"string"},"authorizedAt":{"type":"string"},"lastUsedAt":{"type":["string","null"]},"lastReadAt":{"type":["string","null"]},"lastToolName":{"type":["string","null"]}},"required":["id","kind","clientName","authorizedAt","lastUsedAt","lastReadAt","lastToolName"]}},"verifiedRead":{"type":["object","null"],"properties":{"at":{"type":"string"},"clientName":{"type":"string"},"toolName":{"type":["string","null"]}},"required":["at","clientName","toolName"]}},"required":["connections","verifiedRead"]}}}},"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":"getApiV1OnboardingAssistant","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"},"required":true}],"tags":["Onboarding"],"summary":"Assistant access for the current user (session auth)","description":"Lists the caller's MCP connections to this organization. Authorization and a verified read are separate facts: a read is only verified when the assistant itself called a read tool."}},"/api/v1/onboarding/eval/result":{"get":{"responses":{"200":{"description":"First result payload","content":{"application/json":{"schema":{"type":"object","properties":{"evalJobId":{"type":["string","null"]},"evalJobRunId":{"type":["string","null"]},"status":{"type":["string","null"],"enum":["queued","processing","completed","failed"]},"totalItems":{"type":["number","null"]},"summary":{"type":["object","null"],"properties":{"evaluatedConversations":{"type":"number"},"failedConversations":{"type":"number"},"erroredConversations":{"type":"number"},"erroredChecks":{"type":"number"},"inspect":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string"},"traceId":{"type":["string","null"]},"kind":{"type":"string","enum":["failed","error"]},"scorerName":{"type":"string"},"detail":{"type":["string","null"]}},"required":["itemId","traceId","kind","scorerName","detail"]}}},"required":["evaluatedConversations","failedConversations","erroredConversations","erroredChecks","inspect"]},"firstValueAt":{"type":["string","null"]},"diagnosis":{"type":"object","properties":{"runId":{"type":["string","null"]},"status":{"type":["string","null"],"enum":["queued","processing","completed","failed"]},"failureReason":{"type":["string","null"],"enum":["insufficient_credits"]},"canRetry":{"type":"boolean"},"reportUrl":{"type":["string","null"]},"estimate":{"type":["object","null"],"properties":{"itemCount":{"type":"number"},"credits":{"type":"number"},"isSupported":{"type":"boolean"},"availableCredits":{"type":"number"},"unlimited":{"type":"boolean"},"hasEnoughCredits":{"type":"boolean"}},"required":["itemCount","credits","isSupported","availableCredits","unlimited","hasEnoughCredits"]}},"required":["runId","status","failureReason","canRetry","reportUrl","estimate"]}},"required":["evalJobId","evalJobRunId","status","totalItems","summary","firstValueAt","diagnosis"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Caller lacks evals:read or scorers:read"},"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":"getApiV1OnboardingEvalResult","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"},"required":true}],"tags":["Onboarding"],"summary":"First evaluation result (session auth)","description":"Summarizes the onboarding evaluation: valid evaluated conversations, judged failures and evaluator errors stay separate. Records the first-value milestone once a valid result exists."}},"/api/v1/onboarding/diagnosis":{"post":{"responses":{"200":{"description":"Diagnosis queued","content":{"application/json":{"schema":{"type":"object","properties":{"novaPilotRunId":{"type":"string"},"estimatedCredits":{"type":"number"}},"required":["novaPilotRunId","estimatedCredits"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"402":{"description":"The organization's credits cannot cover the diagnosis","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","const":"INSUFFICIENT_CREDITS"},"requiredCredits":{"type":"number"},"availableCredits":{"type":"number"}},"required":["error","requiredCredits","availableCredits"]}}}},"403":{"description":"Caller lacks novapilot:write, or NovaPilot is not enabled for the organization"},"404":{"description":"Not found"},"409":{"description":"No valid first result yet, or a diagnosis already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"novaPilotRunId":{"type":"string"}},"required":["error"]}}}},"422":{"description":"Unprocessable entity"},"500":{"description":"The diagnosis could not be queued","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"operationId":"postApiV1OnboardingDiagnosis","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"organizationSlug":{"type":"string","minLength":1}},"required":["organizationSlug"]}}},"required":true},"parameters":[],"tags":["Onboarding"],"summary":"Start the optional diagnosis (session auth)","description":"Runs NovaPilot over the conversations the onboarding evaluation scored, only when the user asks for it, after a valid first result. Replaces a diagnosis that failed, went missing or never left the queue. Credits are checked on the server, and concurrent calls start one report."}},"/api/v1/onboarding/test/estimate":{"post":{"responses":{"200":{"description":"Estimate","content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["voice","text"]},"direction":{"type":"string","enum":["outbound","inbound"]},"perCallCredits":{"type":"number"},"credits":{"type":"number"},"availableCredits":{"type":"number"},"unlimited":{"type":"boolean"},"hasEnoughCredits":{"type":"boolean"},"providerChargesSeparate":{"type":"boolean"}},"required":["mode","direction","perCallCredits","credits","availableCredits","unlimited","hasEnoughCredits","providerChargesSeparate"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Caller lacks synthetic:read"},"404":{"description":"Organization or endpoint 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":"postApiV1OnboardingTestEstimate","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"organizationSlug":{"type":"string","minLength":1},"endpointId":{"type":"string","minLength":1},"runCount":{"type":"integer","minimum":1,"maximum":20},"maxCallDurationS":{"type":"integer","minimum":60,"maximum":600}},"required":["organizationSlug","endpointId","runCount","maxCallDurationS"]}}},"required":true},"parameters":[],"tags":["Onboarding"],"summary":"Estimate a first synthetic test (session auth)","description":"Prices a small reviewed NovaSynth test on the server with the same per-call reservation the test start checks, including the pickup wait for inbound calls, which cost nothing while they wait to be dialled. Telephony or provider charges Noveum cannot price are reported as separate."}},"/api/v1/onboarding/test/start":{"post":{"responses":{"200":{"description":"Started, or the batch this requestKey started","content":{"application/json":{"schema":{"type":"object","properties":{"batchRunId":{"type":"string"}},"required":["batchRunId"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Caller lacks synthetic:write or synthetic:execute"},"404":{"description":"Organization, onboarding record or endpoint not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Another test is linked and still counts, or a start is in progress","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["TEST_ALREADY_LINKED","TEST_START_IN_PROGRESS"]},"batchRunId":{"type":["string","null"]}},"required":["error","code"]}}}},"422":{"description":"Unprocessable entity"},"429":{"description":"Not enough credits for the test"},"500":{"description":"Internal server error"}},"operationId":"postApiV1OnboardingTestStart","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"organizationSlug":{"type":"string","minLength":1},"projectId":{"type":"string","minLength":1},"requestKey":{"type":"string","minLength":8,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":200},"endpointId":{"type":"string","minLength":1},"pairs":{"type":"array","items":{"type":"object","properties":{"personaId":{"type":"string","minLength":1},"scenarioId":{"type":"string","minLength":1}},"required":["personaId","scenarioId"]},"minItems":1,"maxItems":20},"scorerIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":50},"concurrencyLimit":{"type":"integer","minimum":1,"maximum":20},"maxCallDurationS":{"type":"integer","minimum":60,"maximum":600}},"required":["organizationSlug","projectId","requestKey","name","endpointId","pairs","concurrencyLimit","maxCallDurationS"]}}},"required":true},"parameters":[],"tags":["Onboarding"],"summary":"Start the reviewed onboarding test (session auth)","description":"Creates the NovaSynth batch run and links it to onboarding in one request. Repeating a request with the same requestKey returns the batch it created. Any other requestKey is refused with TEST_START_IN_PROGRESS while a start has not linked its batch yet, for up to two minutes. A new test replaces the linked one only while no first result exists and the linked test finished with nothing left to score and no valid evaluation."}},"/api/v1/onboarding/test/result":{"get":{"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","properties":{"batchRunId":{"type":["string","null"]},"status":{"type":["string","null"]},"projectId":{"type":["string","null"]},"phase":{"type":["string","null"],"enum":["running","scoring","finished"]},"canStartNewTest":{"type":"boolean"},"summary":{"type":["object","null"],"properties":{"plannedCalls":{"type":"number"},"completedCalls":{"type":"number"},"failedCalls":{"type":"number"},"validEvaluations":{"type":"number"},"passedEvaluations":{"type":"number"},"scoringErrors":{"type":"number"},"pendingScoring":{"type":"number"},"inspect":{"type":"array","items":{"type":"object","properties":{"runId":{"type":"string"},"traceId":{"type":["string","null"]},"kind":{"type":"string","enum":["failed","call_error","scoring_error"]},"personaName":{"type":"string"},"scenarioName":{"type":"string"},"detail":{"type":["string","null"]}},"required":["runId","traceId","kind","personaName","scenarioName","detail"]}}},"required":["plannedCalls","completedCalls","failedCalls","validEvaluations","passedEvaluations","scoringErrors","pendingScoring","inspect"]},"firstValueAt":{"type":["string","null"]}},"required":["batchRunId","status","projectId","phase","canStartNewTest","summary","firstValueAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Caller lacks synthetic:read"},"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":"getApiV1OnboardingTestResult","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"},"required":true}],"tags":["Onboarding"],"summary":"First synthetic test result (session auth)","description":"Separates calls completed from scoring completed, reports whether the test is running, scoring or finished, lists conversations to inspect, and records the first-value milestone once the test produced a valid evaluation. Synthetic results never count as production customers or cohorts."}},"/api/v1/onboarding/agents":{"get":{"responses":{"200":{"description":"Agents","content":{"application/json":{"schema":{"type":"object","properties":{"agents":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"name":{"type":"string"},"traceCount":{"type":"number"},"endpointCount":{"type":"number"},"environment":{"type":["string","null"]},"readiness":{"type":"string","enum":["ready","partial","blocked","no_data"]},"gaps":{"type":"array","items":{"type":"string"}}},"required":["projectId","name","traceCount","endpointCount","environment","readiness","gaps"]}}},"required":["agents"]}}}},"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":"getApiV1OnboardingAgents","parameters":[{"in":"query","name":"organizationSlug","schema":{"type":"string"},"required":true}],"tags":["Onboarding"],"summary":"Agent integration readiness (session auth)","description":"Lists the organization's agents with their telemetry, test connections and field-based readiness from the latest received conversation. Read-only."}},"/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/oauth/grants":{"get":{"responses":{"200":{"description":"Connected apps","content":{"application/json":{"schema":{"type":"object","properties":{"grants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientName":{"type":"string"},"clientLogoUrl":{"type":["string","null"]},"organizationName":{"type":"string"},"activeOrganizationId":{"type":"string"},"approvedOrganizationIds":{"type":"array","items":{"type":"string"}},"organizationSlug":{"type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"lastUsedAt":{"type":["string","null"]}},"required":["id","clientName","clientLogoUrl","organizationName","activeOrganizationId","approvedOrganizationIds","organizationSlug","scopes","createdAt","lastUsedAt"]}}},"required":["grants"]}}}},"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":"getApiOauthGrants","tags":["Connected Apps"],"summary":"List the apps connected to your account","description":"Lists the OAuth apps, such as MCP clients, you have authorized and not revoked. In the app it covers all your organizations; NovaBot sees only the current organization.","parameters":[]}},"/api/oauth/grants/{id}/organizations":{"post":{"responses":{},"operationId":"postApiOauthGrantsByIdOrganizations","parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"activeOrganizationId":{"type":"string","minLength":1},"organizationIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["activeOrganizationId","organizationIds"]}}}}}},"/api/oauth/grants/{id}/revoke":{"post":{"responses":{"200":{"description":"Grant revoked","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":"No grant with this ID belongs to you","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":"postApiOauthGrantsByIdRevoke","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["Connected Apps"],"summary":"Disconnect an app from your account","description":"Revokes one of your OAuth grants and every access and refresh token issued under it."}},"/api/waitlist":{"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"Added","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":"postApiWaitlist","tags":["Waitlist"],"summary":"Add email to waitlist","description":"Add email to waitlist","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"name":{"type":"string"},"notes":{"type":"string"}},"required":["email"]}}},"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":"Email belongs to someone else"},"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 the caller's own waitlist email is approved (session auth; platform admins may check any email)","description":"Check if the caller's own waitlist email is approved (session auth; platform admins may check any email)"}},"/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":"No valid session"},"403":{"description":"Caller is not a platform admin"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Server error"}},"operationId":"postApiWaitlistApprove","tags":["Waitlist"],"summary":"Approve a waitlist user (platform admin session)","description":"Approve a waitlist user (platform admin session)","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"}},"required":["email"]}}},"required":true}}},"/api/{organisationSlug}/api-keys":{"get":{"responses":{"200":{"description":"API keys retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"apiKeys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"key":{"type":"string"},"expiresAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"image":{"type":["string","null"]}},"required":["id","name","image"]}},"required":["id","title","key","expiresAt","createdAt","user"]}}},"required":["apiKeys"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request"},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden - Not a member of this organization","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Internal server error"}},"operationId":"getApiByOrganisationSlugApi-keys","tags":["API Keys"],"summary":"List API keys","description":"Lists the organization's API keys with only their last four characters. Organization admins see every key, other members only their own.","parameters":[{"schema":{"type":"string"},"in":"path","name":"organisationSlug","required":true}]},"post":{"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"201":{"description":"API key created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"key":{"type":"string"},"expiresAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}}},"required":["id","title","key","expiresAt","createdAt","permissions"]}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Forbidden - Not a member of this organization","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Unprocessable entity"},"500":{"description":"Failed to create API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"operationId":"postApiByOrganisationSlugApi-keys","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":100},"expiresAt":{"type":"string","format":"date-time"},"permissions":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["title"]}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"organisationSlug","required":true}],"tags":["API Keys"],"summary":"Create an API key","description":"Creates an API key that acts with your permissions in this organization. The key is returned only once."},"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":"patchApiByOrganisationSlugApi-keys","parameters":[{"in":"query","name":"id","schema":{"type":"string"},"required":true},{"schema":{"type":"string"},"in":"path","name":"organisationSlug","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":100},"permissions":{"type":"array","items":{"type":"string"},"minItems":1}}}}}},"tags":["API Keys"],"summary":"Update an API key","description":"Rename an API key or change what it may do. Users can only edit their own keys unless they are organization admins."},"delete":{"responses":{"200":{"description":"API key deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"API key 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","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"operationId":"deleteApiByOrganisationSlugApi-keys","parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string","description":"The ID of the API key to delete"}},{"schema":{"type":"string"},"in":"path","name":"organisationSlug","required":true}],"tags":["API Keys"],"summary":"Revoke an API key","description":"Revokes an API key. Members can revoke only their own keys, organization admins any key."}},"/api/{organisationSlug}/novabot-secrets/reveal":{"post":{"responses":{},"operationId":"postApiByOrganisationSlugNovabot-secretsReveal","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"revealId":{"type":"string","pattern":"^[A-Za-z0-9_-]{32}$"}},"required":["revealId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"organisationSlug","required":true}]}},"/api/{organisationSlug}/novabot-secrets/inputs/fields":{"post":{"responses":{},"operationId":"postApiByOrganisationSlugNovabot-secretsInputsFields","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"string","minLength":1,"maxLength":100},"pathParams":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":500},{"type":"number"}]},"default":{}},"body":{}},"required":["operation"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"organisationSlug","required":true}]}},"/api/{organisationSlug}/novabot-secrets/inputs":{"put":{"responses":{},"operationId":"putApiByOrganisationSlugNovabot-secretsInputs","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"actionId":{"type":"string","minLength":1,"maxLength":200},"call":{"type":"object","properties":{"operation":{"type":"string","minLength":1,"maxLength":100},"pathParams":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":500},{"type":"number"}]},"default":{}},"body":{}},"required":["operation"],"additionalProperties":false},"values":{"type":"object","propertyNames":{"type":"string","maxLength":128},"additionalProperties":{"type":"string","minLength":1,"maxLength":8192}}},"required":["actionId","call","values"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"organisationSlug","required":true}]}},"/api/{organisationSlug}/novabot-uploads":{"get":{"responses":{},"operationId":"getApiByOrganisationSlugNovabot-uploads","parameters":[{"in":"query","name":"before","schema":{"type":"string","format":"uuid"}},{"in":"query","name":"kind","schema":{"type":"string","enum":["image","pdf","spreadsheet","document","text","video"]}},{"in":"query","name":"search","schema":{"type":"string","maxLength":200}},{"schema":{"type":"string"},"in":"path","name":"organisationSlug","required":true}]},"post":{"responses":{},"operationId":"postApiByOrganisationSlugNovabot-uploads","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":1000},"size":{"type":"integer","exclusiveMinimum":0}},"required":["name","size"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"organisationSlug","required":true}]}},"/api/{organisationSlug}/novabot-uploads/lookup":{"post":{"responses":{},"operationId":"postApiByOrganisationSlugNovabot-uploadsLookup","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":50}},"required":["ids"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"organisationSlug","required":true}]}},"/api/{organisationSlug}/novabot-uploads/{uploadId}/content":{"get":{"responses":{},"operationId":"getApiByOrganisationSlugNovabot-uploadsByUploadIdContent","parameters":[{"in":"query","name":"download","schema":{"type":"string","enum":["1"]}},{"schema":{"type":"string"},"in":"path","name":"organisationSlug","required":true},{"schema":{"type":"string"},"in":"path","name":"uploadId","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"}}}}