{"openapi":"3.1.0","info":{"title":"Clerk Chat API","version":"0.0.1"},"paths":{"/api/v1/health":{"get":{"tags":["system"],"operationId":"system.health","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"string","enum":["OK"]}}}}}}},"/api/v1/private-data":{"get":{"tags":["private"],"operationId":"private.privateData","parameters":[],"security":[],"responses":{"200":{"description":"PrivateData","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrivateDataEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/onboarding/status":{"get":{"tags":["onboarding"],"operationId":"onboarding.status","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["incomplete"]}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["not_required"]},"organizationId":{"type":"string"}},"required":["status","organizationId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["completed"]},"flowId":{"type":"string"},"flowVersion":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"organizationId":{"type":"string"},"completedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"agentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationSlug":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","flowId","flowVersion","organizationId","completedAt"],"additionalProperties":false}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/onboarding/complete":{"post":{"tags":["onboarding"],"operationId":"onboarding.complete","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["incomplete"]}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["not_required"]},"organizationId":{"type":"string"}},"required":["status","organizationId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["completed"]},"flowId":{"type":"string"},"flowVersion":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"organizationId":{"type":"string"},"completedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"agentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationSlug":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","flowId","flowVersion","organizationId","completedAt"],"additionalProperties":false}]}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"flowId":{"type":"string","enum":["initial-workspace"]},"flowVersion":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"answers":{"type":"object","properties":{"referral":{"type":"string","enum":["Google search","X (formerly Twitter)","LinkedIn","YouTube","Instagram","TikTok","A friend or colleague","AI recommendation","Other"]},"companyType":{"anyOf":[{"type":"object","properties":{"value":{"type":"string","enum":["B2B SaaS","Service Agencies","Fintech & Payments","Insurance","Law Firms","Marketplaces","Real Estate","Clinics","Industrial Equipment & Manufacturing","Ecommerce & DTC","Consumer Electronics & Appliances","Hotels & Resorts","Travel & Tour Operators","Accounting & Corporate Secretarial","Immigration Consultancies","Online Education","Fitness Chains & Franchises","Restaurants"]}},"required":["value"],"additionalProperties":false},{"type":"object","properties":{"value":{"type":"string","enum":["Other"]},"detail":{"type":"string"}},"required":["value","detail"],"additionalProperties":false}]},"companySize":{"type":"string","enum":["Startup (1-9)","Small business (10-49)","Mid-market (50-499)","Enterprise (500+)"]},"trainingSource":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["website"]},"websiteUrl":{"type":"string","minLength":1,"maxLength":2000}},"required":["type","websiteUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"title":{"type":"string","minLength":1,"maxLength":120},"body":{"type":"string","minLength":1,"maxLength":8000}},"required":["type","title","body"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["qa"]},"title":{"type":"string","minLength":1,"maxLength":120},"question":{"type":"string","minLength":1,"maxLength":1000},"answer":{"type":"string","minLength":1,"maxLength":1000}},"required":["type","title","question","answer"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"title":{"type":"string","minLength":1,"maxLength":120},"fileName":{"type":"string","minLength":1,"maxLength":255},"fileKind":{"type":"string","enum":["pdf","txt","md","csv","tsv","json","xls","xlsx"]},"fileContentType":{"type":"string","minLength":1,"maxLength":255},"fileSizeBytes":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"fileBase64":{"type":"string","minLength":1,"maxLength":55924312}},"required":["type","title","fileName","fileKind","fileContentType","fileSizeBytes","fileBase64"],"additionalProperties":false}]},"personality":{"type":"object","properties":{"role":{"type":"string","enum":["Customer support","Sales agent","Shopping assistant"]},"instructions":{"type":"string","maxLength":1024}},"required":["role","instructions"],"additionalProperties":false}},"required":["referral","companyType","companySize","trainingSource","personality"],"additionalProperties":false}},"required":["flowId","flowVersion","answers"],"additionalProperties":false}}},"required":true}}},"/api/v1/billing":{"get":{"tags":["billing"],"operationId":"billing.overview","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/BillingStatusEncoded"},"removeBranding":{"$ref":"#/components/schemas/RemoveBrandingStatusEncoded"},"subscriptionLifecycle":{"$ref":"#/components/schemas/BillingSubscriptionLifecycleEncoded"},"creditPurchases":{"$ref":"#/components/schemas/BillingCreditPurchaseListEncoded"},"autoCharge":{"$ref":"#/components/schemas/BillingCreditAutoChargeSettingsEncoded"}},"required":["status","removeBranding","subscriptionLifecycle","creditPurchases","autoCharge"],"additionalProperties":false}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/billing/credits-status":{"get":{"tags":["billing"],"operationId":"billing.creditsStatus","parameters":[],"security":[],"responses":{"200":{"description":"BillingCreditsStatus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCreditsStatusEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/billing/status":{"get":{"tags":["billing"],"operationId":"billing.status","parameters":[],"security":[],"responses":{"200":{"description":"BillingStatus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingStatusEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/billing/remove-branding":{"get":{"tags":["billing"],"operationId":"billing.removeBranding","parameters":[],"security":[],"responses":{"200":{"description":"RemoveBrandingStatus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveBrandingStatusEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}},"post":{"tags":["billing"],"operationId":"billing.createRemoveBranding","parameters":[],"security":[],"responses":{"200":{"description":"RemoveBrandingStatus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveBrandingStatusEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"billingCycle":{"type":"string","enum":["monthly","yearly"]}},"required":["billingCycle"],"additionalProperties":false}}},"required":true}},"delete":{"tags":["billing"],"operationId":"billing.deleteRemoveBranding","parameters":[],"security":[],"responses":{"200":{"description":"RemoveBrandingStatus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveBrandingStatusEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/billing/subscription":{"get":{"tags":["billing"],"operationId":"billing.subscriptionLifecycle","parameters":[],"security":[],"responses":{"200":{"description":"BillingSubscriptionLifecycle","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSubscriptionLifecycleEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/billing/subscription/cancel":{"post":{"tags":["billing"],"operationId":"billing.cancelSubscription","parameters":[],"security":[],"responses":{"200":{"description":"CancelBillingSubscriptionResult","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelBillingSubscriptionResultEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","enum":["too_expensive","not_using_enough","missing_features","technical_issues","switching_product","other"]},"feedback":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["reason"],"additionalProperties":false}}},"required":true}}},"/api/v1/billing/subscription/restore":{"post":{"tags":["billing"],"operationId":"billing.restoreSubscription","parameters":[],"security":[],"responses":{"200":{"description":"BillingSubscriptionLifecycle","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSubscriptionLifecycleEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/billing/subscription/downgrade":{"post":{"tags":["billing"],"operationId":"billing.scheduleSubscriptionDowngrade","parameters":[],"security":[],"responses":{"200":{"description":"BillingSubscriptionLifecycle","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSubscriptionLifecycleEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"targetPlan":{"type":"string","enum":["hobby","standard","pro"]}},"required":["targetPlan"],"additionalProperties":false}}},"required":true}}},"/api/v1/billing/credit-purchases":{"get":{"tags":["billing"],"operationId":"billing.listCreditPurchases","parameters":[],"security":[],"responses":{"200":{"description":"BillingCreditPurchaseList","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCreditPurchaseListEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}},"post":{"tags":["billing"],"operationId":"billing.createCreditPurchase","parameters":[],"security":[],"responses":{"200":{"description":"BillingCreditPurchase","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCreditPurchaseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amountDollars":{"type":"integer","minimum":40,"maximum":1000}},"required":["amountDollars"],"additionalProperties":false}}},"required":true}}},"/api/v1/billing/invoices":{"get":{"tags":["billing"],"operationId":"billing.listInvoices","parameters":[{"name":"cursor","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[],"responses":{"200":{"description":"BillingInvoiceList","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingInvoiceListEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/billing/auto-charge":{"get":{"tags":["billing"],"operationId":"billing.getAutoCharge","parameters":[],"security":[],"responses":{"200":{"description":"BillingCreditAutoChargeSettings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCreditAutoChargeSettingsEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}},"patch":{"tags":["billing"],"operationId":"billing.updateAutoCharge","parameters":[],"security":[],"responses":{"200":{"description":"BillingCreditAutoChargeSettings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCreditAutoChargeSettingsEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean","enum":[false]}},"required":["enabled"],"additionalProperties":false},{"type":"object","properties":{"enabled":{"type":"boolean","enum":[true]},"amountDollars":{"type":"integer","minimum":40,"maximum":1000},"spendingCapDollars":{"type":"integer","minimum":40,"maximum":10000}},"required":["enabled","amountDollars","spendingCapDollars"],"additionalProperties":false}]}}},"required":true}}},"/api/v1/agents/{agentId}/conversations":{"get":{"tags":["conversations"],"operationId":"conversations.listByAgent","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true},{"name":"channel","in":"query","schema":{"anyOf":[{"type":"string","enum":["manual","playground","help_page","widget","telegram","slack","messenger","whatsapp","instagram"]},{"type":"null"}]},"required":false},{"name":"status","in":"query","schema":{"anyOf":[{"type":"string","enum":["open","closed"]},{"type":"null"}]},"required":false},{"name":"priority","in":"query","schema":{"anyOf":[{"type":"string","enum":["low","normal","high"]},{"type":"null"}]},"required":false},{"name":"category","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"assignee","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"takeover","in":"query","schema":{"anyOf":[{"type":"string","enum":["human"]},{"type":"null"}]},"required":false},{"name":"search","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"cursor","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[],"responses":{"200":{"description":"ConversationListResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationListResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"410":{"description":"Gone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoneEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/conversations/notification-settings":{"get":{"tags":["conversations"],"operationId":"conversations.getNotificationSettings","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"ConversationNotificationSettingsResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationNotificationSettingsResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"410":{"description":"Gone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoneEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}},"put":{"tags":["conversations"],"operationId":"conversations.updateNotificationSettings","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"ConversationNotificationSettingsResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationNotificationSettingsResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"410":{"description":"Gone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoneEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"emailEnabled":{"type":"boolean"},"staleUnreadDays":{"type":"integer","minimum":1,"maximum":30},"recipientRoles":{"type":"array","items":{"type":"string","enum":["owner","admin","manager","member"]}},"recipientUserIds":{"type":"array","items":{"type":"string"}},"categories":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"minItems":1,"maxItems":20}},"required":["emailEnabled","staleUnreadDays","recipientRoles","recipientUserIds","categories"],"additionalProperties":false}}},"required":true}}},"/api/v1/conversations/unread-summary":{"get":{"tags":["conversations"],"operationId":"conversations.workspaceUnreadSummary","parameters":[],"security":[],"responses":{"200":{"description":"WorkspaceConversationUnreadSummary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceConversationUnreadSummaryEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"410":{"description":"Gone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoneEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/conversations/unread-summary":{"get":{"tags":["conversations"],"operationId":"conversations.unreadSummary","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"ConversationUnreadSummary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationUnreadSummaryEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"410":{"description":"Gone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoneEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/conversations/assignment-settings":{"get":{"tags":["conversations"],"operationId":"conversations.getAssignmentSettings","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"AssignmentSettingsResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignmentSettingsResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"410":{"description":"Gone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoneEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}},"put":{"tags":["conversations"],"operationId":"conversations.updateAssignmentSettings","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"AssignmentSettingsResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignmentSettingsResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"410":{"description":"Gone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoneEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0},"mode":{"type":"string","enum":["manual","round_robin"]},"participantMemberIds":{"type":"array","items":{"type":"string"}}},"required":["expectedVersion","mode","participantMemberIds"],"additionalProperties":false}}},"required":true}}},"/api/v1/conversations/{conversationId}":{"get":{"tags":["conversations"],"operationId":"conversations.get","parameters":[{"name":"conversationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"ConversationDetailResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationDetailResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"410":{"description":"Gone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoneEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/conversations/{conversationId}/replies":{"post":{"tags":["conversations"],"operationId":"conversations.reply","parameters":[{"name":"conversationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"ReplyResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"410":{"description":"Gone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoneEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0},"body":{"type":"string"},"idempotencyKey":{"type":"string"}},"required":["expectedVersion","body","idempotencyKey"],"additionalProperties":false}}},"required":true}}},"/api/v1/conversations/{conversationId}/draft-reply":{"post":{"tags":["conversations"],"operationId":"conversations.draftReply","parameters":[{"name":"conversationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"DraftReplyResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftReplyResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"410":{"description":"Gone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoneEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0},"requestId":{"type":"string"},"style":{"type":"string","enum":["balanced","concise","friendly","formal"]}},"required":["expectedVersion","requestId","style"],"additionalProperties":false}}},"required":true}}},"/api/v1/conversations/{conversationId}/translate":{"post":{"tags":["conversations"],"operationId":"conversations.translateMessage","parameters":[{"name":"conversationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"TranslateMessageResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranslateMessageResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"410":{"description":"Gone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoneEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":8000}},"required":["body"],"additionalProperties":false}}},"required":true}}},"/api/v1/conversations/{conversationId}/takeover":{"post":{"tags":["conversations"],"operationId":"conversations.takeover","parameters":[{"name":"conversationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"MutationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"410":{"description":"Gone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoneEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0}},"required":["expectedVersion"],"additionalProperties":false}}},"required":true}}},"/api/v1/conversations/{conversationId}/release":{"post":{"tags":["conversations"],"operationId":"conversations.release","parameters":[{"name":"conversationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"MutationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"410":{"description":"Gone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoneEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0}},"required":["expectedVersion"],"additionalProperties":false}}},"required":true}}},"/api/v1/conversations/{conversationId}/status":{"post":{"tags":["conversations"],"operationId":"conversations.status","parameters":[{"name":"conversationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"MutationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"410":{"description":"Gone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoneEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0},"status":{"type":"string","enum":["open","closed","archived"]}},"required":["expectedVersion","status"],"additionalProperties":false}}},"required":true}}},"/api/v1/conversations/{conversationId}/priority":{"post":{"tags":["conversations"],"operationId":"conversations.priority","parameters":[{"name":"conversationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"MutationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"410":{"description":"Gone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoneEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0},"priority":{"type":"string","enum":["low","normal","high"]}},"required":["expectedVersion","priority"],"additionalProperties":false}}},"required":true}}},"/api/v1/conversations/{conversationId}/category":{"post":{"tags":["conversations"],"operationId":"conversations.category","parameters":[{"name":"conversationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"MutationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"410":{"description":"Gone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoneEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0},"category":{"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]}},"required":["expectedVersion","category"],"additionalProperties":false}}},"required":true}}},"/api/v1/conversations/{conversationId}/assign":{"post":{"tags":["conversations"],"operationId":"conversations.assign","parameters":[{"name":"conversationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"MutationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"410":{"description":"Gone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoneEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0},"memberId":{"type":"string"}},"required":["expectedVersion","memberId"],"additionalProperties":false}}},"required":true}}},"/api/v1/conversations/{conversationId}/unassign":{"post":{"tags":["conversations"],"operationId":"conversations.unassign","parameters":[{"name":"conversationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"MutationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"410":{"description":"Gone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoneEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0}},"required":["expectedVersion"],"additionalProperties":false}}},"required":true}}},"/api/v1/conversations/{conversationId}/read-cursor":{"post":{"tags":["conversations"],"operationId":"conversations.readCursor","parameters":[{"name":"conversationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"ReadCursorResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadCursorResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"410":{"description":"Gone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoneEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sequence":{"type":"integer","minimum":0},"expectedSequence":{"type":"integer","minimum":0}},"required":["sequence","expectedSequence"],"additionalProperties":false}}},"required":true}}},"/api/v1/conversations/{conversationId}/mark-unread":{"post":{"tags":["conversations"],"operationId":"conversations.markUnread","parameters":[{"name":"conversationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"ReadCursorResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadCursorResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"410":{"description":"Gone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoneEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents":{"get":{"tags":["agents"],"operationId":"agents.list","parameters":[],"security":[],"responses":{"200":{"description":"AgentListResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentListResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}},"post":{"tags":["agents"],"operationId":"agents.create","parameters":[],"security":[],"responses":{"200":{"description":"Agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"slug":{"type":"string","minLength":1,"maxLength":64},"role":{"type":"string","enum":["Customer support","Sales agent","Shopping assistant"]},"instructions":{"type":"string","minLength":1,"maxLength":1024},"welcomeMessage":{"anyOf":[{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}]},{"type":"null"}]},"conversationStarters":{"anyOf":[{"type":"array","prefixItems":[{"type":"string","minLength":1,"maxLength":80},{"type":"string","minLength":1,"maxLength":80},{"type":"string","minLength":1,"maxLength":80}],"maxItems":3,"minItems":3},{"type":"null"}]},"industry":{"anyOf":[{"anyOf":[{"type":"object","properties":{"value":{"type":"string","enum":["B2B SaaS","Service Agencies","Fintech & Payments","Insurance","Law Firms","Marketplaces","Real Estate","Clinics","Industrial Equipment & Manufacturing","Ecommerce & DTC","Consumer Electronics & Appliances","Hotels & Resorts","Travel & Tour Operators","Accounting & Corporate Secretarial","Immigration Consultancies","Online Education","Fitness Chains & Franchises","Restaurants"]}},"required":["value"],"additionalProperties":false},{"type":"object","properties":{"value":{"type":"string","enum":["Other"]},"detail":{"type":"string"}},"required":["value","detail"],"additionalProperties":false}]},{"type":"null"}]}},"required":["name","slug","role","instructions"],"additionalProperties":false}}},"required":true}}},"/api/v1/agents/{agentId}/duplicate":{"post":{"tags":["agents"],"operationId":"agents.duplicate","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"DuplicateAgentResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateAgentResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"copySources":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/api/v1/agents/{agentId}/share-template":{"post":{"tags":["agents"],"operationId":"agents.shareTemplate","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"RelocateAgentResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelocateAgentResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"destinationOrganizationId":{"type":"string","minLength":1},"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]}},"required":["destinationOrganizationId"],"additionalProperties":false}}},"required":true}}},"/api/v1/public/templates/{agentId}":{"get":{"tags":["agents"],"operationId":"agents.publicTemplate","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"PublicAgentTemplate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAgentTemplateEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/public/templates/{agentId}/import":{"post":{"tags":["agents"],"operationId":"agents.importPublicTemplate","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"RelocateAgentResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelocateAgentResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"destinationOrganizationId":{"type":"string","minLength":1},"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]}},"required":["destinationOrganizationId"],"additionalProperties":false}}},"required":true}}},"/api/v1/agents/{agentId}/transfer":{"post":{"tags":["agents"],"operationId":"agents.transfer","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"RelocateAgentResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelocateAgentResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"destinationOrganizationId":{"type":"string","minLength":1}},"required":["destinationOrganizationId"],"additionalProperties":false}}},"required":true}}},"/api/v1/agents/{agentId}":{"get":{"tags":["agents"],"operationId":"agents.get","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}},"patch":{"tags":["agents"],"operationId":"agents.update","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"slug":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"role":{"anyOf":[{"type":"string","enum":["Customer support","Sales agent","Shopping assistant"]},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024},{"type":"null"}]},"translationLanguage":{"anyOf":[{"type":"string","enum":["Adaptive","English","Chinese","Hindi","Spanish","French","Arabic","Bangla","Portuguese","Indonesian","Japanese","Swahili","German","Korean","Italian","Yoruba","Burmese"]},{"type":"null"}]},"welcomeMessage":{"anyOf":[{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}]},{"type":"null"}]},"conversationStarters":{"anyOf":[{"type":"array","prefixItems":[{"type":"string","minLength":1,"maxLength":80},{"type":"string","minLength":1,"maxLength":80},{"type":"string","minLength":1,"maxLength":80}],"maxItems":3,"minItems":3},{"type":"null"}]},"playgroundModelId":{"anyOf":[{"type":"string","enum":["deepseek/deepseek-v4-pro-0813","deepseek/deepseek-v4.1-flash","deepseek/deepseek-v4.1-flash-fast","openai/gpt-5.6-luna"]},{"type":"null"}]},"publicTemplateEnabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"status":{"anyOf":[{"type":"string","enum":["draft","active","archived"]},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["agents"],"operationId":"agents.archive","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/avatar":{"put":{"tags":["agents"],"operationId":"agents.uploadAvatar","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"contentType":{"type":"string","minLength":1,"maxLength":255},"fileSizeBytes":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"fileBase64":{"type":"string","minLength":1,"maxLength":2796304}},"required":["contentType","fileSizeBytes","fileBase64"],"additionalProperties":false}}},"required":true}},"delete":{"tags":["agents"],"operationId":"agents.removeAvatar","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/automations":{"get":{"tags":["automations"],"operationId":"automations.list","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"AutomationListResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationListResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"500":{"description":"InvalidStoredData","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidStoredDataEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}},"post":{"tags":["automations"],"operationId":"automations.create","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Automation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden | AutomationLimitReached","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenEncoded"},{"$ref":"#/components/schemas/AutomationLimitReachedEncoded"}]}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"422":{"description":"AutomationEnablementFailed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationEnablementFailedEncoded"}}}},"500":{"description":"InvalidStoredData","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidStoredDataEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"pattern":"\\S"},"trigger":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["model.instruction"]},"version":{"type":"number","enum":[1]},"whenToUse":{"type":"string","minLength":1,"pattern":"\\S","maxLength":2000},"channels":{"type":"array","items":{"type":"string","enum":["playground","help_page","widget"]}}},"required":["type","version","whenToUse","channels"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["conversation.created"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["takeover.requested"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["lead.submitted"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false}]}]},"action":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["suggested_messages"]},"version":{"type":"number","enum":[1]},"mode":{"type":"string","enum":["auto","manual"]},"messages":{"type":"array","items":{"type":"string","minLength":1,"pattern":"\\S","maxLength":40}},"disableInput":{"type":"boolean"}},"required":["type","version","mode","messages","disableInput"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom_button"]},"version":{"type":"number","enum":[1]},"buttonText":{"type":"string","minLength":1,"pattern":"\\S","maxLength":80},"url":{"type":"string","maxLength":2000},"actionName":{"anyOf":[{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9_]*$"},{"type":"null"}]}},"required":["type","version","buttonText","url"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["collect_leads"]},"version":{"type":"number","enum":[1]},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["name","email","phone"]},"enabled":{"type":"boolean"},"required":{"type":"boolean"}},"required":["key","enabled","required"],"additionalProperties":false}},"successMessage":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500},"dismissMessage":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500}},"required":["type","version","fields","successMessage","dismissMessage"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["collect_leads"]},"version":{"type":"number","enum":[2]},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$"},"label":{"type":"string","minLength":1,"pattern":"\\S","maxLength":80},"kind":{"type":"string","enum":["text","email","phone","textarea"]},"required":{"type":"boolean"},"maxLength":{"anyOf":[{"type":"integer","minimum":1,"maximum":500},{"type":"null"}]}},"required":["id","label","kind","required","maxLength"],"additionalProperties":false}},"successMessage":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500},"dismissMessage":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500},"notification":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["none"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["slack"]},"channelId":{"anyOf":[{"type":"string","minLength":1,"pattern":"\\S","maxLength":120},{"type":"null"}]},"template":{"anyOf":[{"type":"string","minLength":1,"pattern":"\\S","maxLength":2000},{"type":"null"}]}},"required":["kind","channelId","template"],"additionalProperties":false}]}},"required":["type","version","fields","successMessage","dismissMessage","notification"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["slack"]},"version":{"type":"number","enum":[1]},"channelId":{"anyOf":[{"type":"string","minLength":1,"pattern":"\\S","maxLength":120},{"type":"null"}]},"template":{"type":"string","minLength":1,"pattern":"\\S","maxLength":2000}},"required":["type","version","channelId","template"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["escalate"]},"version":{"type":"number","enum":[1]},"ticketPlatform":{"type":"string","enum":["intercom","zendesk"]},"stopAi":{"type":"boolean"},"confirmationMessage":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500}},"required":["type","version","stopAi","confirmationMessage"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom_action"]},"version":{"type":"number","enum":[1]},"method":{"type":"string","enum":["GET","POST"]},"url":{"type":"string","maxLength":2000},"headers":{"type":"object","additionalProperties":{"type":"string"}},"bodyTemplate":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}]},"inputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},"description":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500},"required":{"type":"boolean"}},"required":["name","description","required"],"additionalProperties":false}},"dataAccess":{"type":"string","enum":["full","summary"]}},"required":["type","version","method","url","headers","bodyTemplate","inputs","dataAccess"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["shopify_products"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["shopify_get_cart"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["shopify_update_cart"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["stripe_get_subscription"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["stripe_get_invoices"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["stripe_update_customer"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["stripe_cancel_subscription"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["slack.notification"]},"version":{"type":"number","enum":[1]},"channelId":{"anyOf":[{"type":"string","minLength":1,"pattern":"\\S","maxLength":120},{"type":"null"}]},"template":{"type":"string","minLength":1,"pattern":"\\S","maxLength":2000}},"required":["type","version","channelId","template"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["chat.quickReplies"]},"version":{"type":"number","enum":[1]},"replies":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"pattern":"\\S","maxLength":80},"value":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"value":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["payload"]},"value":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500}},"required":["type","value"],"additionalProperties":false}]},"removeAfterSelection":{"type":"boolean"}},"required":["label","value","removeAfterSelection"],"additionalProperties":false}}},"required":["type","version","replies"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["chat.customButton"]},"version":{"type":"number","enum":[1]},"label":{"type":"string","minLength":1,"pattern":"\\S","maxLength":80},"url":{"type":"string","maxLength":2000}},"required":["type","version","label","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["chat.leadForm"]},"version":{"type":"number","enum":[1]},"fields":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["name"]},"required":{"type":"boolean"}},"required":["type","required"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["email"]},"required":{"type":"boolean"}},"required":["type","required"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["phone"]},"required":{"type":"boolean"}},"required":["type","required"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"id":{"type":"string"},"label":{"type":"string","minLength":1,"pattern":"\\S","maxLength":80},"required":{"type":"boolean"},"maxLength":{"type":"integer"}},"required":["type","id","label","required","maxLength"],"additionalProperties":false}]}}},"required":["type","version","fields"],"additionalProperties":false}]}]}},"required":["name","trigger","action"],"additionalProperties":false}}},"required":true}}},"/api/v1/automations/lead-notifications":{"get":{"tags":["automations"],"operationId":"automations.workspaceLeadNotifications","parameters":[],"security":[],"responses":{"200":{"description":"WorkspaceLeadSubmissionNotificationsResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceLeadSubmissionNotificationsResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"500":{"description":"InvalidStoredData","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidStoredDataEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/automations/{automationId}":{"get":{"tags":["automations"],"operationId":"automations.get","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true},{"name":"automationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Automation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"500":{"description":"InvalidStoredData","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidStoredDataEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}},"patch":{"tags":["automations"],"operationId":"automations.update","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true},{"name":"automationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Automation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden | AutomationLimitReached","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenEncoded"},{"$ref":"#/components/schemas/AutomationLimitReachedEncoded"}]}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"422":{"description":"AutomationEnablementFailed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationEnablementFailedEncoded"}}}},"500":{"description":"InvalidStoredData","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidStoredDataEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0},"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":80,"pattern":"\\S"},{"type":"null"}]},"trigger":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["model.instruction"]},"version":{"type":"number","enum":[1]},"whenToUse":{"type":"string","minLength":1,"pattern":"\\S","maxLength":2000},"channels":{"type":"array","items":{"type":"string","enum":["playground","help_page","widget"]}}},"required":["type","version","whenToUse","channels"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["conversation.created"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["takeover.requested"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["lead.submitted"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false}]}]},{"type":"null"}]},"action":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["suggested_messages"]},"version":{"type":"number","enum":[1]},"mode":{"type":"string","enum":["auto","manual"]},"messages":{"type":"array","items":{"type":"string","minLength":1,"pattern":"\\S","maxLength":40}},"disableInput":{"type":"boolean"}},"required":["type","version","mode","messages","disableInput"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom_button"]},"version":{"type":"number","enum":[1]},"buttonText":{"type":"string","minLength":1,"pattern":"\\S","maxLength":80},"url":{"type":"string","maxLength":2000},"actionName":{"anyOf":[{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9_]*$"},{"type":"null"}]}},"required":["type","version","buttonText","url"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["collect_leads"]},"version":{"type":"number","enum":[1]},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["name","email","phone"]},"enabled":{"type":"boolean"},"required":{"type":"boolean"}},"required":["key","enabled","required"],"additionalProperties":false}},"successMessage":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500},"dismissMessage":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500}},"required":["type","version","fields","successMessage","dismissMessage"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["collect_leads"]},"version":{"type":"number","enum":[2]},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$"},"label":{"type":"string","minLength":1,"pattern":"\\S","maxLength":80},"kind":{"type":"string","enum":["text","email","phone","textarea"]},"required":{"type":"boolean"},"maxLength":{"anyOf":[{"type":"integer","minimum":1,"maximum":500},{"type":"null"}]}},"required":["id","label","kind","required","maxLength"],"additionalProperties":false}},"successMessage":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500},"dismissMessage":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500},"notification":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["none"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["slack"]},"channelId":{"anyOf":[{"type":"string","minLength":1,"pattern":"\\S","maxLength":120},{"type":"null"}]},"template":{"anyOf":[{"type":"string","minLength":1,"pattern":"\\S","maxLength":2000},{"type":"null"}]}},"required":["kind","channelId","template"],"additionalProperties":false}]}},"required":["type","version","fields","successMessage","dismissMessage","notification"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["slack"]},"version":{"type":"number","enum":[1]},"channelId":{"anyOf":[{"type":"string","minLength":1,"pattern":"\\S","maxLength":120},{"type":"null"}]},"template":{"type":"string","minLength":1,"pattern":"\\S","maxLength":2000}},"required":["type","version","channelId","template"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["escalate"]},"version":{"type":"number","enum":[1]},"ticketPlatform":{"type":"string","enum":["intercom","zendesk"]},"stopAi":{"type":"boolean"},"confirmationMessage":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500}},"required":["type","version","stopAi","confirmationMessage"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom_action"]},"version":{"type":"number","enum":[1]},"method":{"type":"string","enum":["GET","POST"]},"url":{"type":"string","maxLength":2000},"headers":{"type":"object","additionalProperties":{"type":"string"}},"bodyTemplate":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}]},"inputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},"description":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500},"required":{"type":"boolean"}},"required":["name","description","required"],"additionalProperties":false}},"dataAccess":{"type":"string","enum":["full","summary"]}},"required":["type","version","method","url","headers","bodyTemplate","inputs","dataAccess"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["shopify_products"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["shopify_get_cart"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["shopify_update_cart"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["stripe_get_subscription"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["stripe_get_invoices"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["stripe_update_customer"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["stripe_cancel_subscription"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["slack.notification"]},"version":{"type":"number","enum":[1]},"channelId":{"anyOf":[{"type":"string","minLength":1,"pattern":"\\S","maxLength":120},{"type":"null"}]},"template":{"type":"string","minLength":1,"pattern":"\\S","maxLength":2000}},"required":["type","version","channelId","template"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["chat.quickReplies"]},"version":{"type":"number","enum":[1]},"replies":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"pattern":"\\S","maxLength":80},"value":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"value":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["payload"]},"value":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500}},"required":["type","value"],"additionalProperties":false}]},"removeAfterSelection":{"type":"boolean"}},"required":["label","value","removeAfterSelection"],"additionalProperties":false}}},"required":["type","version","replies"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["chat.customButton"]},"version":{"type":"number","enum":[1]},"label":{"type":"string","minLength":1,"pattern":"\\S","maxLength":80},"url":{"type":"string","maxLength":2000}},"required":["type","version","label","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["chat.leadForm"]},"version":{"type":"number","enum":[1]},"fields":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["name"]},"required":{"type":"boolean"}},"required":["type","required"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["email"]},"required":{"type":"boolean"}},"required":["type","required"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["phone"]},"required":{"type":"boolean"}},"required":["type","required"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"id":{"type":"string"},"label":{"type":"string","minLength":1,"pattern":"\\S","maxLength":80},"required":{"type":"boolean"},"maxLength":{"type":"integer"}},"required":["type","id","label","required","maxLength"],"additionalProperties":false}]}}},"required":["type","version","fields"],"additionalProperties":false}]}]},{"type":"null"}]}},"required":["expectedRevision"],"additionalProperties":false}}},"required":true}},"delete":{"tags":["automations"],"operationId":"automations.delete","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true},{"name":"automationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"<No Content>"},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden | AutomationLimitReached","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenEncoded"},{"$ref":"#/components/schemas/AutomationLimitReachedEncoded"}]}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"422":{"description":"AutomationEnablementFailed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationEnablementFailedEncoded"}}}},"500":{"description":"InvalidStoredData","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidStoredDataEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0}},"required":["expectedRevision"],"additionalProperties":false}}},"required":true}}},"/api/v1/agents/{agentId}/automations/{automationId}/enable":{"post":{"tags":["automations"],"operationId":"automations.enable","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true},{"name":"automationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Automation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden | AutomationLimitReached","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenEncoded"},{"$ref":"#/components/schemas/AutomationLimitReachedEncoded"}]}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"422":{"description":"AutomationEnablementFailed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationEnablementFailedEncoded"}}}},"500":{"description":"InvalidStoredData","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidStoredDataEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0}},"required":["expectedRevision"],"additionalProperties":false}}},"required":true}}},"/api/v1/agents/{agentId}/automations/{automationId}/disable":{"post":{"tags":["automations"],"operationId":"automations.disable","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true},{"name":"automationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Automation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden | AutomationLimitReached","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenEncoded"},{"$ref":"#/components/schemas/AutomationLimitReachedEncoded"}]}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"422":{"description":"AutomationEnablementFailed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationEnablementFailedEncoded"}}}},"500":{"description":"InvalidStoredData","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidStoredDataEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0}},"required":["expectedRevision"],"additionalProperties":false}}},"required":true}}},"/api/v1/agents/{agentId}/automations/{automationId}/runs":{"get":{"tags":["automations"],"operationId":"automations.listRuns","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true},{"name":"automationId","in":"path","schema":{"type":"string"},"required":true},{"name":"cursor","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[],"responses":{"200":{"description":"AutomationRunListResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRunListResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"500":{"description":"InvalidStoredData","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidStoredDataEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/automations/{automationId}/runs/{runId}":{"get":{"tags":["automations"],"operationId":"automations.getRun","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true},{"name":"automationId","in":"path","schema":{"type":"string"},"required":true},{"name":"runId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"AutomationRunDetailResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRunDetailResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"500":{"description":"InvalidStoredData","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidStoredDataEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/automations/{automationId}/lead-submissions":{"get":{"tags":["automations"],"operationId":"automations.listLeadSubmissions","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true},{"name":"automationId","in":"path","schema":{"type":"string"},"required":true},{"name":"cursor","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[],"responses":{"200":{"description":"LeadSubmissionListResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadSubmissionListResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"500":{"description":"InvalidStoredData","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidStoredDataEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/automations/{automationId}/lead-submissions/read-cursor":{"post":{"tags":["automations"],"operationId":"automations.markLeadSubmissionsRead","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true},{"name":"automationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"LeadSubmissionReadCursorResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadSubmissionReadCursorResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"500":{"description":"InvalidStoredData","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidStoredDataEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"submissionId":{"type":"string"}},"required":["submissionId"],"additionalProperties":false}}},"required":true}}},"/api/v1/agents/{agentId}/automations/{automationId}/lead-submissions/export.csv":{"get":{"tags":["automations"],"operationId":"automations.exportLeadSubmissionsCsv","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true},{"name":"automationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"LeadSubmissionCsvResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadSubmissionCsvResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"500":{"description":"InvalidStoredData","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidStoredDataEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/public/agents/{agentId}/conversations/{conversationId}/lead-submissions":{"post":{"tags":["automations"],"operationId":"automations.submitLead","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true},{"name":"conversationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"SubmitLeadResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitLeadResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"500":{"description":"InvalidStoredData","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidStoredDataEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"automationId":{"type":"string","minLength":1,"maxLength":128},"idempotencyKey":{"type":"string","minLength":1,"maxLength":200},"accessToken":{"type":"string","minLength":1,"maxLength":512},"values":{"type":"object","additionalProperties":{"type":"string","maxLength":500}}},"required":["automationId","idempotencyKey","accessToken","values"],"additionalProperties":false}}},"required":true}}},"/api/v1/public/widgets/{publicDeploymentId}/conversations/{conversationId}/lead-submissions":{"post":{"tags":["automations"],"operationId":"automations.submitWidgetLead","parameters":[{"name":"publicDeploymentId","in":"path","schema":{"type":"string"},"required":true},{"name":"conversationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"SubmitLeadResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitLeadResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"500":{"description":"InvalidStoredData","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidStoredDataEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"automationId":{"type":"string","minLength":1,"maxLength":128},"idempotencyKey":{"type":"string","minLength":1,"maxLength":200},"accessToken":{"type":"string","minLength":1,"maxLength":512},"values":{"type":"object","additionalProperties":{"type":"string","maxLength":500}}},"required":["automationId","idempotencyKey","accessToken","values"],"additionalProperties":false}}},"required":true}}},"/api/v1/public/agents/{agentId}/conversations/{conversationId}/lead-submissions/status":{"post":{"tags":["automations"],"operationId":"automations.leadSubmissionStatus","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true},{"name":"conversationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"LeadSubmissionStatusResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadSubmissionStatusResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"500":{"description":"InvalidStoredData","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidStoredDataEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"automationId":{"type":"string","minLength":1,"maxLength":128},"accessToken":{"type":"string","minLength":1,"maxLength":512}},"required":["automationId","accessToken"],"additionalProperties":false}}},"required":true}}},"/api/v1/public/widgets/{publicDeploymentId}/conversations/{conversationId}/lead-submissions/status":{"post":{"tags":["automations"],"operationId":"automations.widgetLeadSubmissionStatus","parameters":[{"name":"publicDeploymentId","in":"path","schema":{"type":"string"},"required":true},{"name":"conversationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"LeadSubmissionStatusResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadSubmissionStatusResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"500":{"description":"InvalidStoredData","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidStoredDataEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"automationId":{"type":"string","minLength":1,"maxLength":128},"accessToken":{"type":"string","minLength":1,"maxLength":512}},"required":["automationId","accessToken"],"additionalProperties":false}}},"required":true}}},"/api/v1/agents/{agentId}/sources":{"get":{"tags":["agentSources"],"operationId":"agentSources.list","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"AgentSourceListResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSourceListResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}},"post":{"tags":["agentSources"],"operationId":"agentSources.create","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["website"]},"websiteUrl":{"type":"string"},"websiteMode":{"type":"string","enum":["page","site"]},"retrainEnabled":{"type":"boolean"}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","websiteUrl","websiteMode","retrainEnabled"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["text"]},"body":{"type":"string"}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","body"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["qa"]},"question":{"type":"string"},"answer":{"type":"string"}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","question","answer"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["file"]},"fileName":{"type":"string"},"fileKind":{"type":"string","enum":["pdf","txt","md","csv","tsv","json","xls","xlsx"]},"fileContentType":{"type":"string"},"fileSizeBytes":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"fileRetrievalMode":{"type":"string","enum":["text","structured"]},"fileSchemaJson":{"anyOf":[{"type":"string"},{"type":"null"}]},"notionPageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"notionPageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"fileOriginUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","fileName","fileKind","fileContentType","fileSizeBytes","fileRetrievalMode","fileSchemaJson","notionPageId","notionPageUrl","fileOriginUrl"],"additionalProperties":false}]},{"$ref":"#/components/schemas/CreateAgentSourcesBatchResponseEncoded"}]}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["youtube"]},"title":{"type":"string","minLength":1,"maxLength":120},"url":{"type":"string"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["website"]},"title":{"type":"string","minLength":1,"maxLength":120},"websiteUrl":{"type":"string","minLength":1,"maxLength":2000},"websiteMode":{"type":"string","enum":["page","site"]},"retrainEnabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["type","title","websiteUrl","websiteMode"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["url_batch"]},"title":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"urls":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"minItems":1,"maxItems":20}},"required":["type","urls"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"title":{"type":"string","minLength":1,"maxLength":120},"body":{"type":"string","minLength":1,"maxLength":8000}},"required":["type","title","body"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["qa"]},"title":{"type":"string","minLength":1,"maxLength":120},"question":{"type":"string","minLength":1,"maxLength":1000},"answer":{"type":"string","minLength":1,"maxLength":1000}},"required":["type","title","question","answer"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"title":{"type":"string","minLength":1,"maxLength":120},"fileName":{"type":"string","minLength":1,"maxLength":255},"fileKind":{"type":"string","enum":["pdf","txt","md","csv","tsv","json","xls","xlsx"]},"fileContentType":{"type":"string","minLength":1,"maxLength":255},"fileSizeBytes":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"fileBase64":{"type":"string","minLength":1,"maxLength":55924312}},"required":["type","title","fileName","fileKind","fileContentType","fileSizeBytes","fileBase64"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["google_doc"]},"title":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"url":{"type":"string","minLength":1,"maxLength":2000}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["google_sheet"]},"title":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"url":{"type":"string","minLength":1,"maxLength":2000}},"required":["type","url"],"additionalProperties":false}]}}},"required":true}}},"/api/v1/agents/{agentId}/sources/{sourceId}":{"get":{"tags":["agentSources"],"operationId":"agentSources.get","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true},{"name":"sourceId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"source":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["website"]},"websiteUrl":{"type":"string"},"websiteMode":{"type":"string","enum":["page","site"]},"retrainEnabled":{"type":"boolean"}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","websiteUrl","websiteMode","retrainEnabled"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["text"]},"body":{"type":"string"}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","body"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["qa"]},"question":{"type":"string"},"answer":{"type":"string"}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","question","answer"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["file"]},"fileName":{"type":"string"},"fileKind":{"type":"string","enum":["pdf","txt","md","csv","tsv","json","xls","xlsx"]},"fileContentType":{"type":"string"},"fileSizeBytes":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"fileRetrievalMode":{"type":"string","enum":["text","structured"]},"fileSchemaJson":{"anyOf":[{"type":"string"},{"type":"null"}]},"notionPageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"notionPageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"fileOriginUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","fileName","fileKind","fileContentType","fileSizeBytes","fileRetrievalMode","fileSchemaJson","notionPageId","notionPageUrl","fileOriginUrl"],"additionalProperties":false}]},"fileContent":{"anyOf":[{"type":"string"},{"type":"null"}]},"websitePages":{"type":"array","items":{"$ref":"#/components/schemas/WebsiteSourcePageDetailEncoded"}}},"required":["source","fileContent","websitePages"],"additionalProperties":false}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}},"patch":{"tags":["agentSources"],"operationId":"agentSources.update","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true},{"name":"sourceId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["website"]},"websiteUrl":{"type":"string"},"websiteMode":{"type":"string","enum":["page","site"]},"retrainEnabled":{"type":"boolean"}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","websiteUrl","websiteMode","retrainEnabled"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["text"]},"body":{"type":"string"}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","body"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["qa"]},"question":{"type":"string"},"answer":{"type":"string"}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","question","answer"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["file"]},"fileName":{"type":"string"},"fileKind":{"type":"string","enum":["pdf","txt","md","csv","tsv","json","xls","xlsx"]},"fileContentType":{"type":"string"},"fileSizeBytes":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"fileRetrievalMode":{"type":"string","enum":["text","structured"]},"fileSchemaJson":{"anyOf":[{"type":"string"},{"type":"null"}]},"notionPageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"notionPageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"fileOriginUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","fileName","fileKind","fileContentType","fileSizeBytes","fileRetrievalMode","fileSchemaJson","notionPageId","notionPageUrl","fileOriginUrl"],"additionalProperties":false}]}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"title":{"type":"string","minLength":1,"maxLength":120}},"required":["type","title"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["website"]},"title":{"type":"string","minLength":1,"maxLength":120},"websiteUrl":{"type":"string","minLength":1,"maxLength":2000},"websiteMode":{"type":"string","enum":["page","site"]},"retrainEnabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["type","title","websiteUrl","websiteMode"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"title":{"type":"string","minLength":1,"maxLength":120},"body":{"type":"string","minLength":1,"maxLength":8000}},"required":["type","title","body"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["qa"]},"title":{"type":"string","minLength":1,"maxLength":120},"question":{"type":"string","minLength":1,"maxLength":1000},"answer":{"type":"string","minLength":1,"maxLength":1000}},"required":["type","title","question","answer"],"additionalProperties":false}]}}},"required":true}},"delete":{"tags":["agentSources"],"operationId":"agentSources.archive","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true},{"name":"sourceId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["website"]},"websiteUrl":{"type":"string"},"websiteMode":{"type":"string","enum":["page","site"]},"retrainEnabled":{"type":"boolean"}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","websiteUrl","websiteMode","retrainEnabled"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["text"]},"body":{"type":"string"}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","body"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["qa"]},"question":{"type":"string"},"answer":{"type":"string"}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","question","answer"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["file"]},"fileName":{"type":"string"},"fileKind":{"type":"string","enum":["pdf","txt","md","csv","tsv","json","xls","xlsx"]},"fileContentType":{"type":"string"},"fileSizeBytes":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"fileRetrievalMode":{"type":"string","enum":["text","structured"]},"fileSchemaJson":{"anyOf":[{"type":"string"},{"type":"null"}]},"notionPageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"notionPageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"fileOriginUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","fileName","fileKind","fileContentType","fileSizeBytes","fileRetrievalMode","fileSchemaJson","notionPageId","notionPageUrl","fileOriginUrl"],"additionalProperties":false}]}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/sources/{sourceId}/process":{"post":{"tags":["agentSources"],"operationId":"agentSources.process","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true},{"name":"sourceId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"ProcessAgentSourceResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessAgentSourceResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/analytics":{"get":{"tags":["analytics"],"operationId":"analytics.agent","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true},{"name":"from","in":"query","schema":{"type":"string"},"required":true},{"name":"to","in":"query","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"AnalyticsReport","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsReportEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/command-centre/analytics":{"get":{"tags":["analytics"],"operationId":"analytics.commandCentre","parameters":[{"name":"from","in":"query","schema":{"type":"string"},"required":true},{"name":"to","in":"query","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"AnalyticsReport","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsReportEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/dashboard/access":{"get":{"tags":["dashboardSummary"],"operationId":"dashboardSummary.access","parameters":[],"security":[],"responses":{"200":{"description":"ProductAccess","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductAccessEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/dashboard":{"get":{"tags":["dashboardSummary"],"operationId":"dashboardSummary.bootstrap","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["onboarding"]},"onboarding":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["incomplete"]}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["not_required"]},"organizationId":{"type":"string"}},"required":["status","organizationId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["completed"]},"flowId":{"type":"string"},"flowVersion":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"organizationId":{"type":"string"},"completedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"agentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationSlug":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","flowId","flowVersion","organizationId","completedAt"],"additionalProperties":false}]}},"required":["status","onboarding"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["no_workspace"]},"onboarding":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["incomplete"]}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["not_required"]},"organizationId":{"type":"string"}},"required":["status","organizationId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["completed"]},"flowId":{"type":"string"},"flowVersion":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"organizationId":{"type":"string"},"completedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"agentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationSlug":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","flowId","flowVersion","organizationId","completedAt"],"additionalProperties":false}]}},"required":["status","onboarding"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["ready"]},"access":{"$ref":"#/components/schemas/ProductAccessEncoded"},"agents":{"$ref":"#/components/schemas/AgentListResponseEncoded"},"credits":{"anyOf":[{"$ref":"#/components/schemas/BillingCreditsStatusEncoded"},{"type":"null"}]},"onboarding":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["incomplete"]}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["not_required"]},"organizationId":{"type":"string"}},"required":["status","organizationId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["completed"]},"flowId":{"type":"string"},"flowVersion":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"organizationId":{"type":"string"},"completedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"agentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationSlug":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","flowId","flowVersion","organizationId","completedAt"],"additionalProperties":false}]}},"required":["status","access","agents","credits","onboarding"],"additionalProperties":false}]}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/public/widgets/{publicDeploymentId}/config":{"get":{"tags":["agentDeploymentSettings"],"operationId":"agentDeploymentSettings.publicWidgetConfiguration","parameters":[{"name":"publicDeploymentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"PublicWidgetConfiguration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicWidgetConfigurationEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/public/help-pages/{agentId}":{"get":{"tags":["agentDeploymentSettings"],"operationId":"agentDeploymentSettings.publicHelpPage","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"PublicHelpPage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicHelpPageEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/deployment-settings":{"get":{"tags":["agentDeploymentSettings"],"operationId":"agentDeploymentSettings.get","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"AgentDeploymentSettings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentDeploymentSettingsEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}},"patch":{"tags":["agentDeploymentSettings"],"operationId":"agentDeploymentSettings.update","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"AgentDeploymentSettings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentDeploymentSettingsEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"widgetEnabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"widgetAllowedDomains":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1,"maxLength":253,"pattern":"^(localhost|(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)$"},"maxItems":20},{"type":"null"}]},"widgetShowStarterSuggestions":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"widgetColor":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}]},"widgetAutoShowDelaySeconds":{"anyOf":[{"type":"integer","minimum":0,"maximum":3600},{"type":"null"}]},"widgetAutoShowOnMobile":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"widgetHorizontalOffset":{"anyOf":[{"type":"integer","minimum":0,"maximum":200},{"type":"null"}]},"widgetBottomOffset":{"anyOf":[{"type":"integer","minimum":0,"maximum":200},{"type":"null"}]},"widgetPoweredBy":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"chatSoundsEnabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"voiceEnabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"helpPageEnabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"helpPageTitle":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"helpPageSubtitle":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}]},"helpPageInputPlaceholder":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"theme":{"anyOf":[{"type":"string","enum":["light","dark","system"]},{"type":"null"}]},"position":{"anyOf":[{"type":"string","enum":["bottom-right","bottom-left"]},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/api/v1/feature-requests":{"post":{"tags":["featureRequests"],"operationId":"featureRequests.create","parameters":[],"security":[],"responses":{"200":{"description":"FeatureRequestResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureRequestResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"category":{"type":"string","enum":["integration","automation","dashboard","billing","other"]},"title":{"type":"string","minLength":1,"maxLength":120},"useCase":{"type":"string","minLength":1,"maxLength":2000},"priority":{"type":"string","enum":["low","medium","high"]},"willingnessToPay":{"type":"string","enum":["no","maybe","yes"]},"agentId":{"anyOf":[{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},{"type":"null"}]},"contactNote":{"anyOf":[{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},{"type":"null"}]}},"required":["category","title","useCase","priority","willingnessToPay"],"additionalProperties":false}}},"required":true}}},"/api/v1/getting-started/first-conversation-reward":{"get":{"tags":["agentGettingStarted"],"operationId":"agentGettingStarted.firstConversationReward","parameters":[],"security":[],"responses":{"200":{"description":"FirstConversationRewardStatus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FirstConversationRewardStatusEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/getting-started/first-conversation-reward/acknowledge":{"post":{"tags":["agentGettingStarted"],"operationId":"agentGettingStarted.acknowledgeFirstConversationReward","parameters":[],"security":[],"responses":{"200":{"description":"FirstConversationRewardStatus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FirstConversationRewardStatusEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/getting-started/activation-tour":{"get":{"tags":["agentGettingStarted"],"operationId":"agentGettingStarted.activationTour","parameters":[],"security":[],"responses":{"200":{"description":"ActivationTourStatus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivationTourStatusEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}},"post":{"tags":["agentGettingStarted"],"operationId":"agentGettingStarted.setActivationTour","parameters":[],"security":[],"responses":{"200":{"description":"ActivationTourStatus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivationTourStatusEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}}},"required":true}}},"/api/v1/agents/{agentId}/getting-started":{"get":{"tags":["agentGettingStarted"],"operationId":"agentGettingStarted.get","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"AgentGettingStarted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentGettingStartedEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/getting-started/skip-step":{"post":{"tags":["agentGettingStarted"],"operationId":"agentGettingStarted.skipStep","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"AgentGettingStarted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentGettingStartedEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"step":{"type":"string","enum":["add_sources","add_action","deploy_agent_page","deploy_chat_widget"]}},"required":["step"],"additionalProperties":false}}},"required":true}}},"/api/v1/agents/{agentId}/getting-started/complete":{"post":{"tags":["agentGettingStarted"],"operationId":"agentGettingStarted.complete","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"AgentGettingStarted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentGettingStartedEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/integrations/helpdesk/{provider}":{"get":{"tags":["integrations"],"operationId":"integrations.getHelpdesk","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true},{"name":"provider","in":"path","schema":{"type":"string","enum":["intercom","zendesk"]},"required":true}],"security":[],"responses":{"200":{"description":"HelpdeskIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelpdeskIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}},"delete":{"tags":["integrations"],"operationId":"integrations.disconnectHelpdesk","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true},{"name":"provider","in":"path","schema":{"type":"string","enum":["intercom","zendesk"]},"required":true}],"security":[],"responses":{"200":{"description":"HelpdeskIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelpdeskIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/integrations/helpdesk/{provider}/oauth/start":{"post":{"tags":["integrations"],"operationId":"integrations.startHelpdeskOAuth","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true},{"name":"provider","in":"path","schema":{"type":"string","enum":["intercom","zendesk"]},"required":true}],"security":[],"responses":{"200":{"description":"StartHelpdeskOAuthResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartHelpdeskOAuthResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subdomain":{"type":"string"},"region":{"type":"string","enum":["us","eu","au"]}},"additionalProperties":false}}},"required":true}}},"/api/v1/agents/{agentId}/integrations/helpdesk/{provider}/ticket-types":{"get":{"tags":["integrations"],"operationId":"integrations.listHelpdeskTicketTypes","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true},{"name":"provider","in":"path","schema":{"type":"string","enum":["intercom","zendesk"]},"required":true}],"security":[],"responses":{"200":{"description":"HelpdeskTicketTypesResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelpdeskTicketTypesResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/integrations/helpdesk/{provider}/ticket-type":{"put":{"tags":["integrations"],"operationId":"integrations.setHelpdeskTicketType","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true},{"name":"provider","in":"path","schema":{"type":"string","enum":["intercom","zendesk"]},"required":true}],"security":[],"responses":{"200":{"description":"HelpdeskIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelpdeskIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ticketTypeId":{"type":"string","minLength":1}},"required":["ticketTypeId"],"additionalProperties":false}}},"required":true}}},"/api/v1/agents/{agentId}/integrations/shopify":{"get":{"tags":["integrations"],"operationId":"integrations.getShopify","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"ShopifyIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopifyIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}},"delete":{"tags":["integrations"],"operationId":"integrations.disconnectShopify","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"ShopifyIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopifyIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/integrations/shopify/oauth/start":{"post":{"tags":["integrations"],"operationId":"integrations.startShopifyOAuth","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"StartShopifyOAuthResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartShopifyOAuthResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden | IntegrationPlanRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForbiddenEncoded"},{"$ref":"#/components/schemas/IntegrationPlanRequiredEncoded"}]}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"shopDomain":{"type":"string","minLength":1,"maxLength":255}},"required":["shopDomain"],"additionalProperties":false}}},"required":true}}},"/api/v1/agents/{agentId}/integrations/slack":{"get":{"tags":["integrations"],"operationId":"integrations.getSlack","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"SlackIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}},"patch":{"tags":["integrations"],"operationId":"integrations.updateSlack","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"SlackIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"defaultChannelId":{"anyOf":[{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["integrations"],"operationId":"integrations.disconnectSlack","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"SlackIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/integrations/messenger":{"get":{"tags":["integrations"],"operationId":"integrations.getMessenger","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"MetaIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}},"delete":{"tags":["integrations"],"operationId":"integrations.disconnectMessenger","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"MetaIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/integrations/messenger/oauth/start":{"post":{"tags":["integrations"],"operationId":"integrations.startMessengerOAuth","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"StartMessengerOAuthResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartMessengerOAuthResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/integrations/instagram":{"get":{"tags":["integrations"],"operationId":"integrations.getInstagram","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"MetaIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}},"delete":{"tags":["integrations"],"operationId":"integrations.disconnectInstagram","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"MetaIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/integrations/instagram/oauth/start":{"post":{"tags":["integrations"],"operationId":"integrations.startInstagramOAuth","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"StartInstagramOAuthResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartInstagramOAuthResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/integrations/whatsapp":{"get":{"tags":["integrations"],"operationId":"integrations.getWhatsApp","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"MetaIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}},"delete":{"tags":["integrations"],"operationId":"integrations.disconnectWhatsApp","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"MetaIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/integrations/whatsapp/embedded-signup/start":{"post":{"tags":["integrations"],"operationId":"integrations.startWhatsAppEmbeddedSignup","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"StartWhatsAppEmbeddedSignupResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartWhatsAppEmbeddedSignupResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/integrations/whatsapp/embedded-signup/complete":{"post":{"tags":["integrations"],"operationId":"integrations.completeWhatsAppEmbeddedSignup","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"MetaIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","minLength":20,"maxLength":200},"code":{"type":"string","minLength":1,"maxLength":4096},"wabaId":{"type":"string","minLength":1,"maxLength":100},"phoneNumberId":{"type":"string","minLength":1,"maxLength":100},"pin":{"type":"string","pattern":"^\\d{6}$"}},"required":["state","code","wabaId"],"additionalProperties":false}}},"required":true}}},"/api/v1/agents/{agentId}/integrations/whatsapp/cloud-api":{"post":{"tags":["integrations"],"operationId":"integrations.connectWhatsAppCloudApi","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"MetaIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"wabaId":{"type":"string","minLength":1,"maxLength":100},"phoneNumberId":{"type":"string","minLength":1,"maxLength":100},"accessToken":{"type":"string","minLength":1,"maxLength":4096},"pin":{"type":"string","pattern":"^\\d{6}$"}},"required":["wabaId","phoneNumberId","accessToken"],"additionalProperties":false}}},"required":true}}},"/api/v1/agents/{agentId}/integrations/whatsapp/cloud-api/register":{"post":{"tags":["integrations"],"operationId":"integrations.registerExistingWhatsAppPhone","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"MetaIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"pin":{"type":"string","pattern":"^\\d{6}$"}},"required":["pin"],"additionalProperties":false}}},"required":true}}},"/api/v1/agents/{agentId}/integrations/slack/oauth/start":{"post":{"tags":["integrations"],"operationId":"integrations.startSlackOAuth","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"StartSlackOAuthResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartSlackOAuthResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/integrations/slack/test":{"post":{"tags":["integrations"],"operationId":"integrations.testSlack","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"TestSlackIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestSlackIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/integrations/slack/channels":{"get":{"tags":["integrations"],"operationId":"integrations.listSlackChannels","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"SlackChannelListResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackChannelListResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/integrations/notion":{"get":{"tags":["integrations"],"operationId":"integrations.getNotion","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"NotionIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotionIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}},"delete":{"tags":["integrations"],"operationId":"integrations.disconnectNotion","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"NotionIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotionIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/integrations/notion/oauth/start":{"post":{"tags":["integrations"],"operationId":"integrations.startNotionOAuth","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"StartNotionOAuthResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartNotionOAuthResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/integrations/telegram":{"get":{"tags":["integrations"],"operationId":"integrations.getTelegram","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"TelegramIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}},"post":{"tags":["integrations"],"operationId":"integrations.connectTelegram","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"TelegramIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"botToken":{"type":"string","minLength":20,"maxLength":200}},"required":["botToken"],"additionalProperties":false}}},"required":true}},"delete":{"tags":["integrations"],"operationId":"integrations.disconnectTelegram","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"TelegramIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/integrations/stripe":{"get":{"tags":["integrations"],"operationId":"integrations.getStripe","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"StripeIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}},"patch":{"tags":["integrations"],"operationId":"integrations.updateStripe","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"StripeIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"playgroundCustomerId":{"anyOf":[{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["integrations"],"operationId":"integrations.disconnectStripe","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"StripeIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/integrations/stripe/oauth/start":{"post":{"tags":["integrations"],"operationId":"integrations.startStripeOAuth","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"StartStripeOAuthResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartStripeOAuthResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/agents/{agentId}/integrations/stripe/restricted-key":{"post":{"tags":["integrations"],"operationId":"integrations.connectStripeRestrictedKey","parameters":[{"name":"agentId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"StripeIntegrationResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeIntegrationResponseEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"restrictedKey":{"type":"string","minLength":20,"maxLength":255}},"required":["restrictedKey"],"additionalProperties":false}}},"required":true}}},"/api/v1/team":{"get":{"tags":["team"],"operationId":"team.read","parameters":[],"security":[],"responses":{"200":{"description":"TeamReadModel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamReadModelEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/team/invitations":{"post":{"tags":["team"],"operationId":"team.invite","parameters":[],"security":[],"responses":{"200":{"description":"TeamInvitation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInvitationEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","minLength":3,"maxLength":320},"role":{"type":"string","enum":["owner","admin","manager","member"]},"agentAccess":{"anyOf":[{"type":"object","properties":{"scope":{"type":"string","enum":["all"]}},"required":["scope"],"additionalProperties":false},{"type":"object","properties":{"scope":{"type":"string","enum":["selected"]},"agentIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["scope","agentIds"],"additionalProperties":false}]}},"required":["email","role","agentAccess"],"additionalProperties":false}}},"required":true}}},"/api/v1/team/invitations/{invitationId}/resend":{"post":{"tags":["team"],"operationId":"team.resend","parameters":[{"name":"invitationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"TeamInvitation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInvitationEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/team/invitations/{invitationId}":{"delete":{"tags":["team"],"operationId":"team.revoke","parameters":[{"name":"invitationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"TeamInvitation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInvitationEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/team/members/{memberId}":{"patch":{"tags":["team"],"operationId":"team.updateMember","parameters":[{"name":"memberId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"TeamReadModel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamReadModelEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"anyOf":[{"type":"string","enum":["owner","admin","manager","member"]},{"type":"null"}]},"agentAccess":{"anyOf":[{"anyOf":[{"type":"object","properties":{"scope":{"type":"string","enum":["all"]}},"required":["scope"],"additionalProperties":false},{"type":"object","properties":{"scope":{"type":"string","enum":["selected"]},"agentIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["scope","agentIds"],"additionalProperties":false}]},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["team"],"operationId":"team.removeMember","parameters":[{"name":"memberId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"TeamReadModel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamReadModelEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/admin/me":{"get":{"tags":["platformAdmin"],"operationId":"platformAdmin.me","parameters":[],"security":[],"responses":{"200":{"description":"AdminMe","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMeEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/admin/blogs":{"get":{"tags":["platformAdmin"],"operationId":"platformAdmin.listBlogs","parameters":[{"name":"page","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[],"responses":{"200":{"description":"AdminBlogList","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBlogListEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}},"post":{"tags":["platformAdmin"],"operationId":"platformAdmin.createBlog","parameters":[],"security":[],"responses":{"200":{"description":"AdminBlogGeneration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBlogGenerationEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":200},"articleType":{"anyOf":[{"type":"string","enum":["alternative-vs","use-case","how-to","listicle","glossary-definition","integration","benchmark-data"]},{"type":"null"}]},"secondaryKeywords":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":20},{"type":"null"}]},"idealCustomerProfile":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"targetWordCount":{"anyOf":[{"type":"integer","minimum":500,"maximum":4000},{"type":"null"}]},"internalLinks":{"anyOf":[{"type":"array","items":{"type":"string","maxLength":500},"maxItems":20},{"type":"null"}]},"preferredExternalLinks":{"anyOf":[{"type":"array","items":{"type":"string","maxLength":2000},"maxItems":5},{"type":"null"}]},"contentBlocks":{"anyOf":[{"type":"array","items":{"type":"string","enum":["key-takeaways","faq","comparison-table","step-list"]},"maxItems":4},{"type":"null"}]},"additionalInstructions":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"imageStyle":{"anyOf":[{"type":"string","enum":["abstract","nature","custom"]},{"type":"null"}]},"imagePrompt":{"anyOf":[{"type":"string","minLength":3,"maxLength":2000},{"type":"null"}]},"featuredImage":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ai"]},"style":{"type":"string","enum":["abstract","nature","custom"]},"prompt":{"anyOf":[{"type":"string","minLength":3,"maxLength":2000},{"type":"null"}]}},"required":["type","style"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["uploaded"]},"mediaId":{"type":"integer","exclusiveMinimum":0}},"required":["type","mediaId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["pexels"]},"photoId":{"type":"integer","exclusiveMinimum":0}},"required":["type","photoId"],"additionalProperties":false}]},{"type":"null"}]},"socialPlatforms":{"anyOf":[{"type":"array","items":{"type":"string","enum":["linkedin","threads","twitter"]},"maxItems":3},{"type":"null"}]}},"required":["title"],"additionalProperties":false}}},"required":true}}},"/api/v1/admin/blogs/internal-links":{"get":{"tags":["platformAdmin"],"operationId":"platformAdmin.listBlogInternalLinks","parameters":[],"security":[],"responses":{"200":{"description":"AdminBlogInternalLinks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBlogInternalLinksEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/admin/blogs/featured-image":{"post":{"tags":["platformAdmin"],"operationId":"platformAdmin.uploadBlogFeaturedImage","parameters":[],"security":[],"responses":{"200":{"description":"AdminBlogFeaturedImage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBlogFeaturedImageEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string","minLength":1,"maxLength":200},"contentType":{"type":"string","minLength":1,"maxLength":255},"fileSizeBytes":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"fileBase64":{"type":"string","minLength":1,"maxLength":13400000},"alt":{"type":"string","minLength":1,"maxLength":500}},"required":["fileName","contentType","fileSizeBytes","fileBase64","alt"],"additionalProperties":false}}},"required":true}}},"/api/v1/admin/blogs/pexels":{"get":{"tags":["platformAdmin"],"operationId":"platformAdmin.searchPexelsPhotos","parameters":[{"name":"q","in":"query","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"name":"page","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[],"responses":{"200":{"description":"AdminPexelsSearchResult","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPexelsSearchResultEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/admin/blogs/generations/{workflowId}":{"get":{"tags":["platformAdmin"],"operationId":"platformAdmin.getBlogGeneration","parameters":[{"name":"workflowId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"AdminBlogGeneration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBlogGenerationEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/admin/keywords":{"get":{"tags":["platformAdmin"],"operationId":"platformAdmin.listKeywords","parameters":[{"name":"page","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"status","in":"query","schema":{"anyOf":[{"type":"string","enum":["candidate","approved","generated","published","rejected"]},{"type":"null"}]},"required":false}],"security":[],"responses":{"200":{"description":"AdminKeywordList","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminKeywordListEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/admin/keywords/budget":{"get":{"tags":["platformAdmin"],"operationId":"platformAdmin.getKeywordBudget","parameters":[],"security":[],"responses":{"200":{"description":"AdminKeywordBudget","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminKeywordBudgetEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/admin/keywords/research":{"post":{"tags":["platformAdmin"],"operationId":"platformAdmin.researchKeywords","parameters":[],"security":[],"responses":{"200":{"description":"AdminKeywordResearchResult","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminKeywordResearchResultEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"seed":{"type":"string","minLength":1,"maxLength":200},"limit":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"exclusiveMaximum":201},{"type":"null"}]},"force":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["seed"],"additionalProperties":false}}},"required":true}}},"/api/v1/admin/keywords/status":{"post":{"tags":["platformAdmin"],"operationId":"platformAdmin.updateKeywordStatus","parameters":[],"security":[],"responses":{"200":{"description":"AdminKeywordTarget","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminKeywordTargetEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"status":{"type":"string","enum":["candidate","approved","generated","published","rejected"]}},"required":["id","status"],"additionalProperties":false}}},"required":true}}},"/api/v1/admin/keywords/generate":{"post":{"tags":["platformAdmin"],"operationId":"platformAdmin.generateFromKeyword","parameters":[],"security":[],"responses":{"200":{"description":"AdminKeywordGenerationStarted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminKeywordGenerationStartedEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"title":{"anyOf":[{"type":"string","minLength":3,"maxLength":200},{"type":"null"}]}},"required":["id"],"additionalProperties":false}}},"required":true}}},"/api/v1/admin/keywords/serp":{"post":{"tags":["platformAdmin"],"operationId":"platformAdmin.keywordSerp","parameters":[],"security":[],"responses":{"200":{"description":"AdminKeywordSerpResult","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminKeywordSerpResultEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"mode":{"anyOf":[{"type":"string","enum":["outline","rank"]},{"type":"null"}]}},"required":["id"],"additionalProperties":false}}},"required":true}}},"/api/v1/admin/keywords/competitor":{"post":{"tags":["platformAdmin"],"operationId":"platformAdmin.competitorKeywords","parameters":[],"security":[],"responses":{"200":{"description":"AdminCompetitorResult","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCompetitorResultEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","minLength":3,"maxLength":253},"limit":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"exclusiveMaximum":201},{"type":"null"}]},"force":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["domain"],"additionalProperties":false}}},"required":true}}},"/api/v1/admin/keywords/outline":{"get":{"tags":["platformAdmin"],"operationId":"platformAdmin.keywordOutline","parameters":[{"name":"id","in":"query","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"AdminKeywordSerpResult","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminKeywordSerpResultEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/admin/keywords/cluster":{"post":{"tags":["platformAdmin"],"operationId":"platformAdmin.clusterKeywords","parameters":[],"security":[],"responses":{"200":{"description":"AdminClusterResult","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminClusterResultEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/admin/keywords/titles":{"post":{"tags":["platformAdmin"],"operationId":"platformAdmin.suggestArticleTitles","parameters":[],"security":[],"responses":{"200":{"description":"AdminArticleIdeas","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminArticleIdeasEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"502":{"description":"WritingModelUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WritingModelUnavailableEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"keywordIds":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"minItems":1,"maxItems":25}},"required":["keywordIds"],"additionalProperties":false}}},"required":true}}},"/api/v1/admin/keywords/topics":{"get":{"tags":["platformAdmin"],"operationId":"platformAdmin.suggestTopics","parameters":[],"security":[],"responses":{"200":{"description":"AdminTopicSuggestions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTopicSuggestionsEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/admin/keywords/voice":{"get":{"tags":["platformAdmin"],"operationId":"platformAdmin.getBrandVoice","parameters":[],"security":[],"responses":{"200":{"description":"AdminBrandVoice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBrandVoiceEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}},"post":{"tags":["platformAdmin"],"operationId":"platformAdmin.saveBrandVoice","parameters":[],"security":[],"responses":{"200":{"description":"AdminBrandVoice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBrandVoiceEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"idealCustomerProfile":{"type":"string","maxLength":1000},"houseStyle":{"type":"string","maxLength":5000},"targetWordCount":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},{"type":"null"}]}},"required":["idealCustomerProfile","houseStyle"],"additionalProperties":false}}},"required":true}}},"/api/v1/admin/blogs/{blogId}":{"get":{"tags":["platformAdmin"],"operationId":"platformAdmin.getBlogDraft","parameters":[{"name":"blogId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"AdminBlogDraft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBlogDraftEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/admin/blogs/publish":{"post":{"tags":["platformAdmin"],"operationId":"platformAdmin.publishBlog","parameters":[],"security":[],"responses":{"200":{"description":"AdminBlogPublishResult","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBlogPublishResultEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"status":{"type":"string","enum":["draft","published"]}},"required":["id","status"],"additionalProperties":false}}},"required":true}}},"/api/v1/admin/keywords/plan":{"post":{"tags":["platformAdmin"],"operationId":"platformAdmin.planArticle","parameters":[],"security":[],"responses":{"200":{"description":"AdminArticlePlan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminArticlePlanEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"502":{"description":"WritingModelUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WritingModelUnavailableEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["id"],"additionalProperties":false}}},"required":true}}},"/api/v1/admin/users":{"get":{"tags":["platformAdmin"],"operationId":"platformAdmin.searchUsers","parameters":[{"name":"q","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"offset","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[],"responses":{"200":{"description":"AdminUserSearchResult","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserSearchResultEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/admin/users/{userId}":{"get":{"tags":["platformAdmin"],"operationId":"platformAdmin.getUser","parameters":[{"name":"userId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"AdminUserDetail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserDetailEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/admin/users/{userId}/ban":{"post":{"tags":["platformAdmin"],"operationId":"platformAdmin.banUser","parameters":[{"name":"userId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"AdminUserDetail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserDetailEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"banReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"banExpiresIn":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/api/v1/admin/users/{userId}/unban":{"post":{"tags":["platformAdmin"],"operationId":"platformAdmin.unbanUser","parameters":[{"name":"userId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"AdminUserDetail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserDetailEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/admin/reviewers":{"post":{"tags":["platformAdmin"],"operationId":"platformAdmin.provisionReviewer","parameters":[],"security":[],"responses":{"200":{"description":"ProvisionReviewerResult","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionReviewerResultEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","minLength":3,"maxLength":320},"name":{"type":"string","minLength":1,"maxLength":120},"password":{"type":"string","minLength":16,"maxLength":128},"organizationId":{"type":"string","minLength":1},"agentId":{"type":"string","minLength":1}},"required":["email","name","password","organizationId","agentId"],"additionalProperties":false}}},"required":true}}},"/api/v1/admin/organizations":{"get":{"tags":["platformAdmin"],"operationId":"platformAdmin.searchOrganizations","parameters":[{"name":"q","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"offset","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[],"responses":{"200":{"description":"AdminOrganizationSearchResult","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrganizationSearchResultEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/admin/organizations/{organizationId}":{"get":{"tags":["platformAdmin"],"operationId":"platformAdmin.getOrganization","parameters":[{"name":"organizationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"AdminOrganizationDetail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrganizationDetailEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/admin/organizations/{organizationId}/gift-credits":{"post":{"tags":["platformAdmin"],"operationId":"platformAdmin.giftCredits","parameters":[{"name":"organizationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"GiftCreditsResult","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCreditsResultEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"credits":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"note":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["credits"],"additionalProperties":false}}},"required":true}}},"/api/v1/admin/organizations/{organizationId}/change-plan":{"post":{"tags":["platformAdmin"],"operationId":"platformAdmin.changePlan","parameters":[{"name":"organizationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"ChangePlanResult","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePlanResultEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["free","hobby","standard","pro"]},"interval":{"anyOf":[{"type":"string","enum":["month","year"]},{"type":"null"}]},"proration":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["plan"],"additionalProperties":false}}},"required":true}}},"/api/v1/admin/organizations/{organizationId}/apply-discount":{"post":{"tags":["platformAdmin"],"operationId":"platformAdmin.applyDiscount","parameters":[{"name":"organizationId","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"ApplyDiscountResult","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyDiscountResultEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":128}},"required":["code"],"additionalProperties":false}}},"required":true}}},"/api/v1/admin/outreach":{"get":{"tags":["platformAdmin"],"operationId":"platformAdmin.listOutreachTargets","parameters":[],"security":[],"responses":{"200":{"description":"AdminOutreachList","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOutreachListEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}}}},"/api/v1/admin/outreach/discover":{"post":{"tags":["platformAdmin"],"operationId":"platformAdmin.discoverOutreach","parameters":[],"security":[],"responses":{"200":{"description":"AdminOutreachDiscovery","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOutreachDiscoveryEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"keyword":{"type":"string","minLength":2,"maxLength":200}},"required":["keyword"],"additionalProperties":false}}},"required":true}}},"/api/v1/admin/outreach/contact":{"post":{"tags":["platformAdmin"],"operationId":"platformAdmin.findOutreachContact","parameters":[],"security":[],"responses":{"200":{"description":"AdminOutreachContact","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOutreachContactEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64}},"required":["id"],"additionalProperties":false}}},"required":true}}},"/api/v1/admin/outreach/draft":{"post":{"tags":["platformAdmin"],"operationId":"platformAdmin.draftOutreachEmail","parameters":[],"security":[],"responses":{"200":{"description":"AdminOutreachDraft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOutreachDraftEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64}},"required":["id"],"additionalProperties":false}}},"required":true}}},"/api/v1/admin/outreach/update":{"post":{"tags":["platformAdmin"],"operationId":"platformAdmin.updateOutreachTarget","parameters":[],"security":[],"responses":{"200":{"description":"AdminOutreachUpdate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOutreachUpdateEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"status":{"anyOf":[{"type":"string","enum":["found","drafted","sent","replied","included","declined","skipped"]},{"type":"null"}]},"contactEmail":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]},"contactName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"draftSubject":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"draftBody":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}]}},"required":["id"],"additionalProperties":false}}},"required":true}}},"/api/v1/admin/video/captions":{"post":{"tags":["platformAdmin"],"operationId":"platformAdmin.draftVideoCaptions","parameters":[],"security":[],"responses":{"200":{"description":"AdminVideoCaptions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminVideoCaptionsEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"videoUrl":{"type":"string","minLength":8,"maxLength":500},"topic":{"type":"string","minLength":2,"maxLength":400}},"required":["videoUrl","topic"],"additionalProperties":false}}},"required":true}}},"/api/v1/admin/video/share":{"post":{"tags":["platformAdmin"],"operationId":"platformAdmin.shareVideo","parameters":[],"security":[],"responses":{"200":{"description":"AdminVideoShareResult","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminVideoShareResultEncoded"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"503":{"description":"PersistenceUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistenceUnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"videoUrl":{"type":"string","minLength":8,"maxLength":500},"twitter":{"anyOf":[{"type":"string","maxLength":25000},{"type":"null"}]},"threads":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["videoUrl"],"additionalProperties":false}}},"required":true}}},"/api/v1/playground/models":{"get":{"tags":["playground"],"operationId":"playground.models","parameters":[],"security":[],"responses":{"200":{"description":"PlaygroundModelsResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundModelsResponseEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}}}}}},"components":{"schemas":{"UserEncoded":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"PrivateDataEncoded":{"type":"object","properties":{"message":{"type":"string"},"user":{"$ref":"#/components/schemas/UserEncoded"}},"required":["message","user"],"additionalProperties":false},"UnauthorizedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["Unauthorized"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"PersistenceUnavailableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["PersistenceUnavailable"]},"message":{"type":"string"},"cause":{"anyOf":[{},{"type":"null"}]}},"required":["_tag","message"],"additionalProperties":false},"BadRequestEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["BadRequest"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"ForbiddenEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["Forbidden"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"BillingCreditsStatusEncoded":{"type":"object","properties":{"used":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"limit":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"resetAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["used","limit","resetAt"],"additionalProperties":false},"BillingStatusEncoded":{"type":"object","properties":{"plan":{"type":"string","enum":["free","hobby","standard","pro"]},"credits":{"$ref":"#/components/schemas/BillingCreditsStatusEncoded"},"planSelection":{"anyOf":[{"type":"object","properties":{"provider":{"type":"string","enum":["stripe"]}},"required":["provider"],"additionalProperties":false},{"type":"object","properties":{"provider":{"type":"string","enum":["shopify"]},"url":{"type":"string"}},"required":["provider","url"],"additionalProperties":false}]},"purchasedCreditsAvailable":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"promotionalCreditsAvailable":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"canPurchaseCredits":{"type":"boolean"}},"required":["plan","credits","planSelection","purchasedCreditsAvailable","promotionalCreditsAvailable","canPurchaseCredits"],"additionalProperties":false},"RemoveBrandingStatusEncoded":{"type":"object","properties":{"eligibility":{"type":"string","enum":["included","purchasable","unavailable"]},"state":{"type":"string","enum":["included","none","pending","active"]},"purchaseBillingCycle":{"anyOf":[{"type":"string","enum":["monthly","yearly"]},{"type":"null"}]},"billingCycle":{"anyOf":[{"type":"string","enum":["monthly","yearly"]},{"type":"null"}]},"effectiveAt":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"endsAt":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]}},"required":["eligibility","state","purchaseBillingCycle","billingCycle","effectiveAt","endsAt"],"additionalProperties":false},"ScheduledBillingSubscriptionDowngradeEncoded":{"type":"object","properties":{"targetPlan":{"type":"string","enum":["hobby","standard","pro"]},"effectiveAt":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]}},"required":["targetPlan","effectiveAt"],"additionalProperties":false},"BillingSubscriptionLifecycleEncoded":{"type":"object","properties":{"plan":{"type":"string","enum":["free","hobby","standard","pro"]},"interval":{"anyOf":[{"type":"string","enum":["day","week","month","year"]},{"type":"null"}]},"lifecycle":{"type":"string","enum":["free","trialing","active","past_due","paused","canceling","canceled"]},"renewalAt":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"trialEndsAt":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"endsAt":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"effectiveAt":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"scheduledDowngrade":{"anyOf":[{"$ref":"#/components/schemas/ScheduledBillingSubscriptionDowngradeEncoded"},{"type":"null"}]},"providerState":{"type":"string","enum":["current","pending","stale"]}},"required":["plan","interval","lifecycle","renewalAt","trialEndsAt","endsAt","effectiveAt","scheduledDowngrade","providerState"],"additionalProperties":false},"BillingCreditPurchaseEncoded":{"type":"object","properties":{"id":{"type":"string"},"amountDollars":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"credits":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"status":{"type":"string","enum":["pending","completed","failed","refunded"]},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"completedAt":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]}},"required":["id","amountDollars","credits","status","createdAt","completedAt"],"additionalProperties":false},"BillingCreditPurchaseListEncoded":{"type":"object","properties":{"purchases":{"type":"array","items":{"$ref":"#/components/schemas/BillingCreditPurchaseEncoded"}}},"required":["purchases"],"additionalProperties":false},"BillingCreditAutoChargeSettingsEncoded":{"type":"object","properties":{"enabled":{"type":"boolean"},"amountDollars":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"spendingCapDollars":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"updatedAt":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]}},"required":["enabled","amountDollars","spendingCapDollars","updatedAt"],"additionalProperties":false},"CancelBillingSubscriptionResultEncoded":{"type":"object","properties":{"checkoutUrl":{"type":"string"}},"required":["checkoutUrl"],"additionalProperties":false},"BillingInvoiceEncoded":{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"currency":{"type":"string"},"amountDue":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"amountPaid":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"hostedInvoiceUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"invoicePdfUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","number","status","createdAt","currency","amountDue","amountPaid","hostedInvoiceUrl","invoicePdfUrl"],"additionalProperties":false},"BillingInvoiceListEncoded":{"type":"object","properties":{"customer":{"type":"string","enum":["available","missing"]},"invoices":{"type":"array","items":{"$ref":"#/components/schemas/BillingInvoiceEncoded"}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["customer","invoices","nextCursor"],"additionalProperties":false},"ConversationListItemEncoded":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["open","closed","archived"]},"channel":{"type":"string","enum":["manual","playground","help_page","widget","telegram","slack","messenger","whatsapp","instagram"]},"visitorLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["low","normal","high"]},"control":{"type":"string","enum":["ai","human"]},"assignedMemberId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignmentSource":{"anyOf":[{"type":"string","enum":["round_robin"]},{"type":"null"}]},"takeoverActorUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"takeoverAt":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"version":{"type":"integer","minimum":0},"lastActivityAt":{"type":"integer","minimum":0},"lastPreview":{"type":"string"},"nextMessageSequence":{"type":"integer","minimum":0},"createdAt":{"type":"integer","minimum":0},"updatedAt":{"type":"integer","minimum":0},"unreadCount":{"type":"integer","minimum":0}},"required":["id","organizationId","agentId","title","status","channel","visitorLabel","category","priority","control","assignedMemberId","assignmentSource","takeoverActorUserId","takeoverAt","version","lastActivityAt","lastPreview","nextMessageSequence","createdAt","updatedAt","unreadCount"],"additionalProperties":false},"ConversationListResponseEncoded":{"type":"object","properties":{"conversations":{"type":"array","items":{"$ref":"#/components/schemas/ConversationListItemEncoded"}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["conversations","nextCursor"],"additionalProperties":false},"GoneEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["Gone"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"NotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["NotFound"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"ConflictEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["Conflict"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"ConversationNotificationSettingsResponseEncoded":{"type":"object","properties":{"emailEnabled":{"type":"boolean"},"staleUnreadDays":{"type":"integer","minimum":1,"maximum":30},"recipientRoles":{"type":"array","items":{"type":"string","enum":["owner","admin","manager","member"]}},"recipientUserIds":{"type":"array","items":{"type":"string"}},"categories":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"minItems":1,"maxItems":20}},"required":["emailEnabled","staleUnreadDays","recipientRoles","recipientUserIds","categories"],"additionalProperties":false},"AgentConversationUnreadSummaryEncoded":{"type":"object","properties":{"agentId":{"type":"string"},"unreadMessages":{"type":"integer","minimum":0},"unreadConversations":{"type":"integer","minimum":0},"latestUnreadAt":{"type":"integer","minimum":0}},"required":["agentId","unreadMessages","unreadConversations","latestUnreadAt"],"additionalProperties":false},"WorkspaceConversationUnreadSummaryEncoded":{"type":"object","properties":{"agents":{"type":"array","items":{"$ref":"#/components/schemas/AgentConversationUnreadSummaryEncoded"}},"unreadMessages":{"type":"integer","minimum":0},"unreadConversations":{"type":"integer","minimum":0},"latestUnreadAt":{"type":"integer","minimum":0}},"required":["agents","unreadMessages","unreadConversations","latestUnreadAt"],"additionalProperties":false},"ConversationUnreadSummaryEncoded":{"type":"object","properties":{"unreadMessages":{"type":"integer","minimum":0},"unreadConversations":{"type":"integer","minimum":0},"latestUnreadAt":{"type":"integer","minimum":0}},"required":["unreadMessages","unreadConversations","latestUnreadAt"],"additionalProperties":false},"AssignmentSettingsResponseEncoded":{"type":"object","properties":{"mode":{"type":"string","enum":["manual","round_robin"]},"participantMemberIds":{"type":"array","items":{"type":"string"}},"cursorMemberId":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"integer","minimum":0}},"required":["mode","participantMemberIds","cursorMemberId","version"],"additionalProperties":false},"ConversationEncoded":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["open","closed","archived"]},"channel":{"type":"string","enum":["manual","playground","help_page","widget","telegram","slack","messenger","whatsapp","instagram"]},"visitorLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["low","normal","high"]},"control":{"type":"string","enum":["ai","human"]},"assignedMemberId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignmentSource":{"anyOf":[{"type":"string","enum":["round_robin"]},{"type":"null"}]},"takeoverActorUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"takeoverAt":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"version":{"type":"integer","minimum":0},"lastActivityAt":{"type":"integer","minimum":0},"lastPreview":{"type":"string"},"nextMessageSequence":{"type":"integer","minimum":0},"createdAt":{"type":"integer","minimum":0},"updatedAt":{"type":"integer","minimum":0}},"required":["id","organizationId","agentId","title","status","channel","visitorLabel","category","priority","control","assignedMemberId","assignmentSource","takeoverActorUserId","takeoverAt","version","lastActivityAt","lastPreview","nextMessageSequence","createdAt","updatedAt"],"additionalProperties":false},"ConversationMessageEncoded":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"conversationId":{"type":"string"},"sender":{"type":"string","enum":["visitor","agent","team"]},"body":{"type":"string"},"completion":{"anyOf":[{"type":"string","enum":["complete","stopped"]},{"type":"null"}]},"sequence":{"type":"integer","minimum":0},"deliveryState":{"type":"string","enum":["accepted","delivered","failed"]},"idempotencyKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"integer","minimum":0}},"required":["id","organizationId","conversationId","sender","body","completion","sequence","deliveryState","idempotencyKey","actorUserId","createdAt"],"additionalProperties":false},"ConversationEventEncoded":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"conversationId":{"type":"string"},"actorUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string"},"payload":{"type":"string"},"version":{"type":"integer","minimum":0},"occurredAt":{"type":"integer","minimum":0}},"required":["id","organizationId","agentId","conversationId","actorUserId","type","payload","version","occurredAt"],"additionalProperties":false},"ConversationLeadSubmissionEncoded":{"type":"object","properties":{"id":{"type":"string"},"automationId":{"type":"string"},"submittedAt":{"type":"integer","minimum":0}},"required":["id","automationId","submittedAt"],"additionalProperties":false},"ConversationDetailResponseEncoded":{"type":"object","properties":{"conversation":{"$ref":"#/components/schemas/ConversationEncoded"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ConversationMessageEncoded"}},"events":{"type":"array","items":{"$ref":"#/components/schemas/ConversationEventEncoded"}},"leadSubmissions":{"type":"array","items":{"$ref":"#/components/schemas/ConversationLeadSubmissionEncoded"}},"readSequence":{"type":"integer","minimum":0},"capabilities":{"type":"object","properties":{"reply":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["Available"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["Unavailable"]},"reason":{"type":"string","enum":["provider_read_only","ai_control","channel_unsupported","already_human","already_ai"]}},"required":["_tag","reason"],"additionalProperties":false}]},"takeover":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["Available"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["Unavailable"]},"reason":{"type":"string","enum":["provider_read_only","ai_control","channel_unsupported","already_human","already_ai"]}},"required":["_tag","reason"],"additionalProperties":false}]},"release":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["Available"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["Unavailable"]},"reason":{"type":"string","enum":["provider_read_only","ai_control","channel_unsupported","already_human","already_ai"]}},"required":["_tag","reason"],"additionalProperties":false}]},"deliverySemantics":{"type":"string","enum":["broadcast","sent","provider-receipt"]}},"required":["reply","takeover","release","deliverySemantics"],"additionalProperties":false}},"required":["conversation","messages","events","leadSubmissions","readSequence","capabilities"],"additionalProperties":false},"ReplyResponseEncoded":{"type":"object","properties":{"conversation":{"$ref":"#/components/schemas/ConversationEncoded"},"message":{"$ref":"#/components/schemas/ConversationMessageEncoded"},"idempotent":{"type":"boolean"},"capabilities":{"type":"object","properties":{"reply":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["Available"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["Unavailable"]},"reason":{"type":"string","enum":["provider_read_only","ai_control","channel_unsupported","already_human","already_ai"]}},"required":["_tag","reason"],"additionalProperties":false}]},"takeover":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["Available"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["Unavailable"]},"reason":{"type":"string","enum":["provider_read_only","ai_control","channel_unsupported","already_human","already_ai"]}},"required":["_tag","reason"],"additionalProperties":false}]},"release":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["Available"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["Unavailable"]},"reason":{"type":"string","enum":["provider_read_only","ai_control","channel_unsupported","already_human","already_ai"]}},"required":["_tag","reason"],"additionalProperties":false}]},"deliverySemantics":{"type":"string","enum":["broadcast","sent","provider-receipt"]}},"required":["reply","takeover","release","deliverySemantics"],"additionalProperties":false}},"required":["conversation","message","idempotent","capabilities"],"additionalProperties":false},"DraftReplyResponseEncoded":{"type":"object","properties":{"body":{"type":"string"}},"required":["body"],"additionalProperties":false},"TranslateMessageResponseEncoded":{"type":"object","properties":{"original":{"type":"string"},"translated":{"type":"string"},"skipped":{"type":"boolean"}},"required":["original","translated","skipped"],"additionalProperties":false},"MutationResponseEncoded":{"type":"object","properties":{"conversation":{"$ref":"#/components/schemas/ConversationEncoded"},"capabilities":{"type":"object","properties":{"reply":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["Available"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["Unavailable"]},"reason":{"type":"string","enum":["provider_read_only","ai_control","channel_unsupported","already_human","already_ai"]}},"required":["_tag","reason"],"additionalProperties":false}]},"takeover":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["Available"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["Unavailable"]},"reason":{"type":"string","enum":["provider_read_only","ai_control","channel_unsupported","already_human","already_ai"]}},"required":["_tag","reason"],"additionalProperties":false}]},"release":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["Available"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["Unavailable"]},"reason":{"type":"string","enum":["provider_read_only","ai_control","channel_unsupported","already_human","already_ai"]}},"required":["_tag","reason"],"additionalProperties":false}]},"deliverySemantics":{"type":"string","enum":["broadcast","sent","provider-receipt"]}},"required":["reply","takeover","release","deliverySemantics"],"additionalProperties":false}},"required":["conversation","capabilities"],"additionalProperties":false},"ReadCursorResponseEncoded":{"type":"object","properties":{"sequence":{"type":"integer","minimum":0}},"required":["sequence"],"additionalProperties":false},"WebsiteBrandProfileSummaryEncoded":{"type":"object","properties":{"websiteUrl":{"type":"string"},"resolvedUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"hostname":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"faviconUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"appleTouchIconUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"ogImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"themeColor":{"anyOf":[{"type":"string"},{"type":"null"}]},"canonicalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["queued","running","completed","failed"]},"fetchedAt":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]}},"required":["websiteUrl","resolvedUrl","hostname","title","description","faviconUrl","appleTouchIconUrl","ogImageUrl","themeColor","canonicalUrl","status","fetchedAt"],"additionalProperties":false},"AgentEncoded":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"role":{"type":"string","enum":["Customer support","Sales agent","Shopping assistant"]},"instructions":{"type":"string"},"translationLanguage":{"type":"string","enum":["Adaptive","English","Chinese","Hindi","Spanish","French","Arabic","Bangla","Portuguese","Indonesian","Japanese","Swahili","German","Korean","Italian","Yoruba","Burmese"]},"welcomeMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"conversationStarters":{"type":"array","prefixItems":[{"type":"string","minLength":1,"maxLength":80},{"type":"string","minLength":1,"maxLength":80},{"type":"string","minLength":1,"maxLength":80}],"maxItems":3,"minItems":3},"playgroundModelId":{"type":"string","enum":["deepseek/deepseek-v4-pro-0813","deepseek/deepseek-v4.1-flash","deepseek/deepseek-v4.1-flash-fast","openai/gpt-5.6-luna"]},"publicTemplateEnabled":{"type":"boolean"},"status":{"type":"string","enum":["draft","active","archived"]},"brandProfile":{"anyOf":[{"$ref":"#/components/schemas/WebsiteBrandProfileSummaryEncoded"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["id","organizationId","name","slug","role","instructions","translationLanguage","welcomeMessage","avatarUrl","conversationStarters","playgroundModelId","publicTemplateEnabled","status","brandProfile","createdByUserId","createdAt","updatedAt"],"additionalProperties":false},"AgentListResponseEncoded":{"type":"object","properties":{"agents":{"type":"array","items":{"$ref":"#/components/schemas/AgentEncoded"}}},"required":["agents"],"additionalProperties":false},"DuplicateAgentResponseEncoded":{"type":"object","properties":{"agent":{"$ref":"#/components/schemas/AgentEncoded"}},"required":["agent"],"additionalProperties":false},"RelocateAgentResponseEncoded":{"type":"object","properties":{"agent":{"$ref":"#/components/schemas/AgentEncoded"},"destinationWorkspaceSlug":{"type":"string"}},"required":["agent","destinationWorkspaceSlug"],"additionalProperties":false},"PublicAgentTemplateEncoded":{"type":"object","properties":{"agentId":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["Customer support","Sales agent","Shopping assistant"]},"welcomeMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"conversationStarters":{"type":"array","prefixItems":[{"type":"string","minLength":1,"maxLength":80},{"type":"string","minLength":1,"maxLength":80},{"type":"string","minLength":1,"maxLength":80}],"maxItems":3,"minItems":3},"knowledgeSourceCount":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"automationDraftCount":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["agentId","name","role","welcomeMessage","avatarUrl","conversationStarters","knowledgeSourceCount","automationDraftCount"],"additionalProperties":false},"AutomationEncoded":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":80,"pattern":"\\S"},"trigger":{"type":"object","properties":{"type":{"type":"string","enum":["model.instruction"]},"version":{"type":"number","enum":[1]},"whenToUse":{"type":"string","minLength":1,"pattern":"\\S","maxLength":2000},"channels":{"type":"array","items":{"type":"string","enum":["playground","help_page","widget"]}}},"required":["type","version","whenToUse","channels"],"additionalProperties":false},"action":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["suggested_messages"]},"version":{"type":"number","enum":[1]},"mode":{"type":"string","enum":["auto","manual"]},"messages":{"type":"array","items":{"type":"string","minLength":1,"pattern":"\\S","maxLength":40}},"disableInput":{"type":"boolean"}},"required":["type","version","mode","messages","disableInput"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom_button"]},"version":{"type":"number","enum":[1]},"buttonText":{"type":"string","minLength":1,"pattern":"\\S","maxLength":80},"url":{"type":"string","maxLength":2000},"actionName":{"anyOf":[{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9_]*$"},{"type":"null"}]}},"required":["type","version","buttonText","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["collect_leads"]},"version":{"type":"number","enum":[2]},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$"},"label":{"type":"string","minLength":1,"pattern":"\\S","maxLength":80},"kind":{"type":"string","enum":["text","email","phone","textarea"]},"required":{"type":"boolean"},"maxLength":{"anyOf":[{"type":"integer","minimum":1,"maximum":500},{"type":"null"}]}},"required":["id","label","kind","required","maxLength"],"additionalProperties":false}},"successMessage":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500},"dismissMessage":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500},"notification":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["none"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["slack"]},"channelId":{"anyOf":[{"type":"string","minLength":1,"pattern":"\\S","maxLength":120},{"type":"null"}]},"template":{"anyOf":[{"type":"string","minLength":1,"pattern":"\\S","maxLength":2000},{"type":"null"}]}},"required":["kind","channelId","template"],"additionalProperties":false}]}},"required":["type","version","fields","successMessage","dismissMessage","notification"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["slack"]},"version":{"type":"number","enum":[1]},"channelId":{"anyOf":[{"type":"string","minLength":1,"pattern":"\\S","maxLength":120},{"type":"null"}]},"template":{"type":"string","minLength":1,"pattern":"\\S","maxLength":2000}},"required":["type","version","channelId","template"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["escalate"]},"version":{"type":"number","enum":[1]},"ticketPlatform":{"type":"string","enum":["intercom","zendesk"]},"stopAi":{"type":"boolean"},"confirmationMessage":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500}},"required":["type","version","stopAi","confirmationMessage"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom_action"]},"version":{"type":"number","enum":[1]},"method":{"type":"string","enum":["GET","POST"]},"url":{"type":"string","maxLength":2000},"headers":{"type":"object","additionalProperties":{"type":"string"}},"bodyTemplate":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}]},"inputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},"description":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500},"required":{"type":"boolean"}},"required":["name","description","required"],"additionalProperties":false}},"dataAccess":{"type":"string","enum":["full","summary"]}},"required":["type","version","method","url","headers","bodyTemplate","inputs","dataAccess"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["shopify_products"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["shopify_get_cart"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["shopify_update_cart"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["stripe_get_subscription"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["stripe_get_invoices"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["stripe_update_customer"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["stripe_cancel_subscription"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false}]},"state":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["draft"]}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["enabled"]},"enabledAt":{"type":"integer","minimum":0}},"required":["status","enabledAt"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["disabled"]},"disabledAt":{"type":"integer","minimum":0}},"required":["status","disabledAt"],"additionalProperties":false}]},"revision":{"type":"integer","minimum":0},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"integer","minimum":0},"updatedAt":{"type":"integer","minimum":0}},"required":["id","organizationId","agentId","name","trigger","action","state","revision","createdByUserId","updatedByUserId","createdAt","updatedAt"],"additionalProperties":false},"AutomationLeadSubmissionNotificationsEncoded":{"type":"object","properties":{"automationId":{"type":"string"},"uncheckedCount":{"type":"integer","minimum":0}},"required":["automationId","uncheckedCount"],"additionalProperties":false},"AutomationListResponseEncoded":{"type":"object","properties":{"automations":{"type":"array","items":{"$ref":"#/components/schemas/AutomationEncoded"}},"leadSubmissionNotifications":{"type":"array","items":{"$ref":"#/components/schemas/AutomationLeadSubmissionNotificationsEncoded"}}},"required":["automations","leadSubmissionNotifications"],"additionalProperties":false},"InvalidStoredDataEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["InvalidStoredData"]},"message":{"type":"string"},"cause":{"anyOf":[{},{"type":"null"}]}},"required":["_tag","message"],"additionalProperties":false},"AgentLeadSubmissionNotificationsEncoded":{"type":"object","properties":{"agentId":{"type":"string"},"uncheckedCount":{"type":"integer","minimum":0}},"required":["agentId","uncheckedCount"],"additionalProperties":false},"WorkspaceLeadSubmissionNotificationsResponseEncoded":{"type":"object","properties":{"agents":{"type":"array","items":{"$ref":"#/components/schemas/AgentLeadSubmissionNotificationsEncoded"}}},"required":["agents"],"additionalProperties":false},"AutomationLimitReachedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["AutomationLimitReached"]},"code":{"type":"string"},"message":{"type":"string"}},"required":["_tag","code","message"],"additionalProperties":false},"AutomationEnablementFailedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["AutomationEnablementFailed"]},"code":{"type":"string"},"message":{"type":"string"}},"required":["_tag","code","message"],"additionalProperties":false},"AutomationRunEncoded":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"automationId":{"type":"string"},"automationRevision":{"type":"integer","minimum":0},"sourceEventId":{"type":"string"},"sourceEventType":{"type":"string"},"sourceEventVersion":{"type":"integer","minimum":0},"status":{"type":"string","enum":["queued","running","succeeded","retrying","failed","skipped"]},"attempts":{"type":"integer","minimum":0},"maxAttempts":{"type":"integer","minimum":0},"nextAttemptAt":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"trigger":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["model.instruction"]},"version":{"type":"number","enum":[1]},"whenToUse":{"type":"string","minLength":1,"pattern":"\\S","maxLength":2000},"channels":{"type":"array","items":{"type":"string","enum":["playground","help_page","widget"]}}},"required":["type","version","whenToUse","channels"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["conversation.created"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["takeover.requested"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["lead.submitted"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false}]}]},"action":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["suggested_messages"]},"version":{"type":"number","enum":[1]},"mode":{"type":"string","enum":["auto","manual"]},"messages":{"type":"array","items":{"type":"string","minLength":1,"pattern":"\\S","maxLength":40}},"disableInput":{"type":"boolean"}},"required":["type","version","mode","messages","disableInput"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom_button"]},"version":{"type":"number","enum":[1]},"buttonText":{"type":"string","minLength":1,"pattern":"\\S","maxLength":80},"url":{"type":"string","maxLength":2000},"actionName":{"anyOf":[{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9_]*$"},{"type":"null"}]}},"required":["type","version","buttonText","url"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["collect_leads"]},"version":{"type":"number","enum":[1]},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["name","email","phone"]},"enabled":{"type":"boolean"},"required":{"type":"boolean"}},"required":["key","enabled","required"],"additionalProperties":false}},"successMessage":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500},"dismissMessage":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500}},"required":["type","version","fields","successMessage","dismissMessage"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["collect_leads"]},"version":{"type":"number","enum":[2]},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$"},"label":{"type":"string","minLength":1,"pattern":"\\S","maxLength":80},"kind":{"type":"string","enum":["text","email","phone","textarea"]},"required":{"type":"boolean"},"maxLength":{"anyOf":[{"type":"integer","minimum":1,"maximum":500},{"type":"null"}]}},"required":["id","label","kind","required","maxLength"],"additionalProperties":false}},"successMessage":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500},"dismissMessage":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500},"notification":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["none"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["slack"]},"channelId":{"anyOf":[{"type":"string","minLength":1,"pattern":"\\S","maxLength":120},{"type":"null"}]},"template":{"anyOf":[{"type":"string","minLength":1,"pattern":"\\S","maxLength":2000},{"type":"null"}]}},"required":["kind","channelId","template"],"additionalProperties":false}]}},"required":["type","version","fields","successMessage","dismissMessage","notification"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["slack"]},"version":{"type":"number","enum":[1]},"channelId":{"anyOf":[{"type":"string","minLength":1,"pattern":"\\S","maxLength":120},{"type":"null"}]},"template":{"type":"string","minLength":1,"pattern":"\\S","maxLength":2000}},"required":["type","version","channelId","template"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["escalate"]},"version":{"type":"number","enum":[1]},"ticketPlatform":{"type":"string","enum":["intercom","zendesk"]},"stopAi":{"type":"boolean"},"confirmationMessage":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500}},"required":["type","version","stopAi","confirmationMessage"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom_action"]},"version":{"type":"number","enum":[1]},"method":{"type":"string","enum":["GET","POST"]},"url":{"type":"string","maxLength":2000},"headers":{"type":"object","additionalProperties":{"type":"string"}},"bodyTemplate":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}]},"inputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},"description":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500},"required":{"type":"boolean"}},"required":["name","description","required"],"additionalProperties":false}},"dataAccess":{"type":"string","enum":["full","summary"]}},"required":["type","version","method","url","headers","bodyTemplate","inputs","dataAccess"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["shopify_products"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["shopify_get_cart"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["shopify_update_cart"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["stripe_get_subscription"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["stripe_get_invoices"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["stripe_update_customer"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["stripe_cancel_subscription"]},"version":{"type":"number","enum":[1]}},"required":["type","version"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["slack.notification"]},"version":{"type":"number","enum":[1]},"channelId":{"anyOf":[{"type":"string","minLength":1,"pattern":"\\S","maxLength":120},{"type":"null"}]},"template":{"type":"string","minLength":1,"pattern":"\\S","maxLength":2000}},"required":["type","version","channelId","template"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["chat.quickReplies"]},"version":{"type":"number","enum":[1]},"replies":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"pattern":"\\S","maxLength":80},"value":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"value":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["payload"]},"value":{"type":"string","minLength":1,"pattern":"\\S","maxLength":500}},"required":["type","value"],"additionalProperties":false}]},"removeAfterSelection":{"type":"boolean"}},"required":["label","value","removeAfterSelection"],"additionalProperties":false}}},"required":["type","version","replies"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["chat.customButton"]},"version":{"type":"number","enum":[1]},"label":{"type":"string","minLength":1,"pattern":"\\S","maxLength":80},"url":{"type":"string","maxLength":2000}},"required":["type","version","label","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["chat.leadForm"]},"version":{"type":"number","enum":[1]},"fields":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["name"]},"required":{"type":"boolean"}},"required":["type","required"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["email"]},"required":{"type":"boolean"}},"required":["type","required"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["phone"]},"required":{"type":"boolean"}},"required":["type","required"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"id":{"type":"string"},"label":{"type":"string","minLength":1,"pattern":"\\S","maxLength":80},"required":{"type":"boolean"},"maxLength":{"type":"integer"}},"required":["type","id","label","required","maxLength"],"additionalProperties":false}]}}},"required":["type","version","fields"],"additionalProperties":false}]}]},"provider":{"anyOf":[{"type":"string"},{"type":"null"}]},"providerStatusCode":{"anyOf":[{"type":"integer"},{"type":"null"}]},"providerErrorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"providerMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"failureClass":{"anyOf":[{"type":"string"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"queuedAt":{"type":"integer","minimum":0},"startedAt":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"updatedAt":{"type":"integer","minimum":0}},"required":["id","organizationId","agentId","automationId","automationRevision","sourceEventId","sourceEventType","sourceEventVersion","status","attempts","maxAttempts","nextAttemptAt","trigger","action","provider","providerStatusCode","providerErrorCode","providerMessageId","failureClass","failureMessage","queuedAt","startedAt","completedAt","updatedAt"],"additionalProperties":false},"AutomationRunListResponseEncoded":{"type":"object","properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/AutomationRunEncoded"}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["runs","nextCursor"],"additionalProperties":false},"AutomationRunDetailResponseEncoded":{"type":"object","properties":{"run":{"$ref":"#/components/schemas/AutomationRunEncoded"}},"required":["run"],"additionalProperties":false},"LeadSubmissionFieldEncoded":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string"},"value":{"type":"string"}},"required":["id","label","kind","value"],"additionalProperties":false},"LeadSubmissionEncoded":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"automationId":{"type":"string"},"automationRevision":{"type":"integer","minimum":0},"conversationId":{"type":"string"},"channel":{"type":"string","enum":["playground","help_page","widget"]},"fields":{"type":"array","items":{"$ref":"#/components/schemas/LeadSubmissionFieldEncoded"}},"idempotencyKey":{"type":"string"},"submittedAt":{"type":"integer","minimum":0},"createdAt":{"type":"integer","minimum":0}},"required":["id","organizationId","agentId","automationId","automationRevision","conversationId","channel","fields","idempotencyKey","submittedAt","createdAt"],"additionalProperties":false},"LeadSubmissionListResponseEncoded":{"type":"object","properties":{"submissions":{"type":"array","items":{"$ref":"#/components/schemas/LeadSubmissionEncoded"}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkedThrough":{"anyOf":[{"type":"object","properties":{"submissionId":{"type":"string"},"submittedAt":{"type":"integer","minimum":0}},"required":["submissionId","submittedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["submissions","nextCursor","checkedThrough"],"additionalProperties":false},"LeadSubmissionReadCursorResponseEncoded":{"type":"object","properties":{"submissionId":{"type":"string"},"submittedAt":{"type":"integer","minimum":0}},"required":["submissionId","submittedAt"],"additionalProperties":false},"LeadSubmissionCsvResponseEncoded":{"type":"object","properties":{"filename":{"type":"string"},"contentType":{"type":"string","enum":["text/csv; charset=utf-8"]},"body":{"type":"string"}},"required":["filename","contentType","body"],"additionalProperties":false},"SubmitLeadResponseEncoded":{"type":"object","properties":{"submissionId":{"type":"string"},"idempotent":{"type":"boolean"},"successMessage":{"type":"string"}},"required":["submissionId","idempotent","successMessage"],"additionalProperties":false},"LeadSubmissionStatusResponseEncoded":{"type":"object","properties":{"submitted":{"type":"boolean"}},"required":["submitted"],"additionalProperties":false},"AgentKnowledgeStorageUsageEncoded":{"type":"object","properties":{"usedBytes":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"limitBytes":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["usedBytes","limitBytes"],"additionalProperties":false},"AgentSourceListResponseEncoded":{"type":"object","properties":{"sources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["website"]},"websiteUrl":{"type":"string"},"websiteMode":{"type":"string","enum":["page","site"]},"retrainEnabled":{"type":"boolean"}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","websiteUrl","websiteMode","retrainEnabled"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["text"]},"body":{"type":"string"}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","body"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["qa"]},"question":{"type":"string"},"answer":{"type":"string"}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","question","answer"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["file"]},"fileName":{"type":"string"},"fileKind":{"type":"string","enum":["pdf","txt","md","csv","tsv","json","xls","xlsx"]},"fileContentType":{"type":"string"},"fileSizeBytes":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"fileRetrievalMode":{"type":"string","enum":["text","structured"]},"fileSchemaJson":{"anyOf":[{"type":"string"},{"type":"null"}]},"notionPageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"notionPageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"fileOriginUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","fileName","fileKind","fileContentType","fileSizeBytes","fileRetrievalMode","fileSchemaJson","notionPageId","notionPageUrl","fileOriginUrl"],"additionalProperties":false}]}},"knowledgeStorage":{"$ref":"#/components/schemas/AgentKnowledgeStorageUsageEncoded"},"canRetrainWebSources":{"type":"boolean"},"youtubeAllowance":{"type":"object","properties":{"used":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"limit":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"resetsAt":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]}},"required":["used","limit","resetsAt"],"additionalProperties":false}},"required":["sources","knowledgeStorage","canRetrainWebSources","youtubeAllowance"],"additionalProperties":false},"WebsiteSourcePageDetailEncoded":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"canonicalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"markdown":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentHash":{"type":"string"},"fetchedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["id","url","canonicalUrl","title","markdown","contentHash","fetchedAt"],"additionalProperties":false},"CreateAgentSourcesBatchResponseEncoded":{"type":"object","properties":{"sources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["website"]},"websiteUrl":{"type":"string"},"websiteMode":{"type":"string","enum":["page","site"]},"retrainEnabled":{"type":"boolean"}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","websiteUrl","websiteMode","retrainEnabled"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["text"]},"body":{"type":"string"}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","body"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["qa"]},"question":{"type":"string"},"answer":{"type":"string"}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","question","answer"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["file"]},"fileName":{"type":"string"},"fileKind":{"type":"string","enum":["pdf","txt","md","csv","tsv","json","xls","xlsx"]},"fileContentType":{"type":"string"},"fileSizeBytes":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"fileRetrievalMode":{"type":"string","enum":["text","structured"]},"fileSchemaJson":{"anyOf":[{"type":"string"},{"type":"null"}]},"notionPageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"notionPageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"fileOriginUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","fileName","fileKind","fileContentType","fileSizeBytes","fileRetrievalMode","fileSchemaJson","notionPageId","notionPageUrl","fileOriginUrl"],"additionalProperties":false}]}}},"required":["sources"],"additionalProperties":false},"ProcessAgentSourceResponseEncoded":{"type":"object","properties":{"source":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["website"]},"websiteUrl":{"type":"string"},"websiteMode":{"type":"string","enum":["page","site"]},"retrainEnabled":{"type":"boolean"}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","websiteUrl","websiteMode","retrainEnabled"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["text"]},"body":{"type":"string"}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","body"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["qa"]},"question":{"type":"string"},"answer":{"type":"string"}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","question","answer"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","indexing","ready","failed","archived"]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"type":{"type":"string","enum":["file"]},"fileName":{"type":"string"},"fileKind":{"type":"string","enum":["pdf","txt","md","csv","tsv","json","xls","xlsx"]},"fileContentType":{"type":"string"},"fileSizeBytes":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"fileRetrievalMode":{"type":"string","enum":["text","structured"]},"fileSchemaJson":{"anyOf":[{"type":"string"},{"type":"null"}]},"notionPageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"notionPageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"fileOriginUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","agentId","title","status","errorCode","errorMessage","createdByUserId","createdAt","updatedAt","type","fileName","fileKind","fileContentType","fileSizeBytes","fileRetrievalMode","fileSchemaJson","notionPageId","notionPageUrl","fileOriginUrl"],"additionalProperties":false}]}},"required":["source"],"additionalProperties":false},"MetricValueEncoded":{"type":"object","properties":{"current":{"type":"number","minimum":0},"previous":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"changePercent":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["current","previous","changePercent"],"additionalProperties":false},"RetainedAllTimeAnalyticsEncoded":{"type":"object","properties":{"retention":{"type":"string","enum":["incompleteHistory"]},"projectionStartedAt":{"anyOf":[{"type":"integer"},{"type":"null"}]},"metrics":{"type":"object","properties":{"conversations":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"visitorMessages":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"aiMessages":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"humanMessages":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"averageMessagesPerConversation":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"takeovers":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"takeoverRate":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"containmentRate":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"firstResponseTime":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"pendingHuman":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"activeAgents":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]}},"required":["conversations","visitorMessages","aiMessages","humanMessages","averageMessagesPerConversation","takeovers","takeoverRate","containmentRate","firstResponseTime","pendingHuman","activeAgents"],"additionalProperties":false}},"required":["retention","projectionStartedAt","metrics"],"additionalProperties":false},"TimeBucketEncoded":{"type":"object","properties":{"start":{"type":"integer"},"end":{"type":"integer"},"value":{"type":"number","minimum":0}},"required":["start","end","value"],"additionalProperties":false},"AnalyticsVolumeBucketEncoded":{"type":"object","properties":{"conversations":{"$ref":"#/components/schemas/TimeBucketEncoded"},"visitorMessages":{"$ref":"#/components/schemas/TimeBucketEncoded"},"aiMessages":{"$ref":"#/components/schemas/TimeBucketEncoded"}},"required":["conversations","visitorMessages","aiMessages"],"additionalProperties":false},"AnalyticsAgentRowEncoded":{"type":"object","properties":{"agentId":{"type":"string"},"metrics":{"type":"object","properties":{"conversations":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"visitorMessages":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"aiMessages":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"humanMessages":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"averageMessagesPerConversation":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"takeovers":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"takeoverRate":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"containmentRate":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"firstResponseTime":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"pendingHuman":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"activeAgents":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]}},"required":["conversations","visitorMessages","aiMessages","humanMessages","averageMessagesPerConversation","takeovers","takeoverRate","containmentRate","firstResponseTime","pendingHuman","activeAgents"],"additionalProperties":false}},"required":["agentId","metrics"],"additionalProperties":false},"RecentConversationEncoded":{"type":"object","properties":{"conversationId":{"type":"string"},"agentId":{"type":"string"},"status":{"type":"string","enum":["open","closed"]},"control":{"type":"string","enum":["ai","human"]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastActivityAt":{"type":"integer"}},"required":["conversationId","agentId","status","control","assigneeId","lastActivityAt"],"additionalProperties":false},"AnalyticsReportEncoded":{"type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"integer"},"to":{"type":"integer"},"timezone":{"type":"string","minLength":1}},"required":["from","to","timezone"],"additionalProperties":false},"previousPeriod":{"type":"object","properties":{"from":{"type":"integer"},"to":{"type":"integer"},"timezone":{"type":"string","minLength":1}},"required":["from","to","timezone"],"additionalProperties":false},"timezone":{"type":"object","properties":{"value":{"type":"string","minLength":1},"source":{"type":"string","enum":["organizationMetadata","workspaceDefault"]}},"required":["value","source"],"additionalProperties":false},"granularity":{"type":"string","enum":["hour","day","week"]},"metrics":{"type":"object","properties":{"conversations":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"visitorMessages":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"aiMessages":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"humanMessages":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"averageMessagesPerConversation":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"takeovers":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"takeoverRate":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"containmentRate":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"firstResponseTime":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"pendingHuman":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]},"activeAgents":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["available"]},"value":{"$ref":"#/components/schemas/MetricValueEncoded"}},"required":["_tag","value"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unavailable"]},"reason":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["definitionPending"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["insufficientData"]},"minimumSampleSize":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","minimumSampleSize"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["notCollected"]},"source":{"type":"string","enum":["conversationEvents","workflowEvents","responseEvents"]}},"required":["_tag","source"],"additionalProperties":false}]}},"required":["_tag","reason"],"additionalProperties":false}]}},"required":["conversations","visitorMessages","aiMessages","humanMessages","averageMessagesPerConversation","takeovers","takeoverRate","containmentRate","firstResponseTime","pendingHuman","activeAgents"],"additionalProperties":false},"allTime":{"$ref":"#/components/schemas/RetainedAllTimeAnalyticsEncoded"},"volume":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsVolumeBucketEncoded"}},"peakHours":{"type":"array","items":{"type":"object","properties":{"hour":{"type":"integer","minimum":0,"maximum":23},"count":{"type":"number","minimum":0}},"required":["hour","count"],"additionalProperties":false}},"agents":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsAgentRowEncoded"}},"recentConversations":{"type":"array","items":{"$ref":"#/components/schemas/RecentConversationEncoded"}},"freshness":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["fresh"]},"asOf":{"type":"integer"}},"required":["_tag","asOf"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["stale"]},"asOf":{"type":"integer"}},"required":["_tag","asOf"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unknown"]}},"required":["_tag"],"additionalProperties":false}]},"access":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["agent"]},"agentId":{"type":"string"}},"required":["_tag","agentId"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["workspace"]},"visibleAgentCount":{"type":"number","minimum":0}},"required":["_tag","visibleAgentCount"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["permittedAgents"]},"agentIds":{"type":"array","items":{"type":"string"}},"visibleAgentCount":{"type":"number","minimum":0}},"required":["_tag","agentIds","visibleAgentCount"],"additionalProperties":false}]}},"required":["period","previousPeriod","timezone","granularity","metrics","allTime","volume","peakHours","agents","recentConversations","freshness","access"],"additionalProperties":false},"ProductAccessEncoded":{"type":"object","properties":{"userId":{"type":"string"},"organizationId":{"type":"string"},"organizationName":{"type":"string"},"organizationSlug":{"type":"string"},"role":{"type":"string"},"userName":{"type":"string"}},"required":["userId","organizationId","organizationName","organizationSlug","role","userName"],"additionalProperties":false},"PublicWidgetConfigurationEncoded":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"welcomeMessage":{"type":"string","minLength":1,"maxLength":240},"starters":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":3},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"showStarterSuggestions":{"type":"boolean"},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"theme":{"type":"string","enum":["light","dark","system"]},"position":{"type":"string","enum":["bottom-right","bottom-left"]},"autoShowDelaySeconds":{"type":"integer","minimum":0,"maximum":3600},"autoShowOnMobile":{"type":"boolean"},"horizontalOffset":{"type":"integer","minimum":0,"maximum":200},"bottomOffset":{"type":"integer","minimum":0,"maximum":200},"poweredBy":{"type":"boolean"},"chatSoundsEnabled":{"type":"boolean"},"voiceEnabled":{"type":"boolean"},"messagingLinks":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["telegram","whatsapp"]},"url":{"type":"string"}},"required":["provider","url"],"additionalProperties":false}},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["name","welcomeMessage","starters","avatarUrl","showStarterSuggestions","color","theme","position","autoShowDelaySeconds","autoShowOnMobile","horizontalOffset","bottomOffset","poweredBy","chatSoundsEnabled","voiceEnabled","messagingLinks","updatedAt"],"additionalProperties":false},"PublicHelpPageEncoded":{"type":"object","properties":{"organizationId":{"type":"string"},"agentId":{"type":"string"},"displayName":{"type":"string"},"faviconUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"welcomeMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"subtitle":{"type":"string"},"inputPlaceholder":{"type":"string"},"conversationStarters":{"type":"array","prefixItems":[{"type":"string","minLength":1,"maxLength":80},{"type":"string","minLength":1,"maxLength":80},{"type":"string","minLength":1,"maxLength":80}],"maxItems":3,"minItems":3},"poweredBy":{"type":"boolean"},"chatSoundsEnabled":{"type":"boolean"},"voiceEnabled":{"type":"boolean"},"messagingLinks":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["telegram","whatsapp"]},"url":{"type":"string"}},"required":["provider","url"],"additionalProperties":false}},"theme":{"type":"string","enum":["light","dark","system"]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["organizationId","agentId","displayName","faviconUrl","welcomeMessage","title","subtitle","inputPlaceholder","conversationStarters","poweredBy","chatSoundsEnabled","voiceEnabled","messagingLinks","theme","updatedAt"],"additionalProperties":false},"AgentDeploymentSettingsEncoded":{"type":"object","properties":{"agentId":{"type":"string"},"organizationId":{"type":"string"},"publicDeploymentId":{"type":"string"},"widgetEnabled":{"type":"boolean"},"widgetAllowedDomains":{"type":"array","items":{"type":"string","minLength":1,"maxLength":253,"pattern":"^(localhost|(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)$"},"maxItems":20},"widgetShowStarterSuggestions":{"type":"boolean"},"widgetColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"widgetAutoShowDelaySeconds":{"type":"integer","minimum":0,"maximum":3600},"widgetAutoShowOnMobile":{"type":"boolean"},"widgetHorizontalOffset":{"type":"integer","minimum":0,"maximum":200},"widgetBottomOffset":{"type":"integer","minimum":0,"maximum":200},"widgetPoweredBy":{"type":"boolean"},"chatSoundsEnabled":{"type":"boolean"},"voiceEnabled":{"type":"boolean"},"helpPageEnabled":{"type":"boolean"},"helpPageTitle":{"type":"string"},"helpPageSubtitle":{"type":"string"},"helpPageInputPlaceholder":{"type":"string"},"theme":{"type":"string","enum":["light","dark","system"]},"position":{"type":"string","enum":["bottom-right","bottom-left","top-right","top-left"]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["agentId","organizationId","publicDeploymentId","widgetEnabled","widgetAllowedDomains","widgetShowStarterSuggestions","widgetColor","widgetAutoShowDelaySeconds","widgetAutoShowOnMobile","widgetHorizontalOffset","widgetBottomOffset","widgetPoweredBy","chatSoundsEnabled","voiceEnabled","helpPageEnabled","helpPageTitle","helpPageSubtitle","helpPageInputPlaceholder","theme","position","updatedAt"],"additionalProperties":false},"FeatureRequestResponseEncoded":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"agentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requesterUserId":{"type":"string"},"category":{"type":"string","enum":["integration","automation","dashboard","billing","other"]},"title":{"type":"string"},"useCase":{"type":"string"},"priority":{"type":"string","enum":["low","medium","high"]},"willingnessToPay":{"type":"string","enum":["no","maybe","yes"]},"contactNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["id","organizationId","agentId","requesterUserId","category","title","useCase","priority","willingnessToPay","contactNote","createdAt"],"additionalProperties":false},"FirstConversationRewardStatusEncoded":{"type":"object","properties":{"credits":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"granted":{"type":"boolean"},"acknowledged":{"type":"boolean"}},"required":["credits","granted","acknowledged"],"additionalProperties":false},"ActivationTourStatusEncoded":{"type":"object","properties":{"dismissed":{"type":"boolean"}},"required":["dismissed"],"additionalProperties":false},"GettingStartedStepStateEncoded":{"type":"object","properties":{"id":{"type":"string","enum":["add_sources","add_action","deploy_agent_page","deploy_chat_widget"]},"completed":{"type":"boolean"},"skipped":{"type":"boolean"}},"required":["id","completed","skipped"],"additionalProperties":false},"AgentGettingStartedEncoded":{"type":"object","properties":{"agentId":{"type":"string"},"tutorialCompleted":{"type":"boolean"},"completedCount":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"steps":{"type":"array","items":{"$ref":"#/components/schemas/GettingStartedStepStateEncoded"}}},"required":["agentId","tutorialCompleted","completedCount","steps"],"additionalProperties":false},"HelpdeskIntegrationResponseEncoded":{"type":"object","properties":{"status":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["disconnected"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connected"]},"accountName":{"type":"string"},"ticketTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","accountName","ticketTypeId"],"additionalProperties":false}]}},"required":["status"],"additionalProperties":false},"StartHelpdeskOAuthResponseEncoded":{"type":"object","properties":{"authorizeUrl":{"type":"string"}},"required":["authorizeUrl"],"additionalProperties":false},"HelpdeskTicketTypesResponseEncoded":{"type":"object","properties":{"ticketTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["ticketTypes"],"additionalProperties":false},"ShopifyIntegrationResponseEncoded":{"type":"object","properties":{"status":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["connected"]},"shopDomain":{"type":"string"},"acquisition":{"type":"string","enum":["clerk_chat","shopify_app_store"]},"billingOwner":{"type":"string","enum":["stripe","shopify"]},"themeEditorUrl":{"type":"string"},"connectedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["kind","shopDomain","acquisition","billingOwner","themeEditorUrl","connectedAt","updatedAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["disconnected"]}},"required":["kind"],"additionalProperties":false}]}},"required":["status"],"additionalProperties":false},"StartShopifyOAuthResponseEncoded":{"type":"object","properties":{"authorizeUrl":{"type":"string"}},"required":["authorizeUrl"],"additionalProperties":false},"IntegrationPlanRequiredEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["IntegrationPlanRequired"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"SlackIntegrationResponseEncoded":{"type":"object","properties":{"status":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["connected"]},"teamId":{"type":"string"},"teamName":{"anyOf":[{"type":"string"},{"type":"null"}]},"botUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["kind","teamId","teamName","botUserId","defaultChannelId","connectedAt","updatedAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["disconnected"]}},"required":["kind"],"additionalProperties":false}]}},"required":["status"],"additionalProperties":false},"MetaIntegrationResponseEncoded":{"type":"object","properties":{"status":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["connected"]},"installationId":{"type":"string"},"externalAccountId":{"type":"string"},"externalAccountName":{"anyOf":[{"type":"string"},{"type":"null"}]},"credentialExpiresAt":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"connectedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["kind","installationId","externalAccountId","externalAccountName","credentialExpiresAt","connectedAt","updatedAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["reauthorization_required"]},"reason":{"type":"string","enum":["expiring","expired"]},"installationId":{"type":"string"},"externalAccountId":{"type":"string"},"externalAccountName":{"anyOf":[{"type":"string"},{"type":"null"}]},"credentialExpiresAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"connectedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["kind","reason","installationId","externalAccountId","externalAccountName","credentialExpiresAt","connectedAt","updatedAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["disconnected"]}},"required":["kind"],"additionalProperties":false}]}},"required":["status"],"additionalProperties":false},"StartMessengerOAuthResponseEncoded":{"type":"object","properties":{"authorizeUrl":{"type":"string"}},"required":["authorizeUrl"],"additionalProperties":false},"StartInstagramOAuthResponseEncoded":{"type":"object","properties":{"authorizeUrl":{"type":"string"}},"required":["authorizeUrl"],"additionalProperties":false},"StartWhatsAppEmbeddedSignupResponseEncoded":{"type":"object","properties":{"state":{"type":"string"},"appId":{"type":"string"},"configId":{"type":"string"},"graphApiVersion":{"type":"string"}},"required":["state","appId","configId","graphApiVersion"],"additionalProperties":false},"StartSlackOAuthResponseEncoded":{"type":"object","properties":{"authorizeUrl":{"type":"string"}},"required":["authorizeUrl"],"additionalProperties":false},"TestSlackIntegrationResponseEncoded":{"type":"object","properties":{"posted":{"type":"boolean"}},"required":["posted"],"additionalProperties":false},"SlackChannelEncoded":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"}},"required":["id","name","isPrivate"],"additionalProperties":false},"SlackChannelListResponseEncoded":{"type":"object","properties":{"channels":{"type":"array","items":{"$ref":"#/components/schemas/SlackChannelEncoded"}},"reconnectRequired":{"type":"boolean"}},"required":["channels","reconnectRequired"],"additionalProperties":false},"NotionIntegrationResponseEncoded":{"type":"object","properties":{"status":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["connected"]},"workspaceId":{"type":"string"},"workspaceName":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["kind","workspaceId","workspaceName","workspaceIcon","connectedAt","updatedAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["reconnect_required"]},"workspaceId":{"type":"string"},"workspaceName":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["kind","workspaceId","workspaceName","workspaceIcon","connectedAt","updatedAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["disconnected"]}},"required":["kind"],"additionalProperties":false}]}},"required":["status"],"additionalProperties":false},"StartNotionOAuthResponseEncoded":{"type":"object","properties":{"authorizeUrl":{"type":"string"}},"required":["authorizeUrl"],"additionalProperties":false},"TelegramIntegrationResponseEncoded":{"type":"object","properties":{"status":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["connected"]},"installationId":{"type":"string"},"botId":{"type":"string"},"botUsername":{"type":"string"},"connectedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["kind","installationId","botId","botUsername","connectedAt","updatedAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["disconnected"]}},"required":["kind"],"additionalProperties":false}]}},"required":["status"],"additionalProperties":false},"StripeIntegrationResponseEncoded":{"type":"object","properties":{"status":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["connected"]},"stripeAccountId":{"type":"string"},"livemode":{"type":"boolean"},"credentialKind":{"type":"string","enum":["oauth","restricted_key"]},"identifySecret":{"type":"string"},"playgroundCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["kind","stripeAccountId","livemode","credentialKind","identifySecret","playgroundCustomerId","connectedAt","updatedAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["disconnected"]}},"required":["kind"],"additionalProperties":false}]}},"required":["status"],"additionalProperties":false},"StartStripeOAuthResponseEncoded":{"type":"object","properties":{"authorizeUrl":{"type":"string"}},"required":["authorizeUrl"],"additionalProperties":false},"TeamMemberEncoded":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","manager","member"]},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"agentAccess":{"anyOf":[{"type":"object","properties":{"scope":{"type":"string","enum":["all"]}},"required":["scope"],"additionalProperties":false},{"type":"object","properties":{"scope":{"type":"string","enum":["selected"]},"agentIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["scope","agentIds"],"additionalProperties":false}]}},"required":["id","userId","name","email","role","createdAt","agentAccess"],"additionalProperties":false},"TeamInvitationEncoded":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","manager","member"]},"status":{"type":"string"},"inviterId":{"type":"string"},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"expiresAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"agentAccess":{"anyOf":[{"type":"object","properties":{"scope":{"type":"string","enum":["all"]}},"required":["scope"],"additionalProperties":false},{"type":"object","properties":{"scope":{"type":"string","enum":["selected"]},"agentIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["scope","agentIds"],"additionalProperties":false}]}},"required":["id","email","role","status","inviterId","createdAt","expiresAt","agentAccess"],"additionalProperties":false},"TeamReadModelEncoded":{"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/TeamMemberEncoded"}},"invitations":{"type":"array","items":{"$ref":"#/components/schemas/TeamInvitationEncoded"}}},"required":["members","invitations"],"additionalProperties":false},"AdminMeEncoded":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["userId","name","email"],"additionalProperties":false},"AdminBlogSummaryEncoded":{"type":"object","properties":{"id":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"title":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","published"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","slug","status","createdAt","updatedAt"],"additionalProperties":false},"AdminBlogGenerationEncoded":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["queued","running","complete","errored","terminated"]},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"updatedAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"output":{"anyOf":[{},{"type":"null"}]},"error":{"anyOf":[{},{"type":"null"}]}},"required":["id","title","status","createdAt","updatedAt"],"additionalProperties":false},"AdminBlogListEncoded":{"type":"object","properties":{"blogs":{"type":"array","items":{"$ref":"#/components/schemas/AdminBlogSummaryEncoded"}},"generations":{"type":"array","items":{"$ref":"#/components/schemas/AdminBlogGenerationEncoded"}},"total":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"page":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"totalPages":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"cmsOrigin":{"type":"string"}},"required":["blogs","generations","total","page","totalPages","cmsOrigin"],"additionalProperties":false},"AdminBlogInternalLinksEncoded":{"type":"object","properties":{"links":{"type":"array","items":{"type":"string"}}},"required":["links"],"additionalProperties":false},"AdminBlogFeaturedImageEncoded":{"type":"object","properties":{"mediaId":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["mediaId"],"additionalProperties":false},"AdminPexelsPhotoEncoded":{"type":"object","properties":{"id":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"previewUrl":{"type":"string"},"photographer":{"type":"string"},"alt":{"type":"string"},"pageUrl":{"type":"string"}},"required":["id","previewUrl","photographer","alt","pageUrl"],"additionalProperties":false},"AdminPexelsSearchResultEncoded":{"type":"object","properties":{"photos":{"type":"array","items":{"$ref":"#/components/schemas/AdminPexelsPhotoEncoded"}},"page":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"totalResults":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["photos","page","totalResults"],"additionalProperties":false},"AdminKeywordTargetEncoded":{"type":"object","properties":{"id":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"keyword":{"type":"string"},"status":{"type":"string","enum":["candidate","approved","generated","published","rejected"]},"searchVolume":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"keywordDifficulty":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"cpc":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"searchIntent":{"anyOf":[{"type":"string"},{"type":"null"}]},"seed":{"anyOf":[{"type":"string"},{"type":"null"}]},"researchedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"currentPosition":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"rankCheckedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasSerpOutline":{"type":"boolean"},"competitorDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"clusterLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"opportunityScore":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"opportunityReason":{"type":"string"}},"required":["id","keyword","status","searchVolume","keywordDifficulty","cpc","searchIntent","seed","researchedAt","currentPosition","rankCheckedAt","hasSerpOutline","competitorDomain","clusterLabel","opportunityScore","opportunityReason"],"additionalProperties":false},"AdminKeywordListEncoded":{"type":"object","properties":{"keywords":{"type":"array","items":{"$ref":"#/components/schemas/AdminKeywordTargetEncoded"}},"total":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"page":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"totalPages":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["keywords","total","page","totalPages"],"additionalProperties":false},"AdminKeywordBudgetEncoded":{"type":"object","properties":{"login":{"type":"string"},"balance":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["login","balance"],"additionalProperties":false},"AdminKeywordResearchResultEncoded":{"type":"object","properties":{"seed":{"type":"string"},"alreadyResearched":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"keywordCount":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"researchedAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"returned":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"created":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"updated":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"source":{"anyOf":[{"type":"string","enum":["suggestions","ideas"]},{"type":"null"}]},"questionsFound":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"duplicatesDropped":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["seed"],"additionalProperties":false},"AdminKeywordGenerationStartedEncoded":{"type":"object","properties":{"workflowId":{"type":"string"},"keyword":{"type":"string"},"secondaryKeywords":{"type":"array","items":{"type":"string"}},"message":{"type":"string"}},"required":["workflowId","keyword","secondaryKeywords","message"],"additionalProperties":false},"AdminSerpResultEncoded":{"type":"object","properties":{"position":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"title":{"type":"string"},"url":{"type":"string"},"domain":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["position","title","url","domain","description"],"additionalProperties":false},"AdminKeywordSerpResultEncoded":{"type":"object","properties":{"keyword":{"type":"string"},"results":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/AdminSerpResultEncoded"}},{"type":"null"}]},"position":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},{"type":"null"}]},"url":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"checkedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"type":"string"}},"required":["keyword","message"],"additionalProperties":false},"AdminCompetitorResultEncoded":{"type":"object","properties":{"domain":{"type":"string"},"alreadyResearched":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"keywordCount":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"returned":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"created":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"updated":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"message":{"type":"string"}},"required":["domain","message"],"additionalProperties":false},"AdminKeywordClusterEncoded":{"type":"object","properties":{"label":{"type":"string"},"size":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"totalVolume":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"basis":{"type":"string","enum":["serp","words"]}},"required":["label","size","totalVolume","basis"],"additionalProperties":false},"AdminClusterResultEncoded":{"type":"object","properties":{"clusters":{"type":"array","items":{"$ref":"#/components/schemas/AdminKeywordClusterEncoded"}},"keywordsGrouped":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"multiKeywordClusters":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"message":{"type":"string"}},"required":["clusters","keywordsGrouped","multiKeywordClusters","message"],"additionalProperties":false},"AdminArticleIdeaEncoded":{"type":"object","properties":{"title":{"type":"string"},"angle":{"type":"string"},"targetKeyword":{"type":"string"}},"required":["title","angle","targetKeyword"],"additionalProperties":false},"AdminArticleIdeasEncoded":{"type":"object","properties":{"ideas":{"type":"array","items":{"$ref":"#/components/schemas/AdminArticleIdeaEncoded"}},"message":{"type":"string"}},"required":["ideas","message"],"additionalProperties":false},"WritingModelUnavailableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["WritingModelUnavailable"]},"message":{"type":"string"},"cause":{"anyOf":[{},{"type":"null"}]}},"required":["_tag","message"],"additionalProperties":false},"AdminTopicSuggestionEncoded":{"type":"object","properties":{"topic":{"type":"string"},"source":{"type":"string"},"alreadyResearched":{"type":"boolean"}},"required":["topic","source","alreadyResearched"],"additionalProperties":false},"AdminTopicSuggestionsEncoded":{"type":"object","properties":{"suggestions":{"type":"array","items":{"$ref":"#/components/schemas/AdminTopicSuggestionEncoded"}},"freshCount":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"message":{"type":"string"}},"required":["suggestions","freshCount","message"],"additionalProperties":false},"AdminBrandVoiceEncoded":{"type":"object","properties":{"idealCustomerProfile":{"type":"string"},"houseStyle":{"type":"string"},"targetWordCount":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]}},"required":["idealCustomerProfile","houseStyle","targetWordCount"],"additionalProperties":false},"AdminBlogDraftEncoded":{"type":"object","properties":{"id":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"title":{"type":"string"},"slug":{"type":"string"},"excerpt":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","published"]},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string"},"featuredImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{}},"required":["id","title","slug","excerpt","status","publishedAt","updatedAt","featuredImageUrl","content"],"additionalProperties":false},"AdminBlogPublishResultEncoded":{"type":"object","properties":{"id":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"status":{"type":"string","enum":["draft","published"]},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"type":"string"}},"required":["id","status","publishedAt","message"],"additionalProperties":false},"AdminArticleSectionEncoded":{"type":"object","properties":{"heading":{"type":"string"},"covers":{"type":"string"}},"required":["heading","covers"],"additionalProperties":false},"AdminArticlePlanEncoded":{"type":"object","properties":{"keyword":{"type":"string"},"title":{"type":"string"},"angle":{"type":"string"},"searcherWants":{"type":"string"},"sections":{"type":"array","items":{"$ref":"#/components/schemas/AdminArticleSectionEncoded"}},"leadHook":{"type":"string"},"rankingNote":{"type":"string"},"message":{"type":"string"}},"required":["keyword","title","angle","searcherWants","sections","leadHook","rankingNote","message"],"additionalProperties":false},"AdminUserSummaryEncoded":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string"},"banned":{"type":"boolean"},"banReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"banExpires":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"organizationCount":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"companyType":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyTypeDetail":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","email","image","role","banned","banReason","banExpires","createdAt","organizationCount","companyType","companyTypeDetail"],"additionalProperties":false},"AdminUserSearchResultEncoded":{"type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserSummaryEncoded"}},"total":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"limit":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"offset":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["users","total","limit","offset"],"additionalProperties":false},"AdminUserMembershipEncoded":{"type":"object","properties":{"memberId":{"type":"string"},"role":{"type":"string"},"organizationId":{"type":"string"},"organizationName":{"type":"string"},"organizationSlug":{"type":"string"},"plan":{"anyOf":[{"type":"string","enum":["free","hobby","standard","pro"]},{"type":"null"}]},"subscriptionStatus":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["memberId","role","organizationId","organizationName","organizationSlug","plan","subscriptionStatus"],"additionalProperties":false},"AdminUserDetailEncoded":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string"},"banned":{"type":"boolean"},"banReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"banExpires":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"stripeCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"memberships":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserMembershipEncoded"}}},"required":["id","name","email","image","role","banned","banReason","banExpires","stripeCustomerId","createdAt","memberships"],"additionalProperties":false},"ProvisionReviewerResultEncoded":{"type":"object","properties":{"userId":{"type":"string"},"email":{"type":"string"},"organizationId":{"type":"string"},"memberId":{"type":"string"},"agentId":{"type":"string"}},"required":["userId","email","organizationId","memberId","agentId"],"additionalProperties":false},"AdminOrganizationSummaryEncoded":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"logo":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripeCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"memberCount":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"plan":{"anyOf":[{"type":"string","enum":["free","hobby","standard","pro"]},{"type":"null"}]},"subscriptionStatus":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","slug","logo","stripeCustomerId","createdAt","memberCount","plan","subscriptionStatus"],"additionalProperties":false},"AdminOrganizationSearchResultEncoded":{"type":"object","properties":{"organizations":{"type":"array","items":{"$ref":"#/components/schemas/AdminOrganizationSummaryEncoded"}},"total":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"limit":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"offset":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["organizations","total","limit","offset"],"additionalProperties":false},"AdminOrganizationSubscriptionEncoded":{"type":"object","properties":{"id":{"type":"string"},"plan":{"type":"string","enum":["free","hobby","standard","pro"]},"status":{"type":"string"},"stripeSubscriptionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripeCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"periodStart":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"periodEnd":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"billingInterval":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelAtPeriodEnd":{"type":"boolean"}},"required":["id","plan","status","stripeSubscriptionId","stripeCustomerId","periodStart","periodEnd","billingInterval","cancelAtPeriodEnd"],"additionalProperties":false},"AdminOrganizationMemberEncoded":{"type":"object","properties":{"memberId":{"type":"string"},"userId":{"type":"string"},"role":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"banned":{"type":"boolean"}},"required":["memberId","userId","role","name","email","image","banned"],"additionalProperties":false},"AdminOrganizationDetailEncoded":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"logo":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripeCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"subscription":{"anyOf":[{"$ref":"#/components/schemas/AdminOrganizationSubscriptionEncoded"},{"type":"null"}]},"members":{"type":"array","items":{"$ref":"#/components/schemas/AdminOrganizationMemberEncoded"}},"promotionalCreditsAvailable":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"purchasedCreditsAvailable":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["id","name","slug","logo","stripeCustomerId","createdAt","subscription","members","promotionalCreditsAvailable","purchasedCreditsAvailable"],"additionalProperties":false},"GiftCreditsResultEncoded":{"type":"object","properties":{"organizationId":{"type":"string"},"creditsGranted":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"promotionalCreditsAvailable":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["organizationId","creditsGranted","promotionalCreditsAvailable"],"additionalProperties":false},"ChangePlanResultEncoded":{"type":"object","properties":{"organizationId":{"type":"string"},"plan":{"type":"string","enum":["free","hobby","standard","pro"]},"status":{"type":"string"},"stripeSubscriptionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"billingInterval":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["organizationId","plan","status","stripeSubscriptionId","billingInterval"],"additionalProperties":false},"ApplyDiscountResultEncoded":{"type":"object","properties":{"organizationId":{"type":"string"},"appliedTo":{"type":"string","enum":["subscription","customer"]},"code":{"type":"string"},"couponId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["organizationId","appliedTo","code","couponId"],"additionalProperties":false},"AdminOutreachTargetEncoded":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"domain":{"type":"string"},"articleTitle":{"type":"string"},"sourceKeyword":{"type":"string"},"position":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"verdict":{"type":"string","enum":["worth asking","vendor page","not a list"]},"status":{"type":"string","enum":["found","drafted","sent","replied","included","declined","skipped"]},"contactEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactName":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactSource":{"anyOf":[{"type":"string"},{"type":"null"}]},"draftSubject":{"anyOf":[{"type":"string"},{"type":"null"}]},"draftBody":{"anyOf":[{"type":"string"},{"type":"null"}]},"sentAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","url","domain","articleTitle","sourceKeyword","position","verdict","status","contactEmail","contactName","contactSource","draftSubject","draftBody","sentAt","notes","createdAt"],"additionalProperties":false},"AdminOutreachListEncoded":{"type":"object","properties":{"targets":{"type":"array","items":{"$ref":"#/components/schemas/AdminOutreachTargetEncoded"}},"total":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["targets","total"],"additionalProperties":false},"AdminOutreachDiscoveryEncoded":{"type":"object","properties":{"keyword":{"type":"string"},"found":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"added":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"skipped":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"worthAsking":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"message":{"type":"string"}},"required":["keyword","found","added","skipped","worthAsking","message"],"additionalProperties":false},"AdminOutreachContactEncoded":{"type":"object","properties":{"id":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string"},"message":{"type":"string"}},"required":["id","email","name","source","message"],"additionalProperties":false},"AdminOutreachDraftEncoded":{"type":"object","properties":{"id":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"},"gmailUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"type":"string"}},"required":["id","subject","body","gmailUrl","message"],"additionalProperties":false},"AdminOutreachUpdateEncoded":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["found","drafted","sent","replied","included","declined","skipped"]},"message":{"type":"string"}},"required":["id","status","message"],"additionalProperties":false},"AdminVideoCaptionsEncoded":{"type":"object","properties":{"twitter":{"type":"string"},"threads":{"type":"string"},"message":{"type":"string"}},"required":["twitter","threads","message"],"additionalProperties":false},"AdminVideoShareOutcomeEncoded":{"type":"object","properties":{"platform":{"type":"string","enum":["twitter","threads"]},"posted":{"type":"boolean"},"postId":{"anyOf":[{"type":"string"},{"type":"null"}]},"permalink":{"anyOf":[{"type":"string"},{"type":"null"}]},"detail":{"type":"string"}},"required":["platform","posted","postId","permalink","detail"],"additionalProperties":false},"AdminVideoShareResultEncoded":{"type":"object","properties":{"outcomes":{"type":"array","items":{"$ref":"#/components/schemas/AdminVideoShareOutcomeEncoded"}},"message":{"type":"string"}},"required":["outcomes","message"],"additionalProperties":false},"PlaygroundModelEncoded":{"type":"object","properties":{"id":{"type":"string","enum":["deepseek/deepseek-v4-pro-0813","deepseek/deepseek-v4.1-flash","deepseek/deepseek-v4.1-flash-fast","openai/gpt-5.6-luna"]},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},"PlaygroundModelsResponseEncoded":{"type":"object","properties":{"models":{"type":"array","items":{"$ref":"#/components/schemas/PlaygroundModelEncoded"}},"defaultModelId":{"type":"string","enum":["deepseek/deepseek-v4-pro-0813","deepseek/deepseek-v4.1-flash","deepseek/deepseek-v4.1-flash-fast","openai/gpt-5.6-luna"]}},"required":["models","defaultModelId"],"additionalProperties":false}},"securitySchemes":{}},"security":[],"tags":[{"name":"system"},{"name":"private"},{"name":"onboarding"},{"name":"billing"},{"name":"conversations"},{"name":"agents"},{"name":"automations"},{"name":"agentSources"},{"name":"analytics"},{"name":"dashboardSummary"},{"name":"agentDeploymentSettings"},{"name":"featureRequests"},{"name":"agentGettingStarted"},{"name":"integrations"},{"name":"team"},{"name":"platformAdmin"},{"name":"playground"}]}